Changeset 2353962
- Timestamp:
- 08/06/2020 01:14:09 PM (6 years ago)
- Location:
- remove-schema/trunk
- Files:
-
- 1 deleted
- 5 edited
-
README.txt (modified) (1 diff)
-
admin/partials/remove-schema-admin-display.php (modified) (6 diffs)
-
admin/partials/remove-schema-post-editor-display.php (modified) (2 diffs)
-
includes/class-remove-schema-plugin-review.php (deleted)
-
includes/class-remove-schema.php (modified) (3 diffs)
-
remove-schema.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
remove-schema/trunk/README.txt
r2286662 r2353962 53 53 == Changelog == 54 54 55 = 1.3.4 = 56 * Add multisite support 57 58 = 1.3.3 = 59 * Remove review notice 60 55 61 = 1.3.2 = 56 62 * Bugfixes - page specific markup wouldn't save if everything was unchecked. -
remove-schema/trunk/admin/partials/remove-schema-admin-display.php
r2215002 r2353962 29 29 30 30 <?php 31 include_once( ABSPATH . 'wp-admin/includes/plugin.php' );31 require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); 32 32 33 33 //Grab all options 34 34 $options = get_option($this->plugin_name); 35 36 if (empty($options)) {37 $options = array();38 $options['rm_jsonld'] = false;39 $options['yoast_jsonld'] = false;40 $options['woocommerce_jsonld'] = false;41 $options['woocommerce_mail_jsonld'] = false;42 $options['schema_pro'] = false;43 $options['microdata'] = false;44 $options['rdfa'] = false;45 $options['generatepress_schema'] = false;46 $options['remove_hentry_schema'] = false;47 }48 35 49 36 // Schema … … 58 45 $remove_hentry_schema = $options['remove_hentry_schema']; 59 46 60 ?> 47 function pluginnl_plugin_is_active( $pluginpath ){ 48 if ( is_multisite() ) { 49 if(is_plugin_active_for_network( $pluginpath ) || is_plugin_active( $pluginpath )){ 50 $active = true; 51 }else{ 52 $active = false; 53 } 54 } else { 55 $active = is_plugin_active( $pluginpath ) ? true : false; 56 } 57 return $active; 58 } 61 59 62 <?php63 60 settings_fields($this->plugin_name); 64 61 do_settings_sections($this->plugin_name); … … 70 67 71 68 <!-- remove Yoast JSONLD --> 72 <?php if ( is_plugin_active( 'wordpress-seo/wp-seo.php' ) ) { ?>69 <?php if ( pluginnl_plugin_is_active( 'wordpress-seo/wp-seo.php' ) ) { ?> 73 70 <fieldset> 74 71 <legend class="screen-reader-text"><span><?php _e('Remove Yoast JSON-LD', $this->plugin_name); ?></span></legend> … … 81 78 82 79 <!-- remove WooCommerce JSONLD --> 83 <?php if ( is_plugin_active( 'woocommerce/woocommerce.php' ) ) { ?>80 <?php if ( pluginnl_plugin_is_active( 'woocommerce/woocommerce.php' ) ) { ?> 84 81 <fieldset> 85 82 <legend class="screen-reader-text"><span><?php _e('Remove WooCommerce JsonLD', $this->plugin_name); ?></span></legend> … … 92 89 93 90 <!-- remove JSONLD in WooCommerce emails --> 94 <?php if ( is_plugin_active( 'woocommerce/woocommerce.php' ) ) { ?>91 <?php if ( pluginnl_plugin_is_active( 'woocommerce/woocommerce.php' ) ) { ?> 95 92 <fieldset> 96 93 <legend class="screen-reader-text"><span><?php _e('Remove WooCommerce JsonLD in Emails', $this->plugin_name); ?></span></legend> … … 103 100 104 101 <!-- Remove schema pro schema --> 105 <?php if ( is_plugin_active( 'wp-schema-pro/wp-schema-pro.php' ) ) { ?>102 <?php if ( pluginnl_plugin_is_active( 'wp-schema-pro/wp-schema-pro.php' ) ) { ?> 106 103 <fieldset> 107 104 <legend class="screen-reader-text"><span><?php _e('Remove Schema pro JSON-LD', $this->plugin_name); ?></span></legend> -
remove-schema/trunk/admin/partials/remove-schema-post-editor-display.php
r2249025 r2353962 36 36 $microdata = $options['microdata']; 37 37 $rdfa = $options['rdfa']; 38 39 function pluginnl_plugin_is_active( $pluginpath ){ 40 if ( is_multisite() ) { 41 if(is_plugin_active_for_network( $pluginpath ) || is_plugin_active( $pluginpath )){ 42 $active = true; 43 }else{ 44 $active = false; 45 } 46 } else { 47 $active = is_plugin_active( $pluginpath ) ? true : false; 48 } 49 return $active; 50 } 38 51 ?> 39 52 <input class="hidden" style="display:none;" type="text" id="<?php echo $this->plugin_name; ?>-fake-field" name="<?php echo $this->plugin_name; ?>[fake_field]" value="1" /> … … 48 61 <?php esc_attr_e('Remove all JSON-LD', $this->plugin_name); ?></br> 49 62 50 <?php if ( is_plugin_active( 'wordpress-seo/wp-seo.php' ) ) { ?>63 <?php if ( pluginnl_plugin_is_active( 'wordpress-seo/wp-seo.php' ) ) { ?> 51 64 <input type="checkbox" id="<?php echo $this->plugin_name; ?>-yoast-json-ld" name="<?php echo $this->plugin_name; ?>[yoast_jsonld]" value="1" <?php checked($yoast_jsonld, 1); ?> /> 52 65 <?php esc_attr_e('Remove Yoast JSON-LD', $this->plugin_name); ?></br> 53 66 <?php } ?> 54 67 55 <?php if ( is_plugin_active( 'woocommerce/woocommerce.php' ) ) { ?>68 <?php if ( pluginnl_plugin_is_active( 'woocommerce/woocommerce.php' ) ) { ?> 56 69 <input type="checkbox" id="<?php echo $this->plugin_name; ?>-woocommerce-json-ld" name="<?php echo $this->plugin_name; ?>[woocommerce_jsonld]" value="1" <?php checked($woocommerce_jsonld, 1); ?> /> 57 70 <?php esc_attr_e('Remove WooCommerce JSON-LD', $this->plugin_name); ?></br> 58 71 <?php } ?> 59 72 60 <?php if ( is_plugin_active( 'wp-schema-pro/wp-schema-pro.php' ) ) { ?>73 <?php if ( pluginnl_plugin_is_active( 'wp-schema-pro/wp-schema-pro.php' ) ) { ?> 61 74 <input type="checkbox" id="<?php echo $this->plugin_name; ?>-schema-pro" name="<?php echo $this->plugin_name; ?>[schema_pro]" value="1" <?php checked($schema_pro, 1); ?> /> 62 75 <?php esc_attr_e('Remove Schema pro JSON-LD', $this->plugin_name); ?></br> -
remove-schema/trunk/includes/class-remove-schema.php
r2200104 r2353962 71 71 $this->version = REMOVE_SCHEMA_VERSION; 72 72 } else { 73 $this->version = '1. 0.0';73 $this->version = '1.3.4'; 74 74 } 75 75 $this->plugin_name = 'remove-schema'; … … 128 128 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-remove-schema-public.php'; 129 129 130 /**131 * The class responsible prompting a review notice one week after installing the plugin132 */133 require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-remove-schema-plugin-review.php';134 135 136 130 $this->loader = new Remove_Schema_Loader(); 137 131 … … 186 180 // Save/Update page specific options 187 181 $this->loader->add_action('save_post', $plugin_post_editor, 'options_update'); 188 189 new Remove_Schema_Plugin_Review( array(190 'slug' => 'remove-schema', // The plugin slug191 'name' => 'Remove Schema', // The plugin name192 'time_limit' => WEEK_IN_SECONDS, // The time limit at which notice is shown193 ) );194 182 195 183 } -
remove-schema/trunk/remove-schema.php
r2249025 r2353962 17 17 * Plugin URI: https://plugin.nl/en/remove-schema-plugin/ 18 18 * Description: Remove all Microdata, RDFa and/or JSON-ld that you don’t want on your page. 19 * Version: 1.3. 219 * Version: 1.3.4 20 20 * Author: Plugin.nl 21 21 * Author URI: https://plugin.nl/en/remove-schema-plugin/ … … 34 34 * Currently plugin version. 35 35 */ 36 define( 'REMOVE_SCHEMA_VERSION', '1.3. 2' );36 define( 'REMOVE_SCHEMA_VERSION', '1.3.4' ); 37 37 38 38 /**
Note: See TracChangeset
for help on using the changeset viewer.