function shiword_custom_background_plus_style() { if (shiword_is_printpreview() || shiword_is_mobile()) { return; } $background = get_background_image(); $color = get_background_color(); if (!$background && !$color) { return; } $style = $color ? "background-color: #{$color};" : ''; if ($background) { $style .= " background-image: url('{$background}');"; } ?> <style type="text/css"> body { <?php echo trim($style); ?> } #fixedfoot_cont { <?php echo trim($style); ?> } #head_cont { background-color: #<?php echo trim($color); ?> ; } </style> <?php }
function init() { if (shiword_is_mobile()) { return; } //Infinite Scroll add_theme_support('infinite-scroll', array('type' => 'click', 'container' => 'posts-container', 'render' => array($this, 'infinite_scroll_render'))); if (class_exists('The_Neverending_Home_Page')) { add_filter('infinite_scroll_results', array($this, 'infinite_scroll_encode'), 11, 1); } //Sharedaddy if (function_exists('sharing_display')) { remove_filter('the_content', 'sharing_display', 19); remove_filter('the_excerpt', 'sharing_display', 19); add_filter('shiword_like_it', 'sharing_display', 19); } //Carousel if (class_exists('Jetpack_Carousel')) { remove_filter('post_gallery', 'shiword_gallery_shortcode', 10, 2); add_filter('shiword_filter_js_modules', array($this, 'carousel')); } //Likes if (class_exists('Jetpack_Likes')) { add_filter('wpl_is_index_disabled', '__return_false'); } }
function shiword_search_form($form) { if (!shiword_is_mobile()) { $form = ' <div class="search-form"> <form onsubmit="this.parentNode.className=\'search-form searching\';" action="' . esc_url(home_url('/')) . '" class="sw-searchform" method="get"> <input type="text" onfocus="if (this.value == \'' . esc_attr__('Search', 'shiword') . '...\') {this.value = \'\';}" onblur="if (this.value == \'\') {this.value = \'' . esc_attr__('Search', 'shiword') . '...\';}" class="sw-searchinput" name="s" value="' . esc_attr__('Search', 'shiword') . '..." /> <input type="hidden" class="sw-searchsubmit" /> </form> </div>'; } return $form; }