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
SELECT * FROM `wp_posts` WHERE `guid` LIKE "http://dev.ceramicartsdaily.org/%" AND `post_type` = 'attachment' |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
//GF Formula | |
add_filter("gform_calculation_formula", "change_formula", 10, 4); | |
function change_formula($formula, $field, $form, $lead){ | |
$formula = "18% + " . $formula; | |
return $formula; |
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
// replace WordPress Howdy in WordPress 3.3 | |
function replace_howdy( $wp_admin_bar ) { | |
$my_account=$wp_admin_bar->get_node('my-account'); | |
$newtitle = str_replace( 'Howdy,', 'Logged in as', $my_account->title ); | |
$wp_admin_bar->add_node( array( | |
'id' => 'my-account', | |
'title' => $newtitle, | |
) ); | |
} | |
add_filter( 'admin_bar_menu', 'replace_howdy',25 ); |
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 wps_adminbar_bookmarks() { | |
global $wp_admin_bar; | |
$cat = '2'; // define category | |
$name = 'Bookmarks'; | |
$bookmarks = array(); | |
$bookmarks = get_bookmarks("category=$cat"); | |
if ($bookmarks[0] != '') { | |
$wp_admin_bar->add_menu( array( | |
'title' => $name, | |
'href' => 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
if (!empty($_SERVER['SCRIPT_FILENAME']) && 'functions.php' == basename($_SERVER['SCRIPT_FILENAME'])) | |
{ | |
die ('No access!'); | |
} |
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 remove_screen_options(){ | |
return false; | |
} | |
add_filter('screen_options_show_screen', 'remove_screen_options'); |
NewerOlder