linked ) && is_array( $this->linked ) && isset( $this->linked['show-if-selector'] ) && isset( $this->linked['show-if-value'] ) ) { $return = ''; $return .= 'data-show-if-selector="' . esc_attr( $this->linked['show-if-selector'] ) . '" '; $return .= 'data-show-if-value="' . esc_attr( $this->linked['show-if-value'] ) . '" '; if ( isset( $this->linked['show-if-operator'] ) ) $return .= 'data-show-if-operator="' . esc_attr( $this->linked['show-if-operator'] ) . '" '; return $return; } /* Example linked array Used when registering a control in config 'linked' => array( 'show-if-selector' => "#layers-header-layout-fixed", 'show-if-value' => "true", 'show-if-operator' => "!=", ) */ } /** * Get customize data attribute * * @return array fomratted as the form input needs them; */ public function get_customize_data() { $link = explode( '="', $this->get_link() ); $link_attr = ltrim( $link[0], 'data-' ); $link_val = rtrim( $link[1], '"' ); $link_array = array( $link_attr => $link_val ); return $link_array; } /** * Render the Reset-to-Default and possible other history buttons. */ public function render_history_actions() { return false; ?>