Plugin Directory

Changeset 2215002


Ignore:
Timestamp:
12/19/2019 10:59:49 AM (6 years ago)
Author:
timvaniersel
Message:

code cleanup

Location:
remove-schema/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • remove-schema/trunk/README.txt

    r2214506 r2215002  
    4141== Frequently Asked Questions ==
    4242
    43 = Can you make an exception for a plugin =
     43= Can you make add support for a plugin =
    4444
    45 No, you'll have to select the schema that you want gone. If we have missed a plugin please create an issue on [Github](https://github.com/Websitescanner/remove-schema "Remove Schema Github").
     45Yes we can. If we have missed a plugin please create an issue on [Github](https://github.com/Plugin-nl/remove-schema "Remove Schema Github").
    4646
    4747
     
    5252
    5353== Changelog ==
     54
     55= 1.3 =
     56* Improved security
     57* Add page specific support on all page types
    5458
    5559= 1.2 =
  • remove-schema/trunk/admin/class-remove-schema-post-editor.php

    r2200104 r2215002  
    5656
    5757    public function add_meta_box() {
    58         $screens = array( 'post', 'page' );
     58        $screens = get_post_types();
    5959
    6060        foreach ( $screens as $screen ) {
     
    8585
    8686    public function validate($input) {
    87             //var_dump($input);
    88 
    8987            // check if this isn't an auto save
    9088            if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
  • remove-schema/trunk/admin/partials/remove-schema-admin-display.php

    r2200104 r2215002  
    3333    //Grab all options
    3434    $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    }
    3548
    3649    // Schema
  • remove-schema/trunk/admin/partials/remove-schema-post-editor-display.php

    r2200104 r2215002  
    2929  $options['rdfa'] = false;
    3030}
    31 foreach ($options as $key => $option) {
    32   ${$key} = $option;
    33 }
     31$keep_schema = $option['keep_schema'];
     32$rm_jsonld = $options['rm_jsonld'];
     33$yoast_jsonld = $options['yoast_jsonld'];
     34$woocommerce_jsonld = $options['woocommerce_jsonld'];
     35$schema_pro = $options['schema_pro'];
     36$microdata = $options['microdata'];
     37$rdfa = $options['rdfa'];
    3438?>
    3539<input type="checkbox" id="<?php echo $this->plugin_name; ?>-keep-schema" name="<?php echo $this->plugin_name; ?>[keep_schema]" value="1" <?php checked($keep_schema, 1); ?> />
  • remove-schema/trunk/remove-schema.php

    r2200104 r2215002  
    1717 * Plugin URI:        https://plugin.nl/en/remove-schema-plugin/
    1818 * Description:       Remove all Microdata, RDFa and/or JSON-ld that you don’t want on your page.
    19  * Version:           1.2.0
     19 * Version:           1.3.0
    2020 * Author:            Plugin.nl
    2121 * Author URI:        https://plugin.nl/en/remove-schema-plugin/
     
    3434 * Currently plugin version.
    3535 */
    36 define( 'REMOVE_SCHEMA_VERSION', '1.2.0' );
     36define( 'REMOVE_SCHEMA_VERSION', '1.3.0' );
    3737
    3838/**
Note: See TracChangeset for help on using the changeset viewer.