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( 'update_option', function( $option, $old_value, $value ) { | |
if ( 'cron' !== $option ) { | |
return; | |
} | |
$json_old = wp_json_encode( $old_value ); | |
$json_new = wp_json_encode( $value ); | |
$old_contains = strpos( $json_old, 'boldgrid_backup_wp_cron_run_jobs' ) !== false; | |
$new_contains = strpos( $json_new, 'boldgrid_backup_wp_cron_run_jobs' ) !== 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
add_filter( 'pre_clear_scheduled_hook', function( $null, $hook, $args, $wp_error ) { | |
$core = apply_filters( 'boldgrid_backup_get_core', false ); | |
$logger = new Boldgrid_Backup_Admin_Log( $core ); | |
$logger->init( 'pre_clear_scheduled_hook.log' ); | |
// We want to include the trace to see what is clearing the schedule. | |
$e = new \Exception(); | |
$e = explode( "\n", $e->getTraceAsString() ); | |
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
const double TAX_RATE_IN_TEXAS = 1.08; | |
total = TAX_RATE_IN_TEXAS * price; |
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
total = 1.08 * price; |
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
constant int deckSize := 52 | |
for i from 1 to deckSize | |
j := i + randomInt(deckSize + 1 - i) - 1 | |
a.swapEntries(i, j) |
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 i from 1 to 52 | |
j := i + randomInt(53 - i) - 1 | |
a.swapEntries(i, j) |
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
public class Foo { | |
public static final int MAX_PASSWORD_SIZE = 7; | |
public void setPassword(String password) { | |
if (password.length() > MAX_PASSWORD_SIZE) { | |
throw new InvalidArgumentException("password"); | |
} | |
} | |
} |
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
public class Foo { | |
public void setPassword(String password) { | |
if (password.length() > 7) { | |
throw new InvalidArgumentException("password"); | |
} | |
} | |
} |
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 this: | |
```php | |
wp_insert_user( array( | |
'user_email' => $userinfo->email, | |
'first_name' => $userinfo->givenName, | |
'last_name' => $userinfo->familyName, | |
'role' => 'author', | |
'user_pass' => md5( $userinfo->email . time() ), | |
'user_login' => explode( '@', $userinfo->email )[0], |
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
"packages": [ | |
{ | |
"name": "aws/aws-sdk-php", | |
"version": "2.8.31", | |
"source": { | |
"type": "git", | |
"url": "https://github.com/aws/aws-sdk-php.git", | |
"reference": "64fa4b07f056e338a5f0f29eece75babaa83af68" | |
}, | |
"dist": { |
NewerOlder