daily pastebin goal
16%
SHARE
TWEET

Untitled

a guest May 16th, 2018 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. my_premium_shortcodes(); // Fires early in my php file
  2.  
  3. function my_premium_shortcodes(){
  4.     $status     = get_option( 'key_status' );
  5.  
  6.     if( $status !== false && $status == 'valid' ) {
  7.  
  8.         add_shortcode('shortcode_handle_1','shortcode_function_1');
  9.         add_shortcode('shortcode_handle_2','shortcode_function_2');
  10.  
  11.     } else {
  12.  
  13.         remove_shortcode('shortcode_handle_1','shortcode_function_1');
  14.         remove_shortcode('shortcode_handle_2','shortcode_function_2');
  15.     }
  16.  
  17. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top