Skip to content

Commit

Permalink
Merge pull request #1771 from semperfiwebdesign/development
Browse files Browse the repository at this point in the history
Development to master for 2.7
  • Loading branch information
michaeltorbert authored Jul 11, 2018
2 parents b470772 + dcdad47 commit 6b15775
Show file tree
Hide file tree
Showing 13 changed files with 916 additions and 868 deletions.
8 changes: 7 additions & 1 deletion admin/aioseop_module_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1980,6 +1980,12 @@ function add_menu( $parent_slug ) {
} else {
$name = $this->name;
}

if( is_multisite() && is_network_admin() && $name == 'Robots.txt' ){
// Add the robots.txt editor into the network admin menu.
add_menu_page( 'Robots.txt Editor','Robots.txt Editor','edit_themes',plugin_basename( $this->file ),array( $this, 'display_settings_page', ));
}

if ( $this->locations === null ) {
$hookname = add_submenu_page(
$parent_slug, $name, $name, apply_filters( 'manage_aiosp', 'aiosp_manage_seo' ), plugin_basename( $this->file ), array(
Expand Down Expand Up @@ -2306,7 +2312,7 @@ function get_option_html( $args ) {
} else {
$count_desc = __( ' characters. Most search engines use a maximum of %1$s chars for the %2$s.', 'all-in-one-seo-pack' );
}
$buf .= "<br /><input readonly type='text' name='{$prefix}length$n' size='3' maxlength='3' style='width:53px;height:23px;margin:0px;padding:0px 0px 0px 10px;' value='" . $this->strlen( $value ) . "' />"
$buf .= "<br /><input readonly tabindex='-1' type='text' name='{$prefix}length$n' size='3' maxlength='3' style='width:53px;height:23px;margin:0px;padding:0px 0px 0px 10px;' value='" . $this->strlen( $value ) . "' />"
. sprintf( $count_desc, $size, trim( $this->strtolower( $options['name'] ), ':' ) );
if ( ! empty( $onload ) ) {
$buf .= "<script>jQuery( document ).ready(function() { {$onload} });</script>";
Expand Down
2 changes: 1 addition & 1 deletion admin/aioseop_module_manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ function load_module( $mod ) {
if ( 'performance' === $mod && ! is_super_admin() ) {
return false;
}
if ( ( 'file_editor' === $mod || 'robots' === $mod )
if ( ( 'file_editor' === $mod )
&& ( ( defined( 'DISALLOW_FILE_EDIT' ) && DISALLOW_FILE_EDIT )
|| ( defined( 'DISALLOW_FILE_MODS' ) && DISALLOW_FILE_MODS )
|| ! is_super_admin() )
Expand Down
14 changes: 13 additions & 1 deletion admin/display/menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,24 @@ class AIOSEOPAdminMenus {
* Constructor to add the actions.
*/
function __construct() {

add_action( 'network_admin_menu', array( $this, 'remove_menus' ), 15 );

if ( is_multisite()){
return;
}

if ( current_user_can( 'manage_options' ) || current_user_can( 'aiosp_manage_seo' ) ) {
add_action( 'admin_menu', array( $this, 'add_pro_submenu' ), 11 );
} else {
return;
}
}

function remove_menus(){
remove_menu_page( AIOSEOP_PLUGIN_DIRNAME . '/aioseop_class.php' ); // Remove AIOSEOP menu from the network admin.
}

/**
* Adds Upgrade link to our menu.
*
Expand All @@ -35,4 +46,5 @@ function add_pro_submenu() {
}
}

new AIOSEOPAdminMenus();
new AIOSEOPAdminMenus();

4 changes: 4 additions & 0 deletions aioseop_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -3651,7 +3651,11 @@ function add_hooks() {
}

if ( is_admin() ) {
if ( is_multisite() ) {
add_action( 'network_admin_menu', array( $this, 'admin_menu' ) );
}
add_action( 'admin_menu', array( $this, 'admin_menu' ) );

add_action( 'admin_head', array( $this, 'add_page_icon' ) );
add_action( 'admin_init', 'aioseop_addmycolumns', 1 );
add_action( 'admin_init', 'aioseop_handle_ignore_notice' );
Expand Down
12 changes: 8 additions & 4 deletions all_in_one_seo_pack.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Plugin Name: All In One SEO Pack
Plugin URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/
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. More than 30 million downloads since 2007.
Version: 2.6.1
Version: 2.7
Author: Michael Torbert
Author URI: https://semperplugins.com/all-in-one-seo-pack-pro-version/
Text Domain: all-in-one-seo-pack
Expand Down Expand Up @@ -32,14 +32,14 @@
* The original WordPress SEO plugin.
*
* @package All-in-One-SEO-Pack
* @version 2.6.1
* @version 2.7
*/

if ( ! defined( 'AIOSEOPPRO' ) ) {
define( 'AIOSEOPPRO', false );
}
if ( ! defined( 'AIOSEOP_VERSION' ) ) {
define( 'AIOSEOP_VERSION', '2.6.1' );
define( 'AIOSEOP_VERSION', '2.7' );
}
global $aioseop_plugin_name;
$aioseop_plugin_name = 'All in One SEO Pack';
Expand Down Expand Up @@ -279,7 +279,11 @@ function aioseop_activate() {
}
}

add_action( 'plugins_loaded', 'aioseop_init_class' );
if ( is_multisite() ) {
add_action( 'muplugins_loaded', 'aioseop_init_class' );
} else {
add_action( 'plugins_loaded', 'aioseop_init_class' );
}

if ( ! function_exists( 'aiosp_plugin_row_meta' ) ) {

Expand Down
120 changes: 103 additions & 17 deletions css/modules/aioseop_module.css
Original file line number Diff line number Diff line change
Expand Up @@ -810,38 +810,79 @@ div.aioseop_feature#aioseop_coming_soon2 .aioseop_featured_image {
/* max-width: 900px; */
}

#aiosp_sitemap_addl_pages,
#aiosp_video_sitemap_addl_pages {
clear: left;
margin-left: 20px;
max-width: 1072px;
/*** Sitemap Additional Pages section ***/
#aiosp_sitemap_addl_pages_metabox .aioseop_options,
#aiosp_video_sitemap_addl_pages_metabox .aioseop_options {
width: 97%;
margin: 5px;
}

#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_sitemap_addl_instructions_wrapper,
#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_video_sitemap_addl_instructions_wrapper {
display: block;
width: 100%;
float: none;
margin: 0;
}

#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_sitemap_addl_instructions_wrapper .aioseop_input,
#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_video_sitemap_addl_instructions_wrapper .aioseop_input {
display: block;
width: 100%;
}

#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper,
#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper {
width: 23%;
min-width: 165px;
padding: 0;
}

#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_input,
#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_input {
display: inline-block;
max-width: 265px;
vertical-align: middle;
width: 25%;
min-width: 120px;
height: 70px;
}

#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_top_label,
#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_top_label {
width: 70%;
margin: 0;
}

#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_option_label,
#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper .aioseop_option_label {
height: 30px !important;
}

#aiosp_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_sitemap_addl_mod_wrapper input.aiseop-date,
#aiosp_video_sitemap_addl_pages_metabox .aioseop_wrapper#aiosp_video_sitemap_addl_mod_wrapper input.aiseop-date {
height: 36px;
}

#aiosp_sitemap_addl_pages_metabox .aioseop_options .aioseop_submit_type,
#aiosp_video_sitemap_addl_pages_metabox .aioseop_options .aioseop_submit_type {
margin: 0;
}

#aiosp_sitemap_addl_pages_metabox .aioseop_options .aioseop_submit_type input.button-primary,
#aiosp_video_sitemap_addl_pages_metabox .aioseop_options .aioseop_submit_type input.button-primary {
margin-left: 0 !important;
}

#aiosp_sitemap_addl_pages_metabox .aioseop_help_text_div,
#aiosp_video_sitemap_addl_pages_metabox .aioseop_help_text_div {
position: absolute;
width: auto;
margin: 5px 0 10px 0;
}

#aiosp_sitemap_addl_pages_metabox .aioseop_option_input,
#aiosp_video_sitemap_addl_pages_metabox .aioseop_option_input {
width: 94%;
min-width: 94%;
}

#aiosp_sitemap_addl_pages_metabox table.aioseop_table,
#aiosp_video_sitemap_addl_pages_metabox table.aioseop_table {
width: 96%;
border: 1px solid #CCC;
margin: 5px 0 10px 0;
margin: 5px 5px 10px;
}

table.aioseop_table tr:nth-child(odd) {
Expand Down Expand Up @@ -913,10 +954,15 @@ table.aioseop_table td {

#aiosp_sitemap_addl_pages_metabox table.aioseop_table td,
#aiosp_video_sitemap_addl_pages_metabox table.aioseop_table td {
width: 25%;
width: 27%;
padding-left: 5%;
}

#aiosp_sitemap_addl_pages_metabox table.aioseop_table td:first-child,
#aiosp_video_sitemap_addl_pages_metabox table.aioseop_table td:first-child {
padding-left: 2%;
}

table.aioseop_table td, table.aioseop_table th {
padding: 3px;
}
Expand Down Expand Up @@ -952,6 +998,40 @@ table.aioseop_table td, table.aioseop_table th {
clear: right;
}

#aiosp_robots_rules {
clear: left;
margin-left: 20px;
max-width: 1072px;
}

#aiosp_robots_default_metabox .aioseop_wrapper {
width: 31%;
min-width: 165px;
display: inline-block;
max-width: 265px;
}

#aiosp_robots_default_metabox .aioseop_help_text_div {
position: absolute;
margin: 5px 0 10px 0;
}

#aiosp_robots_default_metabox .aioseop_option_input {
width: 94%;
min-width: 94%;
}

#aiosp_robots_default_metabox table.aioseop_table {
width: 96%;
border: 1px solid #CCC;
margin: 5px 0 10px 0;
}

#aiosp_robots_default_metabox table.aioseop_table td {
width: 25%;
padding-left: 5%;
}

#aiosp_settings_form .aioseop_no_label, .aioseop_no_label {
float: left;
width: 92%;
Expand Down Expand Up @@ -1189,7 +1269,7 @@ div.aioseop_notice a.aioseop_dismiss_link {
vertical-align: bottom;
}

.aiosp_delete_url {
.aiosp_delete {
background-image: url('../../images/delete.png');
display: inline-block;
width: 16px;
Expand Down Expand Up @@ -1416,4 +1496,10 @@ div#aioseop_snippet > div > span {
.aioseop_count_ugly {
color: #fff !important;
background-color: #f00 !important;
}

textarea.robots-text {
background-color: #eee;
width: 100%;
height: 100%;
}
4 changes: 2 additions & 2 deletions inc/aioseop_functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -925,11 +925,11 @@ function fnmatch( $pattern, $string ) {
}

if ( ! function_exists( 'aiosp_log' ) ) {
function aiosp_log( $log ) {
function aiosp_log( $log, $force = false ) {

global $aioseop_options;

if ( ! empty( $aioseop_options ) && isset( $aioseop_options['aiosp_do_log'] ) && $aioseop_options['aiosp_do_log'] ) {
if ( ( ! empty( $aioseop_options ) && isset( $aioseop_options['aiosp_do_log'] ) && $aioseop_options['aiosp_do_log'] ) || $force || defined( 'AIOSEOP_DO_LOG' ) ) {

if ( is_array( $log ) || is_object( $log ) ) {
error_log( print_r( $log, true ) );
Expand Down
Loading

0 comments on commit 6b15775

Please sign in to comment.