_x( 'Icon', 'Add Icon', 'absolute-addons' ), 'type' => Controls_Manager::ICONS, 'label_block' => false, 'render_type' => 'ui', 'default' => 'classic', ]; $fields['link_text'] = [ 'label' => _x( 'Link Text', 'Type Site Name', 'absolute-addons' ), 'type' => Controls_Manager::TEXT, 'default' => 'Contact', 'title' => _x( 'Link Text', 'Type Site Name', 'absolute-addons' ), ]; $fields['link_url'] = [ 'label' => _x( 'Link Url', 'Type Site Link', 'absolute-addons' ), 'type' => Controls_Manager::URL, 'default' => '#', 'title' => _x( 'Link Url', 'Type Site Link', 'absolute-addons' ), ]; return $fields; } /** * Filter fields. * * Filter which controls to display, using `include`, `exclude`, `condition` * and `of_type` arguments. * * @return array Control fields. * @since 1.2.2 * @access protected * */ protected function filter_fields() { $fields = parent::filter_fields(); $args = $this->get_args(); foreach ( $fields as &$field ) { if ( isset( $field['of_type'] ) && ! in_array( $field['of_type'], $args['types'] ) ) { unset( $field ); } } return $fields; } /** * Get default options. * * Retrieve the default options of the background control. Used to return the * default options while initializing the background control. * * @return array Default background control options. * @since 1.9.0 * @access protected * */ protected function get_default_options() { return [ 'popover' => false, ]; } }