This file contains hidden or 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 | |
/* | |
* Disable theme updates | |
* | |
* @param array $r Response header | |
* @param string $url The update URL | |
*/ | |
function slug_hidden_theme( $r, $url ) { | |
if ( 0 !== strpos( $url, 'http://api.wordpress.org/themes/update-check' ) ) |
This file contains hidden or 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 | |
/* | |
* Disable plugin updates | |
* | |
* @param array $r Response header | |
* @param string $url The update URL | |
*/ | |
function slug_hidden_plugin( $r, $url ) { | |
if ( 0 !== strpos( $url, 'http://api.wordpress.org/plugins/update-check' ) ) | |
return $r; // Not a plugin update request. Bail immediately. |
This file contains hidden or 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 | |
check_ajax_referer( 'random_nonce_name' ); | |
?> |
This file contains hidden or 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 | |
check_admin_referer( 'random_nonce_name' ); | |
?> |
This file contains hidden or 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 | |
$link = home_url(); | |
$link = wp_nonce_url( $link, 'random_nonce_name' ); | |
?> | |
<a href="<?php echo $link; ?>">link</a> |
This file contains hidden or 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
<form action="" method="POST"> | |
<?php wp_nonce_field( 'random_nonce_name' ); ?> | |
... | |
</form> |
This file contains hidden or 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 if ( current_user_can( 'manage_options' ) ) { | |
update_option( 'random_option', $_POST['random_option'] ); | |
} | |
?> |
This file contains hidden or 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 | |
update_option( 'random_option', $_POST['random_option'] ); | |
?> |
This file contains hidden or 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 | |
update_option( 'random_option', $_POST['random_option'] ) | |
?> | |
<form action="" method="POST"> | |
<input type="text" name="random_option" value="" /> | |
<input type=submit" value="Submit" /> | |
</form> |
NewerOlder