Plugin Directory

Changeset 1445844


Ignore:
Timestamp:
06/29/2016 03:53:45 PM (10 years ago)
Author:
mainehost
Message:

Update to 1.3.5

Location:
seo-enforcer/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • seo-enforcer/trunk/admin.js

    r1156496 r1445844  
    5252        else if(title_check !== true) {
    5353            $('#title_length_set_notice').html(seoe_ajax.title_length);
    54             $('#title_length_char_notice').html(title_check);           
     54            $('#title_length_char_notice').html(title_check);
    5555            $('#seoe_title_length').show();
    5656        }
     
    6161        }
    6262        else if($('#wpseo_desc').length) {
    63             var seoe_desc_field = 'wpseo_desc';         
     63            var seoe_desc_field = 'wpseo_desc';
    6464        }
    6565        else {
     
    7474        else if(desc_check !== true) {
    7575            $('#desc_length_set_notice').html(seoe_ajax.desc_length);
    76             $('#desc_length_char_notice').html(desc_check);                     
     76            $('#desc_length_char_notice').html(desc_check);
    7777            $('#seoe_desc_length').show();
    7878        }
  • seo-enforcer/trunk/readme.txt

    r1309158 r1445844  
    1 === SEO Enforcer for Yoast SEO ===
     1=== SEO Enforcer ===
    22Contributors: mainehost, godthor
    33Tags: SEO, WordPress SEO
    44Requires at least: 3.9
    5 Tested up to: 4.4
    6 Stable tag: 1.3.4
     5Tested up to: 4.5.3
     6Stable tag: 1.3.5
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3838== Changelog ==
    3939
     40= 1.3.5 =
     41
     42* **Updates**
     43
     44    * Compatability check with the latest version of Yoast SEO and WordPress.
     45
    4046= 1.3.4 =
    4147
     
    8389
    8490* **New Features**
    85    
     91
    8692    * Image alt and title attribute checks. More info on the settings page.
    8793
     
    105111
    106112* **Bug Fixes**
    107    
     113
    108114    * Fixed an issue where lengths would be shorter than defined if using the ... truncation method.
    109115    * You can now turn off the SEO notices in settings. It was getting stuck on and wouldn't allow you to disable it.
     
    169175* **Known Issues**
    170176
    171     * Upgrading WordPress SEO will deactivate SEO Enforcer so you have to activate it after the upgrade. I'm hoping to fix this very soon. 
     177    * Upgrading WordPress SEO will deactivate SEO Enforcer so you have to activate it after the upgrade. I'm hoping to fix this very soon.
    172178
    173179= 1.0.2 =
     
    193199== Upgrade Notice ==
    194200
     201= 1.3.5 =
     202
     203Compatibility testing.
     204
    195205= 1.3.4 =
    196206
  • seo-enforcer/trunk/seoe.php

    r1245332 r1445844  
    33/*
    44    Plugin Name: SEO Enforcer
    5     Plugin URI: https://mainehost.com/wordpress-plugins/   
    6     Description: Enforces SEO restrictions. Requires WordPress SEO by Yoast.
     5    Plugin URI: https://mainehost.com/wordpress-plugins/
     6    Description: Enforces SEO restrictions. Requires Yoast SEO.
    77    Author: Maine Hosting Solutions
    88    Author URI: http://mainehost.com/
    9     Version: 1.3.4
     9    Version: 1.3.5
    1010*/
    1111
     
    4141            define('SEOE_NAME','SEO Enforcer');
    4242            define('SEOE_MENU_NAME','SEO Enforcer');
    43             define('SEOE_WP_SEO_NAME','WordPress SEO by Yoast');
     43            define('SEOE_WP_SEO_NAME','Yoast SEO');
    4444            define('SEOE_WPSEO_PATH','wordpress-seo/wp-seo.php');
    4545            define('SEOE_WPSEOP_PATH','wordpress-seo-premium/wp-seo-premium.php');
     
    6363
    6464            return array_merge($mylinks, $links);
    65         }   
     65        }
    6666        function upgrade_check() {
    6767            $version = get_option('seoe_settings_version');
     
    8787
    8888                    delete_option('seoe_post_notices');
    89                     delete_option('seoe_title');                   
    90                     delete_option('seoe_title_length');                 
    91                     delete_option('seoe_title_trunc_type');                 
    92                     delete_option('seoe_title_trunc_ex');                   
    93                     delete_option('seoe_desc_trunc_type');                 
    94                     delete_option('seoe_desc_trunc_ex');                   
    95                     delete_option('seoe_h1');   
     89                    delete_option('seoe_title');
     90                    delete_option('seoe_title_length');
     91                    delete_option('seoe_title_trunc_type');
     92                    delete_option('seoe_title_trunc_ex');
     93                    delete_option('seoe_desc_trunc_type');
     94                    delete_option('seoe_desc_trunc_ex');
     95                    delete_option('seoe_h1');
    9696                    delete_option('seoe_h1_ex');
    9797                }
     
    9999                update_option('seoe_settings_version', SEOE_SETTINGS_VER);
    100100            }
    101         }   
     101        }
    102102        /**
    103103         * Creates the menu in WP admin for the plugin.
     
    127127                    $title_length = $settings['seoe_title_length'];
    128128                    $title_exceptions = $settings['seoe_title_trunc_ex'];
    129                
     129
    130130                    if($title_exceptions) {
    131131                        $ex = array_map('trim', explode(',', $title_exceptions));
     
    147147
    148148                        if($screen->base == 'post' && in_array($post_id, $ex)) $desc_length = 9999;
    149                     }                   
     149                    }
    150150                }
    151151                else {
     
    164164        function post_notice() {
    165165            echo '<div class="update-nag" style="display: none;" id="seoe_title_error">The SEO Title field should be manually filled in.</div>';
    166             echo '<div class="update-nag" style="display: none;" id="seoe_desc_error">The Meta Description field should be manually filled in.</div>'; 
     166            echo '<div class="update-nag" style="display: none;" id="seoe_desc_error">The Meta Description field should be manually filled in.</div>';
    167167            echo '<div class="error" style="display: none;" id="seoe_title_length"><p>The SEO Title field is longer than the recommended length of <span id="title_length_set_notice"></span> by <span id="title_length_char_notice"></span> characters</p></div>';
    168             echo '<div class="error" style="display: none;" id="seoe_desc_length"><p>The Meta Description is longer than the recommended length of  <span id="desc_length_set_notice"></span> by <span id="desc_length_char_notice"></span> characters</p></div>';             
     168            echo '<div class="error" style="display: none;" id="seoe_desc_length"><p>The Meta Description is longer than the recommended length of  <span id="desc_length_set_notice"></span> by <span id="desc_length_char_notice"></span> characters</p></div>';
    169169        }
    170170        /**
     
    173173        function admin() {
    174174            require 'seoe_admin.php';
    175         }   
     175        }
    176176        /**
    177177         * Run when this plugin is activated.
     
    179179        function activate() {
    180180            $this->check_dependencies();
    181         }           
     181        }
    182182        /**
    183183         * Used to check if dependencies are active when a plugin is deactivated.
    184184         */
    185         function notice_check() {       
     185        function notice_check() {
    186186            $this->dependencies();
    187187
     
    197197                if($settings['seoe_h1'] || $settings['seoe_img']) add_filter('the_content', array($this,'content_check'), 9999);
    198198            }
    199         }       
     199        }
    200200        /**
    201201         * Gives an error if trying to activate the plugin without dependencies.
     
    224224         * @param type $stage Whether it's currently activating or deactivating a plugin.
    225225         */
    226         function dependencies() {       
     226        function dependencies() {
    227227            if((!in_array(SEOE_WPSEO_PATH, apply_filters('active_plugins', get_option('active_plugins')))) && ((!in_array(SEOE_WPSEOP_PATH, apply_filters('active_plugins', get_option('active_plugins')))))) {
    228                 $this->dep_error .= sprintf(SEOE_DEP_ERROR, SEOE_WP_SEO_NAME, SEOE_WP_SEO_NAME);               
     228                $this->dep_error .= sprintf(SEOE_DEP_ERROR, SEOE_WP_SEO_NAME, SEOE_WP_SEO_NAME);
    229229            }
    230230        }
     
    265265
    266266            if($new_meta) return $new_meta;
    267             else return $meta;         
     267            else return $meta;
    268268        }
    269269        function title_check($title) {
     
    279279
    280280                if(!$length) $length = SEOE_TITLE_LENGTH;
    281    
     281
    282282                if($ex) {
    283                     $ex = array_map('trim', explode(',', $ex));                 
     283                    $ex = array_map('trim', explode(',', $ex));
    284284
    285285                    if(is_home()) {
     
    308308         */
    309309        function desc_check($desc) {
    310             global $post;           
     310            global $post;
    311311            $settings = get_option('seoe_settings');
    312312
     
    321321
    322322                if($ex) {
    323                     $ex = array_map('trim', explode(',', $ex));                 
     323                    $ex = array_map('trim', explode(',', $ex));
    324324
    325325                    if(is_home()) {
     
    373373                    }
    374374                    if($proceed) {
    375                         $content = $this->content_clean($content);             
     375                        $content = $this->content_clean($content);
    376376                    }
    377377                }
     
    421421         * @param mixed $content The content passed it from the filter function.
    422422         * @return mixed
    423          */     
     423         */
    424424        function content_clean($content) {
    425425            $content = str_replace('<h1','<h2', $content);
Note: See TracChangeset for help on using the changeset viewer.