Skip to content

Commit

Permalink
Merge pull request #227 from semperfiwebdesign/development
Browse files Browse the repository at this point in the history
pulling dev into master for 2.3.4.1
  • Loading branch information
michaeltorbert committed Apr 20, 2016
2 parents 5d39a15 + 91561c1 commit 126dbe2
Show file tree
Hide file tree
Showing 11 changed files with 73 additions and 21 deletions.
4 changes: 3 additions & 1 deletion admin/aioseop_module_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,6 @@ function default_bad_bots() {
"wsr-agent",
"WWW-Collector-E",
"Xenu",
"yandex",
"Zao",
"Zeus",
"ZyBORG",
Expand Down Expand Up @@ -1229,6 +1228,9 @@ function add_help_text_links() {

/**
* Load scripts and styles for metaboxes.
*
* edit-tags exists only for pre 4.5 support... remove when we drop 4.5 support.
* Also, that check and others should be pulled out into their own functions
*/
function enqueue_metabox_scripts( ) {
$screen = '';
Expand Down
20 changes: 12 additions & 8 deletions aioseop_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1083,21 +1083,20 @@ function aioseop_show_pointer( handle, value ) {

function add_page_hooks() {

global $aioseop_options;
global $aioseop_options;

$post_objs = get_post_types( '', 'objects' );
$pt = array_keys( $post_objs );
$rempost = array( 'revision', 'nav_menu_item' );
$pt = array_diff( $pt, $rempost );
$post_types = Array();
$default_posttypes = Array('Posts','Pages','Media');

$aiosp_enablecpost = '';
if (isset($_REQUEST['aiosp_enablecpost'])) $aiosp_enablecpost = $_REQUEST['aiosp_enablecpost'];

foreach ( $pt as $p ) {
if ( !empty( $post_objs[$p]->label ) ){
if (in_array($post_objs[$p]->label,$default_posttypes) && empty( $aioseop_options['aiosp_enablecpost'] )){
if ( $post_objs[$p]->_builtin && empty( $aioseop_options['aiosp_enablecpost'] )){
$post_types[$p] = $post_objs[$p]->label;
}elseif (!empty( $aioseop_options['aiosp_enablecpost'] ) || $aiosp_enablecpost == 'on' ) {
$post_types[$p] = $post_objs[$p]->label;
Expand All @@ -1107,6 +1106,13 @@ function add_page_hooks() {
$post_types[$p] = $p;
}
}

foreach ($pt as $p){
if ( !empty( $post_objs[$p]->label)){
$all_post_types[$p] = $post_objs[$p]->label;
}
}

$taxes = get_taxonomies( '', 'objects' );
$tx = array_keys( $taxes );
$remtax = array( 'nav_menu', 'link_category', 'post_format' );
Expand All @@ -1118,7 +1124,7 @@ function add_page_hooks() {
else
$taxes[$t] = $t;
$this->default_options["posttypecolumns"]['initial_options'] = $post_types;
$this->default_options["cpostactive"]['initial_options'] = $post_types;
$this->default_options["cpostactive"]['initial_options'] = $all_post_types;
$this->default_options["cpostnoindex"]['initial_options'] = $post_types;
$this->default_options["cpostnofollow"]['initial_options'] = $post_types;
$this->default_options["cpostnoodp"]['initial_options'] = $post_types;
Expand Down Expand Up @@ -3422,7 +3428,7 @@ function admin_menu() {

if ( $custom_menu_order ) {
add_filter( 'custom_menu_order', '__return_true' );
add_filter( 'menu_order', array( $this, 'set_menu_order' ) );
add_filter( 'menu_order', array( $this, 'set_menu_order' ), 11 );
}

if ( $donated ) {
Expand Down Expand Up @@ -3463,10 +3469,8 @@ function admin_menu() {
$this->locations['aiosp']['display'] = Array( 'post', 'page' );
}

if ( $custom_menu_order )

add_menu_page( $menu_name, $menu_name, apply_filters( 'manage_aiosp', 'aiosp_manage_seo' ) , $file, Array( $this, 'display_settings_page' ) );
else
add_utility_page( $menu_name, $menu_name, apply_filters( 'manage_aiosp', 'aiosp_manage_seo' ), $file, Array( $this, 'display_settings_page' ) );

add_meta_box('aioseop-list', __( "Join Our Mailing List", 'all-in-one-seo-pack' ), array( 'aiosp_metaboxes', 'display_extra_metaboxes'), 'aioseop_metaboxes', 'normal', 'core');
if ( AIOSEOPPRO ){
Expand Down
6 changes: 3 additions & 3 deletions all_in_one_seo_pack.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: All In One SEO Pack
Plugin URI: http://semperfiwebdesign.com
Description: Out-of-the-box SEO for your WordPress blog. Features like XML Sitemaps, SEO for custom post types, SEO for blogs or business sites, SEO for ecommerce sites, and much more. Almost 30 million downloads since 2007.
Version: 2.3.4
Version: 2.3.4.1
Author: Michael Torbert
Author URI: http://michaeltorbert.com
Text Domain: all-in-one-seo-pack
Expand All @@ -29,11 +29,11 @@

/**
* @package All-in-One-SEO-Pack
* @version 2.3.4
* @version 2.3.4.1
*/

if(!defined('AIOSEOPPRO')) define('AIOSEOPPRO', false);
if ( ! defined( 'AIOSEOP_VERSION' ) ) define( 'AIOSEOP_VERSION', '2.3.4' );
if ( ! defined( 'AIOSEOP_VERSION' ) ) define( 'AIOSEOP_VERSION', '2.3.4.1' );
global $aioseop_plugin_name;
$aioseop_plugin_name = 'All in One SEO Pack';

Expand Down
2 changes: 0 additions & 2 deletions css/modules/aioseop_module.css
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,6 @@ div.aioseop_tip_icon:before {
#wincher22 {
background-image: url(../../modules/images/banner22.jpg);
}
}

.aioseop_content {
min-width: 760px;
clear: left;
Expand Down
Binary file modified i18n/all-in-one-seo-pack-es_AR.mo
Binary file not shown.
Binary file added i18n/all-in-one-seo-pack-lt.mo
Binary file not shown.
Binary file added i18n/all-in-one-seo-pack-nl.mo
Binary file not shown.
Binary file modified i18n/all-in-one-seo-pack-sq.mo
Binary file not shown.
56 changes: 52 additions & 4 deletions inc/aioseop_updates_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ function version_updates() {
$this->do_feature_updates();

}


//TODO: the compare here should be extracted into a function
function do_version_updates( $old_version ) {
global $aioseop_options;

Expand All @@ -60,6 +61,14 @@ function do_version_updates( $old_version ) {
) {
$this->bad_bots_201603();
}

if (
( !AIOSEOPPRO && version_compare( $old_version, '2.3.4.1', '<' ) ) ||
( AIOSEOPPRO && version_compare( $old_version, '2.4.4.1', '<' ) )
) {
$this->bad_bots_remove_yandex_201604();
}


/*
if (
Expand Down Expand Up @@ -96,9 +105,12 @@ function do_feature_updates() {
*/

/**
* Remove overzealous 'DOC' entry which is causing false-positive bad
* bot blocking.
*/
* Remove overzealous 'DOC' entry which is causing false-positive bad
* bot blocking.
*
* @since 2.3.3
*
*/
function bad_bots_201603() {
global $aiosp, $aioseop_options;
// Remove 'DOC' from bad bots list to avoid false positives
Expand All @@ -125,4 +137,40 @@ function bad_bots_201603() {
}
}
}

/**
* Remove 'yandex' entry. This is a major Russian search engine, and no longer needs to be blocked.
*
* @since 2.3.4.1
*
**/

function bad_bots_remove_yandex_201604() {
global $aiosp, $aioseop_options;
// Remove 'yandex' from bad bots list to avoid false positives
if ( isset( $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] ) ) {
$list = $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'];
$list = str_replace(array( "yandex\r\n", "yandex\n"), '', $list);
$aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_blocklist'] = $list;
update_option( 'aioseop_options', $aioseop_options );
$aiosp->update_class_option( $aioseop_options );

if ( isset( $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_htaccess_rules'] ) && 'on' === $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_htaccess_rules'] ){

if (!class_exists( 'All_in_One_SEO_Pack_Bad_Robots' ) ) {
require_once( AIOSEOP_PLUGIN_DIR . 'admin/aioseop_module_class.php');
require_once( AIOSEOP_PLUGIN_DIR . 'modules/aioseop_bad_robots.php');
}

$aiosp_reset_htaccess = new All_in_One_SEO_Pack_Bad_Robots;
$aiosp_reset_htaccess->generate_htaccess_blocklist();
}

if ( !isset( $aioseop_options['modules']['aiosp_bad_robots_options']['aiosp_bad_robots_htaccess_rules'] ) && extract_from_markers( get_home_path() . '.htaccess', 'Bad Bot Blocker' ) ){
insert_with_markers( get_home_path() . '.htaccess', 'Bad Bot Blocker', '' );
}
}
}


}
4 changes: 2 additions & 2 deletions js/modules/aioseop_module.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,8 @@ jQuery(document).ready(function() {
var stringref = jQuery(this).attr("href").split('#')[1];
jQuery('.aioseop_tab:not(#'+stringref+')').hide('slow');
jQuery('.aioseop_tab#' + stringref).show('slow');
jQuery('.aioseop_header_tab[href!=#'+stringref+']').removeClass('active');
jQuery('.aioseop_header_tab[href=#' + stringref+']').addClass('active');
jQuery('.aioseop_header_tab[href!="#'+stringref+'"]').removeClass('active');
jQuery('.aioseop_header_tab[href="#' + stringref+'"]').addClass('active');
return false;
});
});
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtor
Tags: seo, SEO, all in one seo, widget, Post, plugin, admin, posts, shortcode, sidebar, google, twitter, page, images, comments, image, social, search engine optimization, sitemap, WordPress SEO, meta, meta description, xml sitemap, xml sitemaps, google sitemap, sitemaps, robots meta, rss, rss footer, yahoo, bing, news sitemaps, XML News Sitemaps, multisite, canonical, nofollow, noindex, keywords, meta keywords, description, webmaster tools, google webmaster tools, google analytics, seo pack
Requires at least: 3.3
Tested up to: 4.5
Stable tag: 2.3.3.2
Stable tag: 2.3.4.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down

0 comments on commit 126dbe2

Please sign in to comment.