Skip to content

Commit

Permalink
Merge branch 'release/18.4' into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
nolledgeable committed Mar 17, 2022
2 parents 56d3a4b + ce64450 commit f53b28a
Show file tree
Hide file tree
Showing 14 changed files with 61 additions and 49 deletions.
4 changes: 2 additions & 2 deletions admin/class-gutenberg-compatibility.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ class WPSEO_Gutenberg_Compatibility {
*
* @var string
*/
const CURRENT_RELEASE = '12.7.2';
const CURRENT_RELEASE = '12.8.0';

/**
* The minimally supported version of Gutenberg by the plugin.
*
* @var string
*/
const MINIMUM_SUPPORTED = '12.7.2';
const MINIMUM_SUPPORTED = '12.8.0';

/**
* Holds the current version.
Expand Down
12 changes: 6 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"typescript": "^4.2.4"
},
"yoast": {
"pluginVersion": "18.4-RC5"
"pluginVersion": "18.4-RC6"
},
"version": "0.0.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* Conditional that is met when the WordProof Timestamp plugin is inactive.
*/
class WordProof_Plugin_Inactive_Conditional implements Conditional {
class Wordproof_Plugin_Inactive_Conditional implements Conditional {

/**
* Returns whether or not the WordProof Timestamp plugin is active.
Expand Down
18 changes: 18 additions & 0 deletions src/conditionals/user-can-publish-posts-and-pages-conditional.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace Yoast\WP\SEO\Conditionals;

/**
* Conditional that is only met when the current user has the `wpseo_manage_options` capability.
*/
class User_Can_Publish_Posts_And_Pages_Conditional implements Conditional {

/**
* Returns whether or not this conditional is met.
*
* @return bool Whether or not the conditional is met.
*/
public function is_met() {
return \current_user_can( 'publish_posts' ) && \current_user_can( 'publish_pages' );
}
}
11 changes: 1 addition & 10 deletions src/config/wordproof-app-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* @package Yoast\WP\SEO\Config
*/
class WordProof_App_Config extends DefaultAppConfig {
class Wordproof_App_Config extends DefaultAppConfig {

/**
* Returns the partner.
Expand All @@ -19,13 +19,4 @@ class WordProof_App_Config extends DefaultAppConfig {
public function getPartner() {
return 'yoast';
}

/**
* Returns the environment.
*
* @return string The environment.
*/
public function getEnvironment() {
return 'staging';
}
}
2 changes: 1 addition & 1 deletion src/config/wordproof-translations.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* @package Yoast\WP\SEO\Config
*/
class WordProof_Translations implements TranslationsInterface {
class Wordproof_Translations implements TranslationsInterface {

/**
* Returns no balance notice translation.
Expand Down
7 changes: 4 additions & 3 deletions src/helpers/wordproof-helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@

use ReflectionClass;
use Yoast\WP\SEO\Conditionals\Non_Multisite_Conditional;
use Yoast\WP\SEO\Conditionals\Third_Party\WordProof_Plugin_Inactive_Conditional;
use Yoast\WP\SEO\Conditionals\Third_Party\Wordproof_Plugin_Inactive_Conditional;
use Yoast\WP\SEO\Conditionals\User_Can_Publish_Posts_And_Pages_Conditional;

/**
* A helper object for WordProof integration.
*/
class WordProof_Helper {
class Wordproof_Helper {

/**
* Holds the Current Page helper instance.
Expand Down Expand Up @@ -63,7 +64,7 @@ public function remove_site_options() {
* @return bool|string Returns if the integration should be disabled.
*/
public function integration_is_disabled( $return_conditional = false ) {
$conditionals = [ new WordProof_Plugin_Inactive_Conditional(), new Non_Multisite_Conditional() ];
$conditionals = [ new Wordproof_Plugin_Inactive_Conditional(), new Non_Multisite_Conditional(), new User_Can_Publish_Posts_And_Pages_Conditional() ];

foreach ( $conditionals as $conditional ) {
if ( ! $conditional->is_met() ) {
Expand Down
12 changes: 7 additions & 5 deletions src/integrations/third-party/wordproof-integration-toggle.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
namespace Yoast\WP\SEO\Integrations\Third_Party;

use Yoast\WP\SEO\Conditionals\Admin_Conditional;
use Yoast\WP\SEO\Helpers\WordProof_Helper;
use Yoast\WP\SEO\Config\WordProofAppConfig;
use Yoast\WP\SEO\Config\WordProofTranslations;
use Yoast\WP\SEO\Helpers\Wordproof_Helper;
use Yoast\WP\SEO\Integrations\Integration_Interface;
use Yoast_Feature_Toggle;

Expand All @@ -12,21 +14,21 @@
*
* @package Yoast\WP\SEO\Integrations\Third_Party
*/
class WordProof_Integration_Toggle implements Integration_Interface {
class Wordproof_Integration_Toggle implements Integration_Interface {

/**
* The WordProof helper instance.
*
* @var WordProof_Helper
* @var Wordproof_Helper $wordproof The helper instance.
*/
protected $wordproof;

/**
* The WordProof integration toggle constructor.
*
* @param WordProof_Helper $wordproof The WordProof helper instance.
* @param Wordproof_Helper $wordproof The WordProof helper instance.
*/
public function __construct( WordProof_Helper $wordproof ) {
public function __construct( Wordproof_Helper $wordproof ) {
$this->wordproof = $wordproof;
}

Expand Down
24 changes: 12 additions & 12 deletions src/integrations/third-party/wordproof.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
use WordProof\SDK\Helpers\PostMetaHelper;
use WordProof\SDK\WordPressSDK;
use Yoast\WP\SEO\Conditionals\Non_Multisite_Conditional;
use Yoast\WP\SEO\Conditionals\Third_Party\WordProof_Plugin_Inactive_Conditional;
use Yoast\WP\SEO\Config\WordProof_App_Config;
use Yoast\WP\SEO\Config\WordProof_Translations;
use Yoast\WP\SEO\Helpers\WordProof_Helper;
use Yoast\WP\SEO\Conditionals\Third_Party\Wordproof_Plugin_Inactive_Conditional;
use Yoast\WP\SEO\Config\Wordproof_App_Config;
use Yoast\WP\SEO\Config\Wordproof_Translations;
use Yoast\WP\SEO\Helpers\Wordproof_Helper;
use Yoast\WP\SEO\Integrations\Integration_Interface;

/**
* Class WordProof
*
* @package Yoast\WP\SEO\Integrations\Third_Party
*/
class WordProof implements Integration_Interface {
class Wordproof implements Integration_Interface {

/**
* The Yoast meta key used to save if a post should be timestamped.
* The Yoast meta key used to save if a post shiould be timestamped.
*
* @var string
*/
Expand All @@ -28,16 +28,16 @@ class WordProof implements Integration_Interface {
/**
* The WordProof helper instance.
*
* @var WordProof_Helper
* @var Wordproof_Helper $wordproof The helper instance.
*/
protected $wordproof;

/**
* The WordProof integration constructor.
*
* @param WordProof_Helper $wordproof The WordProof helper instance.
* @param Wordproof_Helper $wordproof The WordProof helper instance.
*/
public function __construct( WordProof_Helper $wordproof ) {
public function __construct( Wordproof_Helper $wordproof ) {
$this->wordproof = $wordproof;
}

Expand All @@ -47,7 +47,7 @@ public function __construct( WordProof_Helper $wordproof ) {
* @return array
*/
public static function get_conditionals() {
return [ WordProof_Plugin_Inactive_Conditional::class, Non_Multisite_Conditional::class ];
return [ Wordproof_Plugin_Inactive_Conditional::class, Non_Multisite_Conditional::class ];
}

/**
Expand Down Expand Up @@ -94,8 +94,8 @@ public function register_hooks() {
*/
public function sdk_setup() {

$config = new WordProof_App_Config();
$translations = new WordProof_Translations();
$config = new Wordproof_App_Config();
$translations = new Wordproof_Translations();

WordPressSDK::getInstance( $config, $translations )
->certificate()
Expand Down
8 changes: 4 additions & 4 deletions src/integrations/watchers/option-wpseo-watcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Yoast\WP\SEO\Integrations\Watchers;

use Yoast\WP\SEO\Conditionals\No_Conditionals;
use Yoast\WP\SEO\Helpers\WordProof_Helper;
use Yoast\WP\SEO\Helpers\Wordproof_Helper;
use Yoast\WP\SEO\Integrations\Integration_Interface;

/**
Expand All @@ -18,16 +18,16 @@ class Option_Wpseo_Watcher implements Integration_Interface {
/**
* Holds the WordProof helper instance.
*
* @var WordProof_Helper
* @var Wordproof_Helper
*/
protected $wordproof;

/**
* The constructor for a watcher of WPSEO options.
*
* @param WordProof_Helper $wordproof The WordProof helper instance.
* @param Wordproof_Helper $wordproof The WordProof helper instance.
*/
public function __construct( WordProof_Helper $wordproof ) {
public function __construct( Wordproof_Helper $wordproof ) {
$this->wordproof = $wordproof;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Brain\Monkey;
use Mockery;
use Yoast\WP\SEO\Helpers\Options_Helper;
use Yoast\WP\SEO\Helpers\WordProof_Helper;
use Yoast\WP\SEO\Helpers\Wordproof_Helper;
use Yoast\WP\SEO\Integrations\Watchers\Option_Wpseo_Watcher;
use Yoast\WP\SEO\Surfaces\Helpers_Surface;
use Yoast\WP\SEO\Tests\Unit\TestCase;
Expand All @@ -31,7 +31,7 @@ class Option_Wpseo_Watcher_Test extends TestCase {
protected function set_up() {
parent::set_up();

$this->instance = new Option_Wpseo_Watcher( Mockery::mock( WordProof_Helper::class ) );
$this->instance = new Option_Wpseo_Watcher( Mockery::mock( Wordproof_Helper::class ) );
}

/**
Expand Down
2 changes: 1 addition & 1 deletion wp-seo-main.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* {@internal Nobody should be able to overrule the real version number as this can cause
* serious issues with the options, so no if ( ! defined() ).}}
*/
define( 'WPSEO_VERSION', '18.4-RC5' );
define( 'WPSEO_VERSION', '18.4-RC6' );


if ( ! defined( 'WPSEO_PATH' ) ) {
Expand Down
2 changes: 1 addition & 1 deletion wp-seo.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*
* @wordpress-plugin
* Plugin Name: Yoast SEO
* Version: 18.4-RC5
* Version: 18.4-RC6
* Plugin URI: https://yoa.st/1uj
* Description: The first true all-in-one SEO solution for WordPress, including on-page content analysis, XML sitemaps and much more.
* Author: Team Yoast
Expand Down

0 comments on commit f53b28a

Please sign in to comment.