| @@ -84,11 +84,8 @@ | ||
| 84 | 84 | |
| 85 | 85 | // Enqueue Category CSS. |
| 86 | 86 | wp_enqueue_style( 'convertkit-category', CONVERTKIT_PLUGIN_URL . 'resources/backend/css/category.css', array(), CONVERTKIT_PLUGIN_VERSION ); |
| 87 | 87 | |
| 88 | - // Enqueue Refresh Resources CSS. | |
| 89 | - wp_enqueue_style( 'convertkit-admin-refresh-resources', CONVERTKIT_PLUGIN_URL . 'resources/backend/css/refresh-resources.css', array(), CONVERTKIT_PLUGIN_VERSION ); | |
| 90 | - | |
| 91 | 88 | /** |
| 92 | 89 | * Enqueue CSS when editing a Category that outputs |
| 93 | 90 | * ConvertKit Plugin settings. |
| 94 | 91 | * |
| @@ -113,12 +110,17 @@ | ||
| 113 | 110 | return false; |
| 114 | 111 | } |
| 115 | 112 | |
| 116 | 113 | // Bail if we are not editing a Category. |
| 117 | - if ( convertkit_get_current_screen( 'id' ) !== 'edit-category' ) { | |
| 114 | + if ( ! function_exists( 'get_current_screen' ) ) { | |
| 118 | 115 | return false; |
| 119 | 116 | } |
| 117 | + $screen = get_current_screen(); | |
| 120 | 118 | |
| 119 | + if ( $screen->id !== 'edit-category' ) { | |
| 120 | + return false; | |
| 121 | + } | |
| 122 | + | |
| 121 | 123 | // Bail if the API hasn't been configured. |
| 122 | 124 | $settings = new ConvertKit_Settings(); |
| 123 | 125 | if ( ! $settings->has_access_and_refresh_token() ) { |
| 124 | 126 | return false; |
| @@ -198,9 +200,9 @@ | ||
| 198 | 200 | |
| 199 | 201 | // Build metadata. |
| 200 | 202 | $meta = array( |
| 201 | 203 | 'form' => ( isset( $_POST['wp-convertkit']['form'] ) ? intval( $_POST['wp-convertkit']['form'] ) : '' ), |
| 202 | - 'form_position' => ( isset( $_POST['wp-convertkit']['form_position'] ) ? sanitize_text_field( wp_unslash( $_POST['wp-convertkit']['form_position'] ) ) : '' ), | |
| 204 | + 'form_position' => ( isset( $_POST['wp-convertkit']['form_position'] ) ? $_POST['wp-convertkit']['form_position'] : '' ), | |
| 203 | 205 | ); |
| 204 | 206 | |
| 205 | 207 | // Save metadata. |
| 206 | 208 | $convertkit_term = new ConvertKit_Term( $term_id ); |