opt = Ivory_Search::load_options();
}
/**
* Gets the instance of this class.
*
* @return self
*/
public static function getInstance()
{
if ( !self::$_instance instanceof self ) {
self::$_instance = new self();
}
return self::$_instance;
}
/**
* Displays settings sections having custom markup.
*/
public function is_do_settings_sections( $page, $sec )
{
global $wp_settings_sections, $wp_settings_fields ;
if ( !isset( $wp_settings_sections[$page] ) ) {
return;
}
$section = (array) $wp_settings_sections[$page][$sec];
if ( $section['title'] ) {
echo "
{$section['title']}
\n" ;
}
if ( $section['callback'] ) {
call_user_func( $section['callback'], $section );
}
if ( !isset( $wp_settings_fields ) || !isset( $wp_settings_fields[$page] ) || !isset( $wp_settings_fields[$page][$section['id']] ) ) {
return;
}
?>
is_do_settings_fields( $page, $section['id'] );
?>
$description ) {
if ( has_nav_menu( $location ) ) {
$check_value = ( isset( $this->opt['menus'][$location] ) ? $this->opt['menus'][$location] : 0 );
?>
', '' );
}
} else {
_e( 'Navigation menu location is not registered on the site.', 'add-search-to-menu' );
}
?>
opt['menu_name'][$value->slug] ) ? $this->opt['menu_name'][$value->slug] : 0 );
?>
', '' );
}
?>
opt['menus'] ) && !isset( $this->opt['menu_name'] ) || '' === $check_value ) {
return;
}
?>
>
", '' );
?>
", '' );
?>
' ;
$args = array(
'numberposts' => -1,
'post_type' => 'is_search_form',
);
$posts = get_posts( $args );
?>
opt['header_search'] ) ? $this->opt['header_search'] : 0 );
?>
-1,
'post_type' => 'is_search_form',
);
$posts = get_posts( $args );
if ( !empty($posts) ) {
$check_value = ( isset( $this->opt['footer_search'] ) ? $this->opt['footer_search'] : 0 );
?>
opt['header_menu_search'] ) ? $this->opt['header_menu_search'] : 0 );
$check_string = checked( 'header_menu_search', $check_value, false );
?>
opt['site_uses_cache'] ) ? $this->opt['site_uses_cache'] : 0 );
$check_string = checked( 'site_uses_cache', $check_value, false );
?>
opt['custom_css'] = ( isset( $this->opt['custom_css'] ) ? $this->opt['custom_css'] : '' );
?>
opt['stopwords'] = ( isset( $this->opt['stopwords'] ) ? $this->opt['stopwords'] : '' );
?>
opt['synonyms'] = ( isset( $this->opt['synonyms'] ) ? $this->opt['synonyms'] : '' );
?>
__( 'Do not load plugin CSS files', 'add-search-to-menu' ),
'js' => __( 'Do not load plugin JavaScript files', 'add-search-to-menu' ),
);
?>
' . __( 'Warning: Use with caution.', 'add-search-to-menu' ) . '';
IS_Help::help_info( $content );
$check_value = ( isset( $this->opt['default_search'] ) ? $this->opt['default_search'] : 0 );
?>
opt['disable'] ) ? $this->opt['disable'] : 0 );
?>
opt['easy_edit'] ) ? $this->opt['easy_edit'] : 0 );
?>