type = $type; if($type == 'ajax'){ add_action( 'wp_ajax_action_appip_do_test', array($this,'appip_do_settings_test_ajax') );// register ajax test }elseif($type ='parent'){ add_action( 'wp_ajax_action_appip_do_test', array($this,'appip_do_settings_test_parent') );// register ajax test } } function appip_do_product_ajax(){ check_ajax_referer( 'appip_ajax_do_product', 'security', true ); if( current_user_can( 'manage_options' ) ){ $test = $this->test_API(); global $wp_scripts; global $wp_styles; if (is_a($wp_scripts, 'WP_Scripts')) $wp_scripts->queue = array(); if (is_a($wp_styles, 'WP_Styles')) $wp_styles->queue = array(); wp_enqueue_style( 'plugin-install' ); wp_enqueue_style( 'wp-admin' ); wp_enqueue_script( 'jquery' ); wp_enqueue_script( 'common' ); wp_enqueue_script( 'plugin-install' ); add_thickbox(); ?>