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 my1_pmpro_level_cost_text($text, $level) { | |
// is livel is free do nothing | |
if (pmpro_isLevelFree($level)) { | |
return ""; | |
// else is different to free do this | |
} else { | |
//the full string is : The price for membership is $0.00 now. | |
$restituisci = str_replace("now.","",$text); // in this case you can remove "now." in the full string | |
return $restituisci; |
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
/* | |
Don't show confirm password or email fields on the checkout page. | |
Add this code to your active theme's functions.php or a custom plugin. | |
*/ | |
add_filter("pmpro_checkout_confirm_password", "__return_false"); | |
add_filter("pmpro_checkout_confirm_email", "__return_false"); |
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 | |
//Detect special conditions devices | |
$iPod = stripos($_SERVER['HTTP_USER_AGENT'],"iPod"); | |
$iPhone = stripos($_SERVER['HTTP_USER_AGENT'],"iPhone"); | |
$iPad = stripos($_SERVER['HTTP_USER_AGENT'],"iPad"); | |
$Android = stripos($_SERVER['HTTP_USER_AGENT'],"Android"); | |
$webOS = stripos($_SERVER['HTTP_USER_AGENT'],"webOS"); | |
//do something with this information | |
if( $iPod || $iPhone ){ ?> | |
<?php//browser reported as an iPhone/iPod touch -- do something here ?> |
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
if ( current_user_can( 'manage_options' ) ) { | |
/* A user with admin privileges */ | |
} else { | |
/* A user without admin privileges */ | |
} |
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 as_remove_menus () { | |
remove_menu_page('upload.php'); //hide Media | |
remove_menu_page('link-manager.php'); //hide links | |
remove_submenu_page( 'edit.php', 'edit-tags.php' ); //hide tags | |
global $submenu; | |
// Appearance Menu | |
unset($submenu['themes.php'][6]); // Customize | |
} | |
add_action('admin_menu', 'as_remove_menus'); |
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
<div id="cooler-nav" class="navigation"> | |
<?php $prevPost = get_previous_post(true); | |
if($prevPost) {?> | |
<div class="nav-box previous" style="float:left;"> | |
<?php $prevthumbnail = get_the_post_thumbnail($prevPost->ID, array(100,100) );}?> | |
<?php previous_post_link('%link',"$prevthumbnail %title", TRUE); ?> | |
</div> | |
<?php $nextPost = get_next_post(true); | |
if($nextPost) { ?> |
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
// Remember to make the option field 'std' => '1', | |
<?php if ( 1 == of_get_option('app_on_off') ) { ?> | |
<p>checked</p> | |
<?php } else { ?> | |
<p>unchecked</p> | |
<?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
/* Click open/close Dropdown in pure CSS */ | |
/* Disclaimer: Not the most semantic | |
thing in the universe. */ | |
/* Forked from original idea | |
http://jsfiddle.net/paullferguson/Sv54G/3/ */ | |
.tabs { | |
position: relative; |
OlderNewer