| @@ -43,9 +43,10 @@ | ||
| 43 | 43 | // Register metaboxes |
| 44 | 44 | require_once( WINP_PLUGIN_DIR . '/admin/metaboxes/base-options.php' ); |
| 45 | 45 | WINP_Helper::register_factory_metaboxes( new WINP_BaseOptionsMetaBox( $plugin ), WINP_SNIPPETS_POST_TYPE, $plugin ); |
| 46 | 46 | |
| 47 | - if ( ( defined( 'FACTORY_ADVERTS_DEBUG' ) && FACTORY_ADVERTS_DEBUG ) || ! WINP_Plugin::app()->premium->is_activate() ) { | |
| 47 | + //if ( current_user_can( 'install_plugins' ) && ! is_plugin_active( 'robin-image-optimizer/robin-image-optimizer.php' ) ) { | |
| 48 | + if ( ! WINP_Plugin::app()->premium->is_activate() ) { | |
| 48 | 49 | require_once( WINP_PLUGIN_DIR . '/admin/metaboxes/info.php' ); |
| 49 | 50 | WINP_Helper::register_factory_metaboxes( new WINP_InfoMetaBox( $plugin ), WINP_SNIPPETS_POST_TYPE, $plugin ); |
| 50 | 51 | } |
| 51 | 52 | |
| @@ -62,12 +63,12 @@ | ||
| 62 | 63 | // you need to show the page "What's new?" |
| 63 | 64 | if ( ! WINP_Plugin::app()->isNetworkAdmin() ) { |
| 64 | 65 | $about_page_viewed = WINP_Plugin::app()->request->get( 'wbcr_inp_about_page_viewed', null ); |
| 65 | 66 | if ( is_null( $about_page_viewed ) ) { |
| 66 | - if ( WINP_Helper::is_need_show_about_page() && current_user_can( 'manage_options' ) ) { | |
| 67 | + if ( WINP_Helper::is_need_show_about_page() ) { | |
| 67 | 68 | try { |
| 68 | 69 | $redirect_url = ''; |
| 69 | - if ( class_exists( 'Wbcr_FactoryPages432' ) ) { | |
| 70 | + if ( class_exists( 'Wbcr_FactoryPages419' ) ) { | |
| 70 | 71 | $redirect_url = WINP_Plugin::app()->getPluginPageUrl( 'about', [ 'wbcr_inp_about_page_viewed' => 1 ] ); |
| 71 | 72 | } |
| 72 | 73 | if ( $redirect_url ) { |
| 73 | 74 | wp_safe_redirect( $redirect_url ); |
| @@ -72,9 +73,9 @@ | ||
| 72 | 73 | if ( $redirect_url ) { |
| 73 | 74 | wp_safe_redirect( $redirect_url ); |
| 74 | 75 | die(); |
| 75 | 76 | } |
| 76 | - } catch ( Exception $e ) { | |
| 77 | + } catch( Exception $e ) { | |
| 77 | 78 | } |
| 78 | 79 | } |
| 79 | 80 | } else { |
| 80 | 81 | if ( WINP_Helper::is_need_show_about_page() ) { |
| @@ -159,11 +160,11 @@ | ||
| 159 | 160 | background: url("<?php echo $shortcode_icon ?>") center no-repeat; |
| 160 | 161 | } |
| 161 | 162 | </style> |
| 162 | 163 | <script> |
| 163 | - var wbcr_inp_tinymce_snippets_button_title = '<?php echo $shortcode_title ?>'; | |
| 164 | - var wbcr_inp_post_tinymce_nonce = '<?php echo wp_create_nonce( 'wbcr_inp_tinymce_post_nonce' ) ?>'; | |
| 165 | - var wbcr_inp_shortcode_snippets = <?php echo $shortcode_snippets_json ?>; | |
| 164 | + var wbcr_inp_tinymce_snippets_button_title = '<?php echo $shortcode_title ?>'; | |
| 165 | + var wbcr_inp_post_tinymce_nonce = '<?php echo wp_create_nonce( 'wbcr_inp_tinymce_post_nonce' ) ?>'; | |
| 166 | + var wbcr_inp_shortcode_snippets = <?php echo $shortcode_snippets_json ?>; | |
| 166 | 167 | </script> |
| 167 | 168 | <!-- /end <?php echo WINP_Plugin::app()->getPluginTitle() ?> for tinymce --> |
| 168 | 169 | <?php |
| 169 | 170 | } |
| @@ -174,11 +175,11 @@ | ||
| 174 | 175 | |
| 175 | 176 | /** |
| 176 | 177 | * Deactivate snippet on trashed |
| 177 | 178 | * |
| 179 | + * @since 2.0.6 | |
| 180 | + * | |
| 178 | 181 | * @param $post_id |
| 179 | - * | |
| 180 | - * @since 2.0.6 | |
| 181 | 182 | * |
| 182 | 183 | */ |
| 183 | 184 | function wbcr_inp_trash_post( $post_id ) { |
| 184 | 185 | $post_type = get_post_type( $post_id ); |