-
-
Save lionhurt/a6f87b39d355bfae45c96460c1a57d60 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Multinews functions | |
require_once get_template_directory() . '/framework/main.php'; | |
//For demo site only | |
if (file_exists(get_template_directory() . '/demo/demo.php')) { | |
require_once get_template_directory() . '/demo/demo.php'; | |
} | |
//search in ticker menu | |
if (mom_option('bar_search') == 1) { | |
add_filter( 'wp_nav_menu_items', 'mom_search_in_wp_ticker', 10, 2 ); | |
} | |
function mom_search_in_wp_ticker ( $items, $args ) { | |
if ($args->theme_location == 'breaking') { | |
ob_start(); | |
?> | |
<li class="top-search breaking-search menu-item-iconsOnly"><a href="#"><i class="icon_only fa-icon-search"></i></a> | |
<div class="search-dropdown"> | |
<form class="mom-search-form" method="get" action="<?php echo home_url(); ?>/"> | |
<input type="text" id="tb-search" class="sf" name="s" placeholder="<?php _e('Enter keywords and press enter', 'framework') ?>" required="" autocomplete="off"> | |
<?php if(mom_option('ajax_search_disable')) { ?><span class="sf-loading"><img src="<?php echo MOM_IMG; ?>/ajax-search-nav.png" alt="search" width="16" height="16"></span><?php } ?> | |
<?php if(defined('ICL_LANGUAGE_CODE')) { ?><input type="hidden" name="lang" value="<?php echo(ICL_LANGUAGE_CODE); ?>"/><?php } ?> | |
</form> | |
<?php if(mom_option('ajax_search_disable')) { ?> | |
<div class="ajax-search-results"></div> | |
<?php } ?> | |
</div> | |
</li> | |
<?php | |
$output = ob_get_contents(); | |
ob_end_clean(); | |
$items .= $output; | |
} | |
return $items; | |
} | |
if ( ! isset( $content_width ) ) { | |
$content_width = 1000; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment