This file contains hidden or 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 | |
if ( ! function_exists( 'get_search_link_no_permastruct' ) ) { | |
function get_search_link_no_permastruct( $search_term ) { | |
return home_url( '?s=' . urlencode( stripslashes( $search_term ) ) ); | |
} | |
} | |
add_filter( 'mwtsa_display_latest_searches_shortcode_list_item_output', 'mwtsa_display_latest_searches_shortcode_list_item_output_callback', 10, 2 ); | |
function mwtsa_display_latest_searches_shortcode_list_item_output_callback( $output, $shortcode_attributes ) { |
This file contains hidden or 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 | |
add_filter('mwtsa_display_search_stats_shortcode_output', 'custom_mwtsa_display_search_stats_shortcode_output', 10, 3); | |
function custom_mwtsa_display_search_stats_shortcode_output( $html, $atts, $data ) { | |
ob_start(); | |
?> | |
<div class="mwtsa-search-stats"> | |
<ul> | |
<?php if ( count( $data['most_searched'] ) > 0 ) : ?> |
This file contains hidden or 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 | |
/** | |
* Search content for shortcodes and filter shortcodes through their hooks. | |
* | |
* This function is an alias for do_shortcode(). | |
* | |
* @since 5.4.0 | |
* | |
* @see do_shortcode() | |
* |
This file contains hidden or 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 if ( ! get_pages() ) : ?> | |
<input name="show_on_front" type="hidden" value="posts" /> | |
<table class="form-table" role="presentation"> | |
<?php | |
if ( 'posts' != get_option( 'show_on_front' ) ) : | |
update_option( 'show_on_front', 'posts' ); | |
endif; | |
else : | |
if ( 'page' === get_option( 'show_on_front' ) && ! get_option( 'page_on_front' ) && ! get_option( 'page_for_posts' ) ) { |