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('activated_plugin','save_error'); | |
/** | |
* Place entire block of code at foot of wp-admin/includes/plugin.php | |
* Don't forget to remove code after use! | |
* | |
* Location of error_activation.html must be writeable, eg in your uploads folder somewhere | |
*/ | |
function save_error(){ | |
file_put_contents( ABSPATH . 'wp-content/{somewhere writeable}/error_activation.html', ob_get_contents() ); |
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 | |
/* | |
Installed themes: | |
Parent theme = Genesis version 1.9.1 | |
Child theme = Child version 1.0 | |
*/ | |
// EXAMPLE 1: | |
$theme = wp_get_theme( get_template_directory() ); |
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_action('bb_init', 'profile_redirect'); | |
// @link http://bbpress.org/forums/topic/one-profile-page-to-rule-them-all | |
function profile_redirect() { | |
if (is_bb_profile() && $_GET['tab'] != 'edit' && $_GET['tab'] != 'favorites') { | |
$user = bb_get_user($_GET['id']); | |
if ($user) wp_redirect("http://www.example.com/member/" . $user->user_nicename); | |
} | |
} |
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
<script type='text/javascript'> | |
/* <![CDATA[ */ | |
var carousel_params_1 = {"es_imageW":"150","es_margin":"4"}; | |
/* ]]> */ | |
</script> | |
<script type='text/javascript'> | |
/* <![CDATA[ */ | |
var carousel_params_2 = {"es_imageW":"200","es_margin":"5"}; | |
/* ]]> */ | |
</script> |
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( 'genesis_footer_backtotop_text', 'footer_backtotop_filter' ); | |
/** | |
* Modify Genesis back to to text | |
* | |
* @author Ade Walker http://www.studiograsshopper.ch | |
* | |
* @param string $backtotop, default text output by Genesis | |
* @return string $backtotop, modified text | |
*/ |
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( 'genesis_post_title_text', 'child_modify_title' ); | |
/** | |
* Add price to post title when category is 'current stock' | |
* | |
* This will only show the price on "main loop" | |
* | |
* @param string $title, post title text, as per genesis_do_post_title() | |
* @return string $title, modified title | |
*/ |
NewerOlder