| @@ -33,29 +33,24 @@ | ||
| 33 | 33 | * @since 1.9.8.0 |
| 34 | 34 | */ |
| 35 | 35 | public function enqueue_assets() { |
| 36 | 36 | |
| 37 | - // Bail if we cannot determine the screen. | |
| 38 | - if ( ! function_exists( 'get_current_screen' ) ) { | |
| 39 | - return; | |
| 40 | - } | |
| 41 | - | |
| 42 | 37 | // Bail if we're not on a Post Type Edit screen. |
| 43 | - $screen = get_current_screen(); | |
| 44 | - if ( $screen->base !== 'edit' ) { | |
| 38 | + if ( convertkit_get_current_screen( 'base' ) !== 'edit' ) { | |
| 45 | 39 | return; |
| 46 | 40 | } |
| 47 | 41 | |
| 48 | 42 | // Bail if the Post isn't a supported Post Type. |
| 49 | - if ( ! in_array( $screen->post_type, convertkit_get_supported_post_types(), true ) ) { | |
| 43 | + if ( ! in_array( convertkit_get_current_screen( 'post_type' ), convertkit_get_supported_post_types(), true ) ) { | |
| 50 | 44 | return; |
| 51 | 45 | } |
| 52 | 46 | |
| 53 | 47 | // Enqueue JS. |
| 54 | - wp_enqueue_script( 'convertkit-admin-quick-edit', CONVERTKIT_PLUGIN_URL . 'resources/backend/js/quick-edit.js', array( 'jquery' ), CONVERTKIT_PLUGIN_VERSION, true ); | |
| 48 | + wp_enqueue_script( 'convertkit-admin-quick-edit', CONVERTKIT_PLUGIN_URL . 'resources/backend/js/quick-edit.js', array(), CONVERTKIT_PLUGIN_VERSION, true ); | |
| 55 | 49 | |
| 56 | 50 | // Enqueue CSS. |
| 57 | 51 | wp_enqueue_style( 'convertkit-admin-bulk-quick-edit', CONVERTKIT_PLUGIN_URL . 'resources/backend/css/bulk-quick-edit.css', array(), CONVERTKIT_PLUGIN_VERSION ); |
| 52 | + wp_enqueue_style( 'convertkit-admin-refresh-resources', CONVERTKIT_PLUGIN_URL . 'resources/backend/css/refresh-resources.css', array(), CONVERTKIT_PLUGIN_VERSION ); | |
| 58 | 53 | |
| 59 | 54 | } |
| 60 | 55 | |
| 61 | 56 | /** |
| @@ -105,9 +100,9 @@ | ||
| 105 | 100 | public function quick_edit_fields() { |
| 106 | 101 | |
| 107 | 102 | // Don't output Quick Edit fields if the API settings have not been defined. |
| 108 | 103 | $settings = new ConvertKit_Settings(); |
| 109 | - if ( ! $settings->has_api_key_and_secret() ) { | |
| 104 | + if ( ! $settings->has_access_and_refresh_token() ) { | |
| 110 | 105 | return; |
| 111 | 106 | } |
| 112 | 107 | |
| 113 | 108 | // Initialize Restrict Content Settings class. |