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 | |
/** | |
* set up some quick links for the admin bar | |
* | |
* @param WP_Admin_Bar $wp_admin_bar [description] | |
* @return [type] [description] | |
*/ | |
function rkv_admin_bar_static( WP_Admin_Bar $wp_admin_bar ) { |
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 | |
/** | |
* Devin CSV Export | |
* | |
* Contains our export processing | |
*/ | |
/* | |
Copyright 2015 Reaktiv Studios | |
This program is free software; you can redistribute it and/or modify |
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 | |
$countries = array( | |
'Afghanistan', | |
'Albania', | |
'Algeria', | |
'American Samoa', | |
'Andorra', | |
'Angola', | |
'Anguilla', |
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 | |
/** | |
* keeps a user always logged in | |
* don't use this on a production site, ever! | |
*/ | |
add_action( 'init', 'rkv_auto_login' ); | |
add_action( 'admin_init', 'rkv_auto_login' ); |
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( 'the_content', 'rkv_shortcode_cleanup',1001 ); | |
/** | |
* remove weird tags | |
* | |
* @param [type] $content [description] | |
*/ | |
function rkv_shortcode_cleanup( $content ) { |
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 | |
/** | |
* bypass the notification email on successful auto-updates | |
* | |
* @param [type] $send [description] | |
* @param [type] $type [description] | |
* @param [type] $core_update [description] | |
* @param [type] $result [description] | |
* @return [type] [description] | |
*/ |
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( 'the_content', 'rkv_force_https_images', 10 ); | |
/** | |
* check image URLs and force https on them | |
* | |
* @param [type] $content [description] | |
*/ | |
function rkv_force_https_images( $content ) { | |
return str_replace( 'src="http://css-tricks.com', 'src="https://css-tricks.com', $content ); |
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( 'cun_single_item_email', 'rkv_single_cun_notify' ); | |
function rkv_single_cun_notify( $post_id ) { | |
return absint( $post_id ) === absint( THE_ID_I_WANT ) ? true : false; | |
} |
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_action( 'init', 'rkv_comment_noindex_base' ); | |
/** | |
* remove the noindex flag on the reply links | |
* when not using Yoast SEO | |
* | |
* @return null | |
*/ | |
function rkv_comment_noindex_base() { |
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( 'months_dropdown_results', 'rkv_remove_month_filters' ), 10, 2 ); | |
/** | |
* remove the month drop down filter by | |
* spoofing WP and saying that none exist | |
* for specific post types | |
* | |
* @param array $months the original count | |
* @param string $post_type the post type |