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
function founder_add_apps_to_homepage($query) | |
{ | |
if (is_home() && $query->is_main_query()) { | |
$query->set('post_type', array( 'post', 'app')); | |
} | |
return $query; | |
} | |
add_filter('pre_get_posts', 'founder_add_apps_to_homepage'); |
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
function block_rest_api_except_ia( $access ) { | |
if (!is_user_logged_in() && $_SERVER['REQUEST_URI'] != '/wp-json/iawp/search') { | |
return new WP_Error( 'rest_disabled', __('The WordPress REST API has been disabled.'), array( 'status' => rest_authorization_required_code())); | |
} | |
return $access; | |
} | |
add_filter( 'rest_authentication_errors', 'block_rest_api_except_ia ); |
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
namespace IAWP; | |
function get_top_ten() : array | |
{ | |
$start = new \DateTime('30 days ago'); | |
$top_ten = []; | |
$query = new Resources([ | |
'start' => $start | |
]); |
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
function ct_period_blog_featured_image(){ | |
if ( is_home() ) { | |
echo '<div class="featured-image">'. get_the_post_thumbnail( get_queried_object()->ID, 'full' ) . '</div>'; | |
} | |
} | |
add_action('main_top', 'ct_period_blog_featured_image'); |
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
.wc-block-product-categories-list { | |
display: flex; | |
flex-wrap: wrap; | |
justify-content: space-between; | |
} | |
.wc-block-product-categories-list li { | |
width: 24%; | |
margin: 0 !important; | |
text-align: center; | |
} |
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
function ct_shift_child_disable_google_fonts() { | |
wp_dequeue_style( 'ct-shift-google-fonts' ); | |
} | |
add_action( 'wp_enqueue_scripts', 'ct_shift_child_disable_google_fonts', 11 ); |
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
function scc_redirect_freemius_pricing_to_checkout($url) { | |
return scc_freemius()->checkout_url(); | |
} | |
scc_freemius()->add_filter( 'pricing_url', 'scc_redirect_freemius_pricing_to_checkout', 10, 1); |
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
function ct_mission_news_post_byline( $author, $date, $categories ) { | |
if ( $author == 'no' && $date == 'no' && $categories == 'no' ) { | |
return; | |
} | |
if ( empty($author) ) { | |
$author = 'yes'; | |
} | |
if ( empty($date) ) { | |
$date = 'yes'; |
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
function mysite_remove_elementor_pro_sticky() { | |
// Dequeue and deregister elementor-pro-frontend | |
wp_deregister_script( 'elementor-pro-frontend' ); | |
// Re-register elementor-frontend without the elementor-sticky dependency. | |
$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min'; | |
wp_register_script( | |
'elementor-pro-frontend', | |
ELEMENTOR_PRO_URL . 'assets/js/frontend' . $suffix . '.js', |
NewerOlder