1. Home
  2. Docs
  3. KeyGator
  4. Filters
  5. CPT: Item Secret Content (Sendback Element)

CPT: Item Secret Content (Sendback Element)

Filter ID: envato_castle/filters/developer/cpt/item_scrt/element/content

Example: Add new repeater with two text boxes and merge with the builtin repeater TGM Plugins.

add_filter( 'envato_castle/filters/developer/cpt/item_scrt/element/content', 'THEME_SLUG_ele_sendback_array' );

function THEME_SLUG_ele_sendback_array( $builtin_elemnts ) {

    $my_elemnts = array(

        array( 
            'id' => 'repeater_generic',
            'title' => esc_html__( 'Repeater Title', 'YOUR_TEXT_DOMAIN' ),
            'type' => 'repeater',
            'params'    => array(
                'buttons'   => array(
                    'show_add'      => false,
                    'show_delete'   => true,
                    'show_collapse' => true,
                    'show_sort'     => true,
                ),
                'text'      => array(
                    'add_new'       => esc_html__( 'Add New Demo', 'YOUR_TEXT_DOMAIN' )
                )
            ),
            'controls'    => array(
                array(
                    'id' => 'title',
                    'title' => esc_html__( 'Title', 'YOUR_TEXT_DOMAIN' ),
                    'description' => esc_html__( 'Describe this content with couple words.', 'YOUR_TEXT_DOMAIN' ),
                    'default' => '',
                    'type' => 'text',
                    'params'    => array(
                        'controls_source'   => 'repeater',
                        'js_title'          => true,
                        'required'          => true,
                    )
                ),
                
                array(
                    'id' => 'url',
                    'title' => esc_html__( 'Demo URL', 'YOUR_TEXT_DOMAIN' ),
                    'description' => esc_html__( 'Describe this content with couple words.', 'YOUR_TEXT_DOMAIN' ),
                    'default' => '',
                    'type' => 'text',
                    'params'    => array(
                        'required'          => true,
                    )
                ),
            )

        ),

    );


    return array_merge( $builtin_elemnts, $my_elemnts );

}