Skip to content

Tierhilfe

Weidenberg und Umgebung e.V.

"type" => "dropdown-responsive", "value" => array( '1' => '1', '2' => '2', '3' => '3', ), "heading" => 'Article excerpt columns', "description" => "", "holder" => "div", "class" => "tdc-dropdown-small", "group" => "Layout", "info_img" => "https://cloud.tagdiv.com/help/layout_article_excerpt_columns.png", ), array( "param_name" => "excerpt_gap", "type" => "textfield-responsive", "value" => '', "heading" => 'Article excerpt columns gap', "description" => "", "holder" => "div", "class" => "tdc-textfield-small", "placeholder" => "48", "group" => "Layout", ), array( "param_name" => "art_audio", "type" => "textfield-responsive", "value" => '', "heading" => 'Audio player space', "description" => "", "holder" => "div", "class" => "tdc-textfield-big", "placeholder" => "0px 0px 0px 0px", "group" => "Layout", "info_img" => "https://cloud.tagdiv.com/help/module_audio_space.png", ), array( 'param_name' => 'art_audio_size', 'type' => 'range-responsive', 'value' => '1.5', 'heading' => 'Audio player size', 'description' => '', 'class' => 'tdc-textfield-small', 'range_min' => '0', 'range_max' => '10', 'range_step' => '0.5', "group" => "Layout", "info_img" => "https://cloud.tagdiv.com/help/module_audio_size.png", ), array( "param_name" => "art_btn", "type" => "textfield-responsive", "value" => '', "heading" => 'Article button space', "description" => "", "holder" => "div", "class" => "tdc-textfield-big", "placeholder" => "20px 0px 0px 0px", "group" => "Layout", ), array( "param_name" => "separator", "type" => "text_separator", 'heading' => 'Meta info border', "value" => "", "class" => "tdc-separator-small", "group" => 'Layout' ), array( "param_name" => "meta_info_border_size", "type" => "textfield-responsive", "value" => '', "heading" => 'Border width', "description" => "", atic function get_all_supported() { return memo() ?? memo( array_values( array_filter( self::get_all_public(), [ self::class, 'is_supported' ], ) ) ); } /** * Gets all taxonomies that could possibly support SEO. * Memoizes the return value. * * @since 4.1.0 * @since 5.0.0 1. Moved from `\The_SEO_Framework\Load`. * 2. Renamed from `get_public_taxonomies`. * 3. Is now public. * * @return string[] The taxonomies that are public. */ public static function get_all_public() { return umemo( __METHOD__ ) ?? umemo( __METHOD__, /** * Do not consider using this filter. Properly register your taxonomy, noob. * * @since 4.2.0 * @param string[] $taxonomies The public taxonomies. */ (array) \apply_filters( 'the_seo_framework_public_taxonomies', array_filter( array_unique( array_merge( self::get_all_forced_supported(), // array_values() because get_taxonomies() gives a sequential array. array_values( \get_taxonomies( [ 'public' => true, '_builtin' => false, ] ) ), ) ), 'is_taxonomy_viewable', ) ) ); } /** * Returns a list of builtin public taxonomies. * * @since 4.1.0 * @since 4.2.0 Removed memoization. * @since 5.0.0 1. Moved from `\The_SEO_Framework\Load`. * 2. Renamed from `get_forced_supported_taxonomies`. * 3. Is now public. * * @return string[] Forced supported taxonomies */ public static function get_all_forced_supported() { /** * @since 4.1.0 * @param string[] $forced Forced supported taxonomies. */ return (array) \apply_filters( 'the_seo_framework_forced_supported_taxonomies', array_values( \get_taxonomies( [ 'public' => true, '_builtin' => true, ] ) ), ); } /** * Returns a list of post types shared with the taxonomy. * * @since 4.0.0 * @since 5.0.0 1. Moved from `\The_SEO_Framework\Load`. * 2. Renamed from `get_post_types_from_taxonomy`. * * @param string $taxonomy Optional. The taxonomy to check. Defaults to current screen/query taxonomy. * @return array List of post types. */ public static function get_post_types( $taxonomy = '' ) { $taxonomy = $taxonomy ?: Query::get_current_taxonomy(); $tax = $taxonomy ? \get_taxonomy( $taxonomy ) : null; return $tax->object_type ?? []; } /** * Returns hierarchical taxonomies for post type. * * @since 3.0.0 * @since 4.0.5 The `$post_type` fallback now uses a real query ID, instead of `$GLOBALS['post']`. * @since 4.1.0 Now filters taxonomies more graciously--expecting broken taxonomies returned in the filter. * @since 5.0.0 1. Moved from `\The_SEO_Framework\Load`. * 2. Renamed from `get_hierarchical_taxonomies_as`. * * @param string $get What to get. Accepts 'names' or 'objects'. * @param string $post_type The post type. Will default to current post type. * @return object[]|string[] The post type taxonomy objects or names. */ public static function get_hierarchical( $get = 'objects', $post_type = '' ) { $post_type = $post_type ?: Query::get_current_post_type(); if ( ! $post_type ) return []; $taxonomies = array_filter( \get_object_taxonomies( $post_type, 'objects' ), fn( $t ) => ! empty( $t->hierarchical ), ); // If names isn't $get, assume objects. return 'names' === $get ? array_keys( $taxonomies ) : $taxonomies; } /** * Returns the taxonomy type object label. Either plural or singular. * * @since 3.1.0 * @since 5.0.0 1. Moved from `\The_SEO_Framework\Load`. * 2. Renamed from `get_taxonomy_label`. * 3. The first parameter is now optional. * * @param string $taxonomy The taxonomy. * @param bool $singular Whether to get the singlural or plural name. * @return string The Taxonomy Type name/label, if found. */ public static function get_label( $taxonomy = '', $singular = true ) { $taxonomy = $taxonomy ?: Query::get_current_taxonomy(); $tax = $taxonomy ? \get_taxonomy( $taxonomy ) : null; return $tax->labels->{ $singular ? 'singular_name' : 'name' } ?? ''; } }