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 | |
//code from https://wordpress.org/plugins/cloudflare/ | |
/** | |
* remove http and https from links, save in mu-plugins | |
*/ | |
if (true !== function_exists('cloudflare_buffer_wrapup')) { | |
function cloudflare_buffer_wrapup($buffer) { | |
// Check for a Content-Type header. Currently only apply rewriting to "text/html" or undefined |
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 Gravity Forms Permission for Editor | |
function add_grav_forms(){ | |
$role = get_role('editor'); | |
$role->add_cap('gform_full_access'); | |
} | |
add_action('admin_init','add_grav_forms') |
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 | |
add_filter( 'genesis_post_info', 'cd_post_info_filter' ); | |
function cd_post_info_filter( $post_info ) { | |
if ( ! is_singular( 'post' ) ) { | |
$post_info = '[post_date] by [post_author_posts_link] [post_comments]'; | |
$post_modified_info = '[post_modified_date before="<br />Last updated "]'; | |
return $post_info . $post_modified_info; |
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_action( 'init', 'growdev_remove_woo_nag' ); | |
/** | |
* Remove the admin notice nagging you to install/activate the WooThemes Helper plugin | |
* This notice should be dismissable, but isn't. | |
* | |
*/ | |
function growdev_remove_woo_nag() { | |
remove_action( 'admin_notices', 'woothemes_updater_notice' ); |
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
<? | |
//=========================================================== SUBSCRIBER SHORTCODE | |
function subscriber_shortcode($atts, $content = null ) { | |
extract(shortcode_atts(array( | |
'page' => '', | |
'headline' => 'Subscribe for free updates', | |
'button' => 'Subscribe', | |
'quote' => '', | |
'class' => 'box_main', | |
'form_class' => 'centered_form', |
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
For CSS | |
.attachment-thumbnail { | |
float: left; | |
padding: 10px; | |
} | |
For functions.php |
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_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption' ) ); |
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 | |
/** | |
* Create a split test using two different GravityForms | |
* | |
* Allows you to test the effectiveness of two different forms by displaying each | |
* one 50% of the time. Tracking CTR using the built-in GravityForms functionality | |
* should give you an idea of which form is most effective. | |
* | |
* @uses GravityForms | |
* @author FAT Media, LLC |
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( 'jetpack_get_available_modules', 'prefix_hide_jetpack_modules' ); | |
/** | |
* Disable all non-whitelisted jetpack modules. | |
* | |
* As it's written, this will allow all of the currently available Jetpack | |
* modules to work display and be activated normally. | |
* | |
* If there's a module you'd like to disable, simply comment it out or remove it | |
* from the whitelist and it will no longer be available for activation. |
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 custom query vars to handle Google Analytics Ecommerce tracking. | |
* This should be placed in a plugin or in functions.php of the theme. | |
* | |
* You'll want to use the redirect method for Gravity Forms confirmations and | |
* turn on passing field data via a query string. An example we used was: | |
* donation_amount={Donation Amount:13}&donation_id={entry_id}&donation_recurring=0 | |
*/ | |
function sm_add_query_vars( $vars ){ |
NewerOlder