Skip to content

Commit

Permalink
Merge pull request #2545 from semperfiwebdesign/3.0
Browse files Browse the repository at this point in the history
3.0 to master again
  • Loading branch information
michaeltorbert authored May 31, 2019
2 parents 4ed7111 + c5c8e4d commit c0571cc
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 38 deletions.
9 changes: 8 additions & 1 deletion admin/class-aioseop-notices.php
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,14 @@ public function deactivate_notice( $slug ) {
* @return bool
*/
public function reset_notice( $slug ) {
if ( empty( $slug ) || ! isset( $this->notices[ $slug ] ) ) {
if (
empty( $slug ) ||
(
! isset( $this->notices[ $slug ] ) &&
! get_user_meta( get_current_user_id(), 'aioseop_notice_display_time_' . $slug, true ) &&
! get_user_meta( get_current_user_id(), 'aioseop_notice_dismissed_' . $slug, true )
)
) {
return false;
}

Expand Down
54 changes: 27 additions & 27 deletions admin/display/credits-content.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,33 +84,33 @@
Shohei Tanaka</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>
<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="webaware">
<a class="web" target="_blank" href="https://github.com/jWright-Freelance/"><img alt="" class="gravatar" src="https://avatars1.githubusercontent.com/u/11382307?s=200&v=4">
John Wright</a>
</li>
<li class="wp-person" id="webaware">
<a class="web" target="_blank" href="https://wordpress.org/support/users/onetarek/"><img alt="" class="gravatar" src="https://secure.gravatar.com/avatar/dc4d0f0561009cc18c8d1cdfc760b2f1?s=200&d=retro&r=g">
Md Jahidul Islam</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
2 changes: 1 addition & 1 deletion admin/display/notices/wc-detected-notice.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function aioseop_notice_pro_promo_woocommerce() {
'text' => __( 'Upgrade', 'all-in-one-seo-pack' ),
'link' => 'https://semperplugins.com/plugins/all-in-one-seo-pack-pro-version/?loc=woo',
'dismiss' => false,
'class' => 'button-primary',
'class' => 'button-primary button-orange',
),
array(
'time' => 2592000, // 30 days.
Expand Down
10 changes: 8 additions & 2 deletions admin/display/welcome-content.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
<div class="welcome-panel">
<div class="welcome-panel-content">
<div class="welcome-panel-column-container">
<div>
<h3><a href="https://semperplugins.com/all-in-one-seo-pack-3-0/" target="_blank"><?php echo esc_html( sprintf( __( "Check out what's new in our %s release post!", 'all_in_one_seo_pack' ), 'Version 3' ) ); ?></a></h3>
</div>
<div class="welcome-panel-column">
<h3><?php
<h3>
<?php
/* translators: %s is a placeholder, which means that it should not be translated. It will be replaced with the name of the plugin, All in One SEO Pack. */
echo esc_html( sprintf( __( 'Support %s', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME ) ); ?></h3>
echo esc_html( sprintf( __( 'Support %s', 'all-in-one-seo-pack' ), AIOSEOP_PLUGIN_NAME ) );
?>
</h3>
<p class="message welcome-icon welcome-edit-page">
<?php
/* translators: %s is a placeholder, which means that it should not be translated. It will be replaced with the name of the plugin, All in One SEO Pack. */
Expand Down
24 changes: 17 additions & 7 deletions modules/aioseop_sitemap.php
Original file line number Diff line number Diff line change
Expand Up @@ -402,19 +402,28 @@ public function __construct() {
*
* @todo Move admin notice functions. Possibly to where it is first saved & loaded (`load_sitemap_options`).
*
* @global AIOSEOP_Notices $aioseop_notices
*
* @since 2.4.1
*/
public function sitemap_notices() {
if ( ! current_user_can( 'aiosp_manage_seo' ) ) {
return;
}

global $aioseop_notices;
$options = $this->options;

if (
isset( $options[ "{$this->prefix}indexes" ] ) &&
'on ' !== $options[ "{$this->prefix}indexes" ] &&
1001 < $options[ "{$this->prefix}max_posts" ]
(
isset( $options[ "{$this->prefix}indexes" ] ) &&
'on' !== $options[ "{$this->prefix}indexes" ]
) ||
(
isset( $options[ "{$this->prefix}indexes" ] ) &&
'on' === $options[ "{$this->prefix}indexes" ] &&
1000 < $options[ "{$this->prefix}max_posts" ]
)
) {
$num_terms = 0;
$post_counts = $this->get_total_post_count(
Expand All @@ -431,12 +440,13 @@ public function sitemap_notices() {

$sitemap_urls = $post_counts + $num_terms;

global $aioseop_notices;
if ( 1001 > $sitemap_urls ) {
$aioseop_notices->deactivate_notice( 'sitemap_max_warning' );
} else {
if ( 1000 < $sitemap_urls ) {
$aioseop_notices->activate_notice( 'sitemap_max_warning' );
} else {
$aioseop_notices->deactivate_notice( 'sitemap_max_warning' );
}
} else {
$aioseop_notices->deactivate_notice( 'sitemap_max_warning' );
}
}

Expand Down

0 comments on commit c0571cc

Please sign in to comment.