Skip to content

Commit

Permalink
Merge branch 'trunk' of github.com:Yoast/wordpress-seo into feature/e…
Browse files Browse the repository at this point in the history
…nable-ai-products
  • Loading branch information
mhkuu committed Oct 26, 2023
2 parents 7f17bac + 6a18d5e commit 8b69ca7
Show file tree
Hide file tree
Showing 26 changed files with 174 additions and 317 deletions.
2 changes: 1 addition & 1 deletion admin/views/redirects.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h1 id="wpseo-title"><?php echo \esc_html( \get_admin_page_title() ); ?></h1>
<div class="wpseo_content_wrapper" style="position: relative;">
<div style="position: absolute;top: 0;bottom: 0;left: 0;right: 0;z-index: 100; display: flex;justify-content: center;align-items: center;background: radial-gradient(#ffffffcf 20%, #ffffff00 50%);">
<a class="yoast-button-upsell" data-action="load-nfd-ctb" data-ctb-id="f6a84663-465f-4cb5-8ba5-f7a6d72224b2" href="<?php echo \esc_url( WPSEO_Shortlinker::get( 'https://yoa.st/4e0/' ) ); ?>" target="_blank">
<a class="yoast-button-upsell" data-action="load-nfd-ctb" data-ctb-id="f6a84663-465f-4cb5-8ba5-f7a6d72224b2" href="<?php echo \esc_url( WPSEO_Shortlinker::get( 'https://yoa.st/redirect-manager-upsell' ) ); ?>" target="_blank">
<?php
echo \esc_html__( 'Unlock with Premium', 'wordpress-seo' )
// phpcs:ignore WordPress.Security.EscapeOutput -- Already escapes correctly.
Expand Down
4 changes: 4 additions & 0 deletions config/dependency-injection/deprecated-classes.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
use Yoast\WP\SEO\Integrations\Schema_Blocks;
use Yoast\WP\SEO\Integrations\Third_Party\CoAuthors_Plus;
use Yoast\WP\SEO\Integrations\Third_Party\The_Events_Calendar;
use Yoast\WP\SEO\Integrations\Third_Party\Wincher;
use Yoast\WP\SEO\Integrations\Third_Party\Wordproof_Integration_Toggle;
use Yoast\WP\SEO\Routes\Indexables_Page_Route;
use Yoast\WP\SEO\Schema_Templates\Assets\Icons;

Expand All @@ -56,6 +58,8 @@
Schema_Blocks::class => '20.5',
Icons::class => '20.5',
Old_Premium_Integration::class => '20.10',
Wincher::class => '21.6',
Wordproof_Integration_Toggle::class => '21.6',
];

foreach ( $deprecated_classes as $original_class => $version ) {
Expand Down
25 changes: 0 additions & 25 deletions config/jenkins/Jenkinsfile_artifact

This file was deleted.

7 changes: 7 additions & 0 deletions css/src/introductions.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,11 @@
focus:yst-outline-none
focus:yst-ring-offset-0;
}
.yst-introduction-modal-panel {
background-image: linear-gradient(180deg, rgba(166, 30, 105, 0.25) 10%, rgba(255, 255, 255, 0.25) 50%);
}
.yst-introduction-modal-uppercase{
letter-spacing: 0.8px;
@apply yst-uppercase yst-text-slate-500;
}
}
5 changes: 5 additions & 0 deletions css/src/modal.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@

@media (min-width: 600px) {
border-radius: 8px;
max-height: calc( 100% - 48px );
}
}

Expand All @@ -80,6 +81,10 @@
margin: 0;
}

.yoast-gutenberg-modal .components-modal__content .components-modal__header {
border-bottom: 1px solid #e2e8f0 !important;
}

.yoast-gutenberg-modal .components-modal__icon-container {
display: inline-flex;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"typescript": "^4.2.4"
},
"yoast": {
"pluginVersion": "21.5-RC2"
"pluginVersion": "21.5-RC4"
},
"version": "0.0.0"
}
2 changes: 1 addition & 1 deletion packages/js/src/ai-generator/initialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const AiGeneratorUpsell = ( { fieldId } ) => {
{ __( "Use AI", "wordpress-seo" ) }
</button>
<Modal className="yst-introduction-modal" isOpen={ isModalOpen } onClose={ setIsModalOpenFalse } initialFocus={ focusElementRef }>
<Modal.Panel className="yst-max-w-lg yst-p-0 yst-bg-gradient-to-b yst-from-[#EDD2E1] yst-rounded-3xl">
<Modal.Panel className="yst-max-w-lg yst-p-0 yst-rounded-3xl yst-introduction-modal-panel">
<ModalContent onClose={ setIsModalOpenFalse } focusElementRef={ focusElementRef } />
</Modal.Panel>
</Modal>
Expand Down
1 change: 0 additions & 1 deletion packages/js/src/components/UpsellBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ class UpsellBox extends Component {
const price = newPrice ? newPrice : defaultPrice;
return (
<Fragment>
<hr className="yst-mt-1.5 yst-mb-0 yst-border-t-0 yst-border-b-slate-200" />
{ isBlackFriday &&
<div className="yst-flex yst-justify-between yst-items-center yst-text-lg yst-content-between yst-bg-black yst-text-amber-300 yst-h-9 yst-border-amber-300 yst-border-y yst-border-x-0 yst-border-solid yst-px-6">
<div>{ __( "BLACK FRIDAY", "wordpress-seo" ) }</div>
Expand Down
4 changes: 3 additions & 1 deletion packages/js/src/editor-modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import getL10nObject from "./analysis/getL10nObject";
import isZapierConnected from "./analysis/isZapierConnected";
import isZapierIntegrationActive from "./analysis/isZapierIntegrationActive";
import * as refreshAnalysis from "./analysis/refreshAnalysis";
import KeywordInput from "./components/contentAnalysis/KeywordInputComponent";
import * as mapResults from "./components/contentAnalysis/mapResults";
import HelpLink from "./components/HelpLink";
import withYoastSidebarPriority from "./components/higherorder/withYoastSidebarPriority";
Expand All @@ -29,7 +30,7 @@ import * as i18n from "./helpers/i18n";
import isBlockEditor from "./helpers/isBlockEditor";
import * as replacementVariableHelpers from "./helpers/replacementVariableHelpers";
import { update as updateAdminBar } from "./ui/adminBar";
import { updateScore, createScoresInPublishBox, scrollToCollapsible } from "./ui/publishBox";
import { createScoresInPublishBox, scrollToCollapsible, updateScore } from "./ui/publishBox";
import { update as updateTrafficLight } from "./ui/trafficLight";

window.yoast = window.yoast || {};
Expand All @@ -50,6 +51,7 @@ window.yoast.editorModules = {
withYoastSidebarPriority,
},
contentAnalysis: {
KeywordInput,
mapResults,
},
contexts: {
Expand Down
8 changes: 0 additions & 8 deletions packages/js/src/initializers/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,14 +313,6 @@ export default function initAdmin( jQuery ) {
}
} ).trigger( "change" );

// Toggle the Wincher section.
jQuery( "#wincher_integration_active input[type='radio']" ).on( "change", function() {
// The value on is enabled, off is disabled.
if ( jQuery( this ).is( ":checked" ) ) {
jQuery( "#wincher-connection" ).toggle( jQuery( this ).val() === "on" );
}
} ).trigger( "change" );

// Handle the settings pages tabs.
jQuery( "#wpseo-tabs" ).find( "a" ).on( "click", function( event ) {
var canChangeTab = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const AiGenerateTitlesAndDescriptionsUpsell = ( { learnMoreLink, thumbnai
<Badge className="yst-absolute yst-top-0 yst-right-2 yst-mt-2 yst-ml-2" variant="info">Beta</Badge>
</div>
<div className="yst-mt-6 yst-text-xs yst-font-medium">
<span className="yst-uppercase yst-text-slate-500">
<span className="yst-introduction-modal-uppercase">
{ sprintf(
/* translators: %1$s expands to Yoast SEO Premium. */
__( "New to %1$s", "wordpress-seo" ),
Expand Down
7 changes: 4 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: https://yoa.st/1up
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl.html
Tags: SEO, XML sitemap, Content analysis, Readability, Schema
Tested up to: 6.3
Tested up to: 6.4
Stable tag: 21.4
Requires PHP: 7.2.5

Expand Down Expand Up @@ -360,14 +360,15 @@ Release date: 2023-10-31

#### Bugfixes

* Specifies the correct prop type for props that can contain an interpolated string.
* Fixes a bug where console warnings about incorrect prop types would be shown on the integrations page.

#### Other

* Adds indexation exclusion for Gutenberg Patterns taxonomy.
* Improves the FAQ block description by removing any reference to the previous restriction of one block per post.
* Improves the inline documentation for the `WPSEO_Option` class. Props to @costdev.
* Improves the inline documentation for the `WPSEO_Option` class. Props to [costdev](https://github.com/costdev).
* Leverages Script Strategy feature to add the async attribute to the `wordproof` script in case WordPress version is 6.3 or higher. Props to [adamsilverstein](https://github.com/adamsilverstein).
* Sets the WordPress tested up to version to 6.4.

= 21.4 =

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

/**
* Adds the Wincher integration.
*
* @deprecated 21.6
* @codeCoverageIgnore
*/
class Wincher implements Integration_Interface {

Expand All @@ -22,6 +25,9 @@ class Wincher implements Integration_Interface {
/**
* The Wincher integration toggle constructor.
*
* @deprecated 21.6
* @codeCoverageIgnore
*
* @param Wincher_Helper $wincher The Wincher helper instance.
*/
public function __construct( Wincher_Helper $wincher ) {
Expand All @@ -31,23 +37,21 @@ public function __construct( Wincher_Helper $wincher ) {
/**
* Initializes the integration.
*
* @deprecated 21.6
* @codeCoverageIgnore
*
* @return void
*/
public function register_hooks() {
/**
* Called by Yoast_Integration_Toggles to add extra toggles to the ones defined there.
*/
\add_filter( 'wpseo_integration_toggles', [ $this, 'add_integration_toggle' ] );

/**
* Add extra text after the network integration toggle if the toggle is disabled.
*/
\add_action( 'Yoast\WP\SEO\admin_network_integration_after', [ $this, 'after_network_integration_toggle' ] );
\_deprecated_function( __METHOD__, 'Yoast SEO 21.6' );
}

/**
* Returns the conditionals based in which this loadable should be active.
*
* @deprecated 21.6
* @codeCoverageIgnore
*
* @return array The conditionals.
*/
public static function get_conditionals() {
Expand All @@ -57,69 +61,40 @@ public static function get_conditionals() {
/**
* Adds the Wincher integration toggle to the $integration_toggles array.
*
* @deprecated 21.6
* @codeCoverageIgnore
*
* @param array $integration_toggles The integration toggles array.
*
* @return array The updated integration toggles array.
*/
public function add_integration_toggle( $integration_toggles ) {
if ( \is_array( $integration_toggles ) ) {
$integration_toggles[] = (object) [
/* translators: %s: 'Wincher' */
'name' => \sprintf( \__( '%s integration', 'wordpress-seo' ), 'Wincher' ),
'setting' => 'wincher_integration_active',
'label' => \sprintf(
/* translators: %s: 'Wincher' */
\__( 'The %s integration offers the option to track specific keyphrases and gain insights in their positions.', 'wordpress-seo' ),
'Wincher'
),
'order' => 11,
'disabled' => \is_multisite(),
];
}
\_deprecated_function( __METHOD__, 'Yoast SEO 21.6' );

return $integration_toggles;
}

/**
* Adds the disabled note when the integration toggle is disabled.
*
* @deprecated 20.3
* @deprecated 21.6
* @codeCoverageIgnore
*
* @param Yoast_Feature_Toggle $integration The integration toggle class.
*/
public function after_integration_toggle( $integration ) {
\_deprecated_function( __METHOD__, 'Yoast SEO 20.3' );
if ( $integration->setting === 'wincher_integration_active' ) {
if ( \is_multisite() ) {
$this->get_disabled_note();
}
}
\_deprecated_function( __METHOD__, 'Yoast SEO 21.6' );
}

/**
* Adds the disabled note to the network integration toggle.
*
* @param Yoast_Feature_Toggle $integration The integration toggle class.
*/
public function after_network_integration_toggle( $integration ) {
if ( $integration->setting === 'wincher_integration_active' ) {
$this->get_disabled_note();
}
}

/**
* Outputs the disabled note.
*
* @deprecated 21.6
* @codeCoverageIgnore
*
* @return void
* @param Yoast_Feature_Toggle $integration The integration toggle class.
*/
protected function get_disabled_note() {
echo '<p>', \sprintf(
/* translators: %s expands to Wincher */
\esc_html__( 'Currently, the %s integration is not available for multisites.', 'wordpress-seo' ),
'Wincher'
), '</p>';
public function after_network_integration_toggle( $integration ) {
\_deprecated_function( __METHOD__, 'Yoast SEO 21.6' );
}
}
Loading

0 comments on commit 8b69ca7

Please sign in to comment.