Advertisement
phpface

Untitled

Dec 24th, 2015
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.66 KB | None | 0 0
  1. require get_template_directory() . '/inc/wpes-envato-theme-update.php';
  2.  
  3. if( ! function_exists( 'marstheme_theme_update' ) ){
  4.     function marstheme_theme_update() {
  5.         global $marstheme_global_data;
  6.  
  7.         $purchase_code = isset( $marstheme_global_data['purchase_code'] ) ? $marstheme_global_data['purchase_code'] : null;
  8.         $access_token = isset( $marstheme_global_data['access_token'] ) ? $marstheme_global_data['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' , 'marstheme_theme_update' );
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement