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
(* | |
Speed up Mail.app by vacuuming the Envelope Index | |
Code from: http://www.hawkwings.net/2007/03/03/scripts-to-automate-the-mailapp-envelope-speed-trick/ | |
Originally by "pmbuko" with modifications by Romulo | |
Updated by Brett Terpstra 2012 | |
Updated by Mathias Törnblom 2015 to support V3 in El Capitan and still keep backwards compability | |
Updated by @lbutlr for V5 and Container folder in High Sierra and use du | |
Updated by @nciske for V6 in Mojave | |
NOTE: Mojave users will need to grant Terminal.app or Automator.app (wherever you run the script) full disk access for the script to run successfully |
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 | |
//* Do NOT include the opening php tag | |
//* This is optional if you don't want to use a widget for display (e.g. a shortcode or ACF will handle output) | |
//* Register Home Slider widget area | |
genesis_register_sidebar( array( | |
'id' => 'home-slider', | |
'name' => 'Home Slider', | |
'description' => 'This is the home slider section' | |
) ); |
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 | |
global $wpdb; | |
// Start Transaction | |
$wpdb->query( "START TRANSACTION" ); | |
// Do some expensive/related queries here | |
//$wpdb->query("DELETE FROM table WHERE form_id = '1' "); | |
//$wpdb->query("DELETE FROM data WHERE form_id = '1' "); | |
// set $error variable value in error handling after $wpdb modifications |
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 | |
// THIS WORKS FINE | |
function sr_user_profile_update_email( $user_id, $old_user_data ) { | |
$user = get_userdata( $user_id ); | |
if($old_user_data->user_email != $user->user_email) { | |
$admin_email = "[email protected]"; | |
$message = sprintf( __( 'This user has updated their profile on the SchoolRise USA Staff Member site.' ) ) . "\r\n\r\n"; |
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
// Remove Genesis Author Box and load our own | |
remove_action( 'genesis_after_post', 'genesis_do_author_box_single' ); | |
add_action( 'genesis_after_post', 'be_author_box' ); | |
/** | |
* Load Author Boxes | |
* | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/wordpress-post-multiple-authors/ | |
*/ |