Skip to content

Commit

Permalink
Merge branch '2.8' into awesomemotive#1820
Browse files Browse the repository at this point in the history
  • Loading branch information
contactashish13 committed Sep 12, 2018
2 parents 5f2c8c4 + e8d3f33 commit 710a9b0
Show file tree
Hide file tree
Showing 24 changed files with 1,376 additions and 174 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Expand Up @@ -22,6 +22,10 @@ matrix:
- env: WP_MULTISITE=1
allow_failures:
- env: WP_MULTISITE=1
- php: 5.3
dist: precise
- php: 5.2
dist: precise

notifications:
email:
Expand Down
2 changes: 2 additions & 0 deletions admin/aioseop_module_class.php
Expand Up @@ -2507,6 +2507,8 @@ function sanitize_options( $location = null ) {
case 'filename':
$this->options[ $k ] = sanitize_file_name( $this->options[ $k ] );
break;
case 'url':
// fall through.
case 'text':
$this->options[ $k ] = wp_kses_post( $this->options[ $k ] );
// fall through.
Expand Down
32 changes: 32 additions & 0 deletions admin/display/credits-content.php
Expand Up @@ -62,6 +62,38 @@
<a class="web" target="_blank" href="https://profiles.wordpress.org/yummy-wp/"><img alt="" class="gravatar" src="https://avatars0.githubusercontent.com/u/22232968?v=3&s=460">
Stanislav Samoilenko</a>
</li>
<li class="wp-person" id="EkoJR">
<a class="web" target="_blank" href="https://profiles.wordpress.org/EkoJR/"><img alt="" class="gravatar" src="https://secure.gravatar.com/avatar/bb4c78fe944b58bd5f127d836500c30a?s=200&d=mm&r=g">
Stanislav Samoilenko</a>
</li>
<li class="wp-person" id="webaware">
<a class="web" target="_blank" href="https://profiles.wordpress.org/webaware/"><img alt="" class="gravatar" src="https://secure.gravatar.com/avatar/aee800bc3644d9ebfa33c1ed9df5d958?s=200&d=mm&r=g">
Ross McKay</a>
</li>
<li class="wp-person" id="adamsilverstein">
<a class="web" target="_blank" href="https://profiles.wordpress.org/adamsilverstein/"><img alt=""
class="gravatar"
src="https://secure.gravatar.com/avatar/fddbd6c3e1c3d971aa732b9346aeb433?s=200&d=mm&r=g">
Adam Silverstein</a>
</li>
<li class="wp-person" id="vschettino">
<a class="web" target="_blank" href="https://github.com/vschettino/"><img alt=""
class="gravatar"
src="https://avatars2.githubusercontent.com/u/7289698?s=460&v=4">
Vinicius Schettino</a>
</li>
<li class="wp-person" id="vschettino">
<a class="web" target="_blank" href="https://github.com/srdjan-jcc"><img alt=""
class="gravatar"
src="https://avatars2.githubusercontent.com/u/3109112?s=460&v=4">
Srdjan Jocic</a>
</li>
<li class="wp-person" id="vschettino">
<a class="web" target="_blank" href="https://profiles.wordpress.org/soulseekah/"><img alt=""
class="gravatar"
src="https://avatars0.githubusercontent.com/u/685880?s=460&v=4">
Gennady Kovshenin</a>
</li>
</ul>

<h3 class="wp-people-group dashicons-before dashicons-translation"><?php printf( _e( 'Translation contributors and translation editors', 'all-in-one-seo-pack' ), '1.2' ); ?></h3>
Expand Down
40 changes: 26 additions & 14 deletions admin/display/welcome-content.php
@@ -1,16 +1,16 @@
<div id="welcome-panel" class="">
<div class="welcome-panel">
<div class="welcome-panel-content">
<div class="welcome-panel-column-container">
<div class="welcome-panel-column">
<h3><?php echo esc_html( __( 'Support All in One SEO Pack', 'all-in-one-seo-pack' ) ); ?></h3>
<p class="message"><?php echo esc_html( __( 'There are many ways you can help support All in One SEO Pack.', 'all-in-one-seo-pack' ) ); ?></p>
<p class="message aioseop-message"><?php echo esc_html( __( 'Upgrade to All in One SEO Pack Pro to access priority support and premium features.', 'all-in-one-seo-pack' ) ); ?></p>
<p class="message welcome-icon welcome-edit-page"><?php echo esc_html( __( 'There are many ways you can help support All in One SEO Pack.', 'all-in-one-seo-pack' ) ); ?></p>
<p class="message aioseop-message welcome-icon welcome-edit-page"><?php echo esc_html( __( 'Upgrade to All in One SEO Pack Pro to access priority support and premium features.', 'all-in-one-seo-pack' ) ); ?></p>
<p class="call-to-action"><a
href="https://semperplugins.com/all-in-one-seo-pack-pro-version/?loc=aio_welcome"
target="_blank"
class="button button-primary button-orange"><?php echo __( 'Upgrade', 'all-in-one-seo-pack' ); ?></a>
</p>
<p class="message aioseop-message"><?php echo esc_html( __( 'Help translate All in One SEO Pack into your language.', 'all-in-one-seo-pack' ) ); ?></p>
<p class="message aioseop-message welcome-icon welcome-edit-page"><?php echo esc_html( __( 'Help translate All in One SEO Pack into your language.', 'all-in-one-seo-pack' ) ); ?></p>
<p class="call-to-action"><a
href="https://translate.wordpress.org/projects/wp-plugins/all-in-one-seo-pack"
class="button button-primary"
Expand All @@ -21,26 +21,34 @@ class="button button-primary"
<h3><?php echo esc_html( __( 'Get Started', 'all-in-one-seo-pack' ) ); ?></h3>
<ul>
<li><a href="https://semperplugins.com/documentation/quick-start-guide/"
target="_blank"><?php echo __( 'Beginners Guide for All in One SEO Pack', 'all-in-one-seo-pack' ); ?></a>
target="_blank"
class="welcome-icon welcome-add-page"><?php echo __( 'Beginners Guide for All in One SEO Pack', 'all-in-one-seo-pack' ); ?></a>

</li>
<li><a href="https://semperplugins.com/documentation/beginners-guide-to-xml-sitemaps/"
target="_blank"><?php echo __( 'Beginners Guide for XML Sitemap module', 'all-in-one-seo-pack' ); ?></a>
target="_blank"
class="welcome-icon welcome-add-page"><?php echo __( 'Beginners Guide for XML Sitemap module', 'all-in-one-seo-pack' ); ?></a>
</li>
<li><a href="https://semperplugins.com/documentation/beginners-guide-to-social-meta/"
target="_blank"><?php echo __( 'Beginners Guide for Social Meta module', 'all-in-one-seo-pack' ); ?></a>
target="_blank"
class="welcome-icon welcome-add-page"><?php echo __( 'Beginners Guide for Social Meta module', 'all-in-one-seo-pack' ); ?></a>
</li>
<li><a href="https://semperplugins.com/documentation/top-tips-for-good-on-page-seo/"
target="_blank"><?php echo __( 'Tips for good on-page SEO', 'all-in-one-seo-pack' ); ?></a>
target="_blank"
class="welcome-icon welcome-add-page"><?php echo __( 'Tips for good on-page SEO', 'all-in-one-seo-pack' ); ?></a>
</li>
<li>
<a href="https://semperplugins.com/documentation/quality-guidelines-for-seo-titles-and-descriptions/"
target="_blank"><?php echo __( 'Quality guidelines for SEO titles and descriptions', 'all-in-one-seo-pack' ); ?></a>
target="_blank"
class="welcome-icon welcome-add-page"><?php echo __( 'Quality guidelines for SEO titles and descriptions', 'all-in-one-seo-pack' ); ?></a>
</li>
<li><a href="https://semperplugins.com/documentation/submitting-an-xml-sitemap-to-google/"
target="_blank"><?php echo __( 'Submit an XML Sitemap to Google', 'all-in-one-seo-pack' ); ?></a>
target="_blank"
class="welcome-icon welcome-add-page"><?php echo __( 'Submit an XML Sitemap to Google', 'all-in-one-seo-pack' ); ?></a>
</li>
<li><a href="https://semperplugins.com/documentation/setting-up-google-analytics/"
target="_blank"><?php echo __( 'Set up Google Analytics', 'all-in-one-seo-pack' ); ?></a>
target="_blank"
class="welcome-icon welcome-add-page"><?php echo __( 'Set up Google Analytics', 'all-in-one-seo-pack' ); ?></a>
</li>
</ul>
</div>
Expand All @@ -49,13 +57,17 @@ class="button button-primary"
<h3><?php echo esc_html( __( 'Did You Know?', 'all-in-one-seo-pack' ) ); ?></h3>
<ul>
<li><a href="https://semperplugins.com/documentation/"
target="_blank"><?php echo __( 'We have complete documentation on every setting and feature', 'all-in-one-seo-pack' ); ?></a>
target="_blank"
class="welcome-icon welcome-learn-more"><?php echo __( 'We have complete documentation on every setting and feature', 'all-in-one-seo-pack' ); ?></a>

</li>
<li><a href="https://semperplugins.com/videos/"
target="_blank"><?php echo __( 'Access to video tutorials about SEO with the Pro version', 'all-in-one-seo-pack' ); ?></a>
target="_blank"
class="welcome-icon welcome-learn-more"><?php echo __( 'Access to video tutorials about SEO with the Pro version', 'all-in-one-seo-pack' ); ?></a>
</li>
<li><a href="https://semperplugins.com/all-in-one-seo-pack-pro-version/?loc=aio_welcome"
target="_blank"><?php echo __( 'Control SEO on categories, tags and custom taxonomies with the Pro version', 'all-in-one-seo-pack' ); ?></a>
target="_blank"
class="welcome-icon welcome-learn-more"><?php echo __( 'Control SEO on categories, tags and custom taxonomies with the Pro version', 'all-in-one-seo-pack' ); ?></a>
</li>
</ul>
</div>
Expand Down
4 changes: 2 additions & 2 deletions admin/display/welcome.php
Expand Up @@ -32,8 +32,8 @@ function welcome_screen_assets( $hook ) {

if ( 'dashboard_page_aioseop-about' === $hook ) {

wp_enqueue_style( 'aioseop_welcome_css', AIOSEOP_PLUGIN_URL . '/css/welcome.css', array(), AIOSEOP_VERSION );
wp_enqueue_script( 'aioseop_welcome_js', AIOSEOP_PLUGIN_URL . '/js/welcome.js', array( 'jquery' ), AIOSEOP_VERSION, true );
wp_enqueue_style( 'aioseop_welcome_css', AIOSEOP_PLUGIN_URL . 'css/welcome.css', array(), AIOSEOP_VERSION );
wp_enqueue_script( 'aioseop_welcome_js', AIOSEOP_PLUGIN_URL . 'js/welcome.js', array( 'jquery' ), AIOSEOP_VERSION, true );
}
}

Expand Down
48 changes: 35 additions & 13 deletions aioseop_class.php
Expand Up @@ -1453,7 +1453,7 @@ function get_page_snippet_info() {
function get_queried_object() {
static $p = null;
global $wp_query, $post;
if ( null !== $p && ! defined('AIOSEOP_UNIT_TESTING') ) {
if ( null !== $p && ! defined( 'AIOSEOP_UNIT_TESTING' ) ) {
return $p;
}
if ( is_object( $post ) ) {
Expand Down Expand Up @@ -2490,6 +2490,10 @@ function get_main_description( $post = null ) {
$description = $this->internationalize( $description );
}

// #1308 - we want to make sure we are ignoring php version only in the admin area while editing the post, so that it does not impact #932.
$screen = is_admin() ? get_current_screen() : null;
$ignore_php_version = $screen && isset( $screen->id ) && 'post' === $screen->id;

$truncate = false;
$aioseop_desc = '';
if ( ! empty( $post->ID ) ) {
Expand All @@ -2503,7 +2507,8 @@ function get_main_description( $post = null ) {
$description = apply_filters(
'aioseop_description',
$description,
$truncate
$truncate,
$ignore_php_version
);

return $description;
Expand Down Expand Up @@ -3005,8 +3010,8 @@ function get_all_term_data( $term_id ) {
function add_page_icon() {
wp_enqueue_script( 'wp-pointer', false, array( 'jquery' ) );
wp_enqueue_style( 'wp-pointer' );
// $this->add_admin_pointers();
wp_enqueue_style( 'aiosp_admin_style', AIOSEOP_PLUGIN_URL . 'css/aiosp_admin.css', array(), AIOSEOP_VERSION );
//$this->add_admin_pointers();

?>
<script>
function aioseop_show_pointer(handle, value) {
Expand Down Expand Up @@ -3273,6 +3278,18 @@ function settings_page_init() {
add_filter( "{$this->prefix}submit_options", array( $this, 'filter_submit' ) );
}

/**
* Admin Enqueue Scripts
*
* @since 2.5.0
*
* @uses All_in_One_SEO_Pack_Module::admin_enqueue_scripts();
*/
function admin_enqueue_scripts() {
wp_enqueue_style( 'aiosp_admin_style', AIOSEOP_PLUGIN_URL . 'css/aiosp_admin.css', array(), AIOSEOP_VERSION );
parent::admin_enqueue_scripts();
}

function enqueue_scripts() {
add_filter( "{$this->prefix}display_settings", array( $this, 'filter_settings' ), 10, 3 );
add_filter( "{$this->prefix}display_options", array( $this, 'filter_options' ), 10, 2 );
Expand Down Expand Up @@ -3659,6 +3676,7 @@ function add_hooks() {
add_action( 'admin_menu', array( $this, 'admin_menu' ) );

add_action( 'admin_head', array( $this, 'add_page_icon' ) );
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
add_action( 'admin_init', 'aioseop_addmycolumns', 1 );
add_action( 'admin_init', 'aioseop_handle_ignore_notice' );
if ( AIOSEOPPRO ) {
Expand All @@ -3684,7 +3702,7 @@ function add_hooks() {
add_action( 'amp_post_template_head', array( $this, 'amp_head' ), 11 );
add_action( 'template_redirect', array( $this, 'template_redirect' ), 0 );
}
add_filter( 'aioseop_description', array( &$this, 'filter_description' ), 10, 2 );
add_filter( 'aioseop_description', array( &$this, 'filter_description' ), 10, 3 );
add_filter( 'aioseop_title', array( &$this, 'filter_title' ) );
}

Expand Down Expand Up @@ -3819,9 +3837,8 @@ function wp_head() {
global $aioseop_update_checker, $wp_query, $aioseop_options, $posts;
static $aioseop_dup_counter = 0;
$aioseop_dup_counter ++;

if ( ! defined('AIOSEOP_UNIT_TESTING') && $aioseop_dup_counter > 1 ) {
echo "\n<!-- " . sprintf( __( 'Debug Warning: All in One SEO Pack meta data was included again from %s filter. Called %s times!', 'all-in-one-seo-pack' ), current_filter(), $aioseop_dup_counter ) . " -->\n";
if ( ! defined( 'AIOSEOP_UNIT_TESTING' ) && $aioseop_dup_counter > 1 ) {
echo "\n<!-- " . sprintf( __( 'Debug Warning: All in One SEO Pack meta data was included again from %1$s filter. Called %2$s times!', 'all-in-one-seo-pack' ), current_filter(), $aioseop_dup_counter ) . " -->\n";
if ( ! empty( $old_wp_query ) ) {
// Change the query back after we've finished.
$GLOBALS['wp_query'] = $old_wp_query;
Expand Down Expand Up @@ -3865,9 +3882,10 @@ function wp_head() {
}

$posts = $save_posts;
$description = $this->get_main_description( $post ); // Get the description.
// Handle the description format.
if ( isset( $description ) && ( $this->strlen( $description ) > $this->minimum_description_length ) && ! ( is_front_page() && is_paged() ) ) {
// We are not going to mandate that post description needs to be present because the content could be derived from a custom field too.
if ( ! ( is_front_page() && is_paged() ) ) {
$description = $this->get_main_description( $post ); // Get the description.
$description = $this->trim_description( $description );
if ( ! isset( $meta_string ) ) {
$meta_string = '';
Expand All @@ -3879,7 +3897,9 @@ function wp_head() {
$desc_attr = '';
}
$desc_attr = apply_filters( 'aioseop_description_attributes', $desc_attr );
$meta_string .= sprintf( "<meta name=\"description\" %s content=\"%s\" />\n", $desc_attr, $description );
if ( ! empty( $description ) ) {
$meta_string .= sprintf( "<meta name=\"description\" %s content=\"%s\" />\n", $desc_attr, $description );
}
}
// Get the keywords.
$togglekeywords = 0;
Expand Down Expand Up @@ -5000,11 +5020,13 @@ public function filter_title( $value ) {
*
* @param string $value Value to filter.
* @param bool $truncate Flag that indicates if value should be truncated/cropped.
* @param bool $ignore_php_version Flag that indicates if the php version check should be ignored.
*
* @return string
*/
public function filter_description( $value, $truncate = false ) {
if ( preg_match( '/5.2[\s\S]+/', PHP_VERSION ) ) {
public function filter_description( $value, $truncate = false, $ignore_php_version = false ) {
// TODO: change preg_match to version_compare someday when the reason for this condition is understood better.
if ( $ignore_php_version || preg_match( '/5.2[\s\S]+/', PHP_VERSION ) ) {
$value = htmlspecialchars( wp_strip_all_tags( htmlspecialchars_decode( $value ) ) );
}
// Decode entities
Expand Down
6 changes: 3 additions & 3 deletions all_in_one_seo_pack.php
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.7.2
Version: 2.8
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.7.2
* @version 2.8
*/

if ( ! defined( 'AIOSEOPPRO' ) ) {
define( 'AIOSEOPPRO', false );
}
if ( ! defined( 'AIOSEOP_VERSION' ) ) {
define( 'AIOSEOP_VERSION', '2.7.2' );
define( 'AIOSEOP_VERSION', '2.8' );
}
global $aioseop_plugin_name;
$aioseop_plugin_name = 'All in One SEO Pack';
Expand Down
2 changes: 1 addition & 1 deletion css/modules/aioseop_module.css
Expand Up @@ -157,7 +157,7 @@ div.aioseop_tip_icon:before {
border: 1px solid #e1e1e1;
}

.aioseop input[type="text"] {
.aioseop input[type="text"], .aioseop input[type="url"] {
color: #515151;
height: 35px;
padding: 10px 0 10px 10px;
Expand Down
39 changes: 12 additions & 27 deletions css/welcome.css
Expand Up @@ -53,34 +53,24 @@ section:first-child {
.welcome-panel-close {
z-index: 2;
}
.welcome-panel .welcome-widgets-menus:before,
.welcome-panel .welcome-comments:before,
.welcome-panel .welcome-learn-more:before{
content: '';
}
.welcome-panel .welcome-widgets-menus {
background: url(/path/to/icon) 0 50% no-repeat;
}
.welcome-panel .welcome-comments {
background: url(/path/to/icon) 0 50% no-repeat;
}
.welcome-panel .welcome-learn-more {
background: url(/path/to/icon) 0 50% no-repeat;
}

.welcome-panel {
overflow-x: hidden;
}

/*
* Welcome Panel
*/
#welcome-panel > p {
.welcome-panel > p {
margin-left: 15px;
}

.welcome-panel-content {
display: inline-block;
}

.welcome-panel-column {
width: 30%;
margin-right: 3%;
display: inline-block;
vertical-align: top;
width: 30% !important;
margin-right: 3%;
display: inline-block;
vertical-align: top;
}

.welcome-panel-column:last-child {
Expand Down Expand Up @@ -115,11 +105,6 @@ section:first-child {
margin-left: 20px;
}

.welcome-panel-column ul li {
margin-bottom: 12px;
list-style-type: square;
}

#wp-people-group-rockstars li {
margin-bottom: 1.33em;
}
Expand Down

0 comments on commit 710a9b0

Please sign in to comment.