args = $args; $this->row_label = $args['row_label']; $this->add_new_label = $args['add_new_label']; parent::__construct( $manager, $id, $args ); $this->defaults = $this->setting->default; } /** * Enqueue Scripts * */ function enqueue() { wp_enqueue_media(); wp_enqueue_style( 'fontawesome', get_template_directory_uri() . '/assets/external/fontawesome/css/all.min.css', array(), '6.4.2', 'all' ); wp_enqueue_style( 'blog-postx-wp-repeater', get_template_directory_uri() . '/inc/customizer/custom-controls/repeater/repeater.css', array(), BLOG_POSTX_VERSION, 'all' ); wp_enqueue_script( 'blog-postx-wp-repeater', get_template_directory_uri() . '/inc/customizer/custom-controls/repeater/repeater.js', array( 'jquery' ), BLOG_POSTX_VERSION, [ 'strategy' => 'defer', 'in_footer' => true ] ); } /** * For The displaying the structure in Customizer */ public function render_content() { $fields = json_decode( json_encode( $this->args['fields'] ) ); $control_values = $this->value(); $control_values = ( ! empty( $control_values ) ) ? json_decode( $control_values ) : json_decode( json_encode( array( $fields ) ) ); $item_count = 1; ?>