marstheme

Untitled

Jan 20th, 2016
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.60 KB | None | 0 0
  1. require_once ( MARS_THEME_DIR . '/includes/wpes-envato-theme-update.php');
  2.  
  3. if( ! function_exists( 'mars_theme_update' ) ){
  4.     function mars_theme_update() {
  5.         global $videotube;
  6.        
  7.         $purchase_code = isset( $videotube['purchase_code'] ) ? $videotube['purchase_code'] : null;
  8.         $access_token = isset( $videotube['access_token'] ) ? $videotube['access_token'] : null;
  9.         if( ! empty( $purchase_code ) && ! empty( $access_token ) ){
  10.             new WPES_Envato_Theme_Update( basename( get_template_directory() ) , $purchase_code , $access_token , false );
  11.         }
  12.     }
  13.     add_action( 'init' , 'mars_theme_update' );
  14. }
Add Comment
Please, Sign In to add comment