Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * @link http://wordpress.stackexchange.com/a/137278/26350
- */
- add_action( 'admin_init', function(){
- // Current:
- $wpp_rg = get_option( 'wpp_rg' );
- // Input:
- $input = filter_input( INPUT_POST, 'wpp_rg', FILTER_SANITIZE_NUMBER_INT );
- // Update:
- if ( ! empty( $input ) )
- update_option( 'wpp_rg', $input );
- // Active:
- if ( '1' === $wpp_rg )
- remove_action( 'admin_notices', 'update_nag', 3 );
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement