fusion_builder_shortcodes_categories()

fusion_builder_shortcodes_categories()

Copy to Clipboardfusion_builder_shortcodes_categories( string $taxonomy, bool $empty_choice, string $empty_choice_label ) 1fusion_builder_shortcodes_categories( string $taxonomy, bool $empty_choice, string $empty_choice_label )Retrieve a list of category objects for defined taxonomy. Display a category list as element option.
Params$taxonomy
(string) (Required) Taxonomy to retrieve terms for.
$empty_choice
(bool) Add empty option to a returned category list. Default: false.
$empty_choice_label
(string) Text label for empty option in a returned category list. Default: 「Default」.Copy to Clipboardfusion_builder_map(
array(
'name' => esc_attr__( 'Fusion Builder Element', 'fusion-builder' ),
'shortcode' => 'fusion_text',
'icon' => 'fusiona-font',
'preview' => PLUGIN_DIR . 'js/previews/fusion-text-preview.php',
'preview_id' => 'fusion-builder-block-module-text-preview-template',
'allow_generator' => true,
'params' => array(
array(
'type' => 'select',
'heading' => esc_attr__( 'Category', 'fusion-builder' ),
'description' => esc_attr__( 'Select a category of posts to display.', 'fusion-builder' ),
'param_name' => 'category',
'value' => fusion_builder_shortcodes_categories( 'category', true, esc_attr__( 'All', 'fusion-builder' ) ),
'default' => '',

),
),
)
);xxxxxxxxxx21 1fusion_builder_map( 2    array(3        'name'            => esc_attr__( 'Fusion Builder Element', 'fusion-builder' ),4        'shortcode'       => 'fusion_text',5        'icon'            => 'fusiona-font',6        'preview'         => PLUGIN_DIR . 'js/previews/fusion-text-preview.php',7        'preview_id'      => 'fusion-builder-block-module-text-preview-template',8        'allow_generator' => true,9        'params'          => array(10            array(11                'type'        => 'select',12                'heading'     => esc_attr__( 'Category', 'fusion-builder' ),13                'description' => esc_attr__( 'Select a category of posts to display.', 'fusion-builder' ),14                'param_name'  => 'category',15                'value'       => fusion_builder_shortcodes_categories( 'category', true, esc_attr__( 'All', 'fusion-builder' ) ),16                'default'     => '',17 18             ),19       ),20   ) 21);

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注