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 // do not include this line if pasting into an existing php file | |
// This function will only return posts that are related AND has ALL of the same categories. | |
function jp_only_rp_in_same_category( $categories, $post_id ) { | |
$category_objects = get_the_category( $post_id ); | |
if ( ! empty( $categories ) ) { | |
$categories = array_merge( 'categories', 'category_objects' ); | |
return $categories; | |
} |
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 | |
/* | |
* Plugin Name: Custom Facebook Admin Meta Tag | |
*/ | |
function custom_facebook_admin_meta_tag() { | |
$userid = "123456"; | |
$meta = '<meta property="fb:admins" content="' . esc_attr($userid) .'">'; | |
echo $meta; |
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 | |
add_filter( 'site_status_tests', function ( $tests ) { | |
unset( $tests['direct']['amp_persistent_object_cache'] ); | |
return $tests; | |
}, 99 ); |
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 jetpackme_related_posts_past_halfyear_only( $date_range ) { | |
$date_range = array( | |
'from' => strtotime( '-6 months' ), | |
'to' => time(), | |
); | |
return $date_range; | |
} | |
add_filter( 'jetpack_relatedposts_filter_date_range', 'jetpackme_related_posts_past_halfyear_only' ); |
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 | |
function jetpack_support_reset_protect_ip() { | |
delete_site_option('trusted_ip_header'); | |
} | |
add_action( 'admin_head', 'jetpack_support_reset_protect_ip'); |
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 | |
/** | |
* Plugin Name: Core Functionality | |
* Description: This contains all your site's core functionality so that it is theme independent. | |
* Version: 1.0 | |
* Author: You | |
* | |
* This program is free software; you can redistribute it and/or modify it under the terms of the GNU | |
* General Public License version 2, as published by the Free Software Foundation. You may NOT assume | |
* that you can use any other version of the GPL. |
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
add_filter( 'akismet_comment_form_privacy_notice_markup', 'bk_custom_akismet_markup' ); | |
function bk_custom_akismet_markup( $markup ) { | |
$markup = '<p class="akismet_comment_form_privacy_notice">' . sprintf( | |
__( 'This site uses Akismet to reduce spam. <a href="%s" target="_blank" rel="nofollow">Learn how your comment data is processed</a>.', 'akismet' ), | |
'https://akismet.com/privacy/' | |
) . '</p>'; | |
return $markup; | |
} |
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 | |
/* | |
Plugin Name: Jetpack - Disable Slideshow | |
Plugin URI: https://jetpack.com | |
Description: Disable Jetpack's slideshow feature | |
Author URI: | |
Version: 2017.07.24 | |
License: GPL | |
*/ |
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 // do not include in an existing file | |
add_action('init', 'kraft_wpjmresume_publicize'); | |
function kraft_wpjmresume_publicize() { | |
add_post_type_support( 'resume', 'publicize' ); | |
} |
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 // Remove this line if copy/pasting to an existing file. | |
/* | |
Plugin Name: Only Display Jetpack Ads on Posts | |
Plugin URI: https://kraft.blog | |
Description: Only output Jetpack Ads on posts and no other post type. | |
Author: Kraft | |
Author URI: https://kraft.im/ | |
Version: 2016.06.15 | |
License: GPL | |
*/ |
NewerOlder