Skip to content

Commit

Permalink
merge.
Browse files Browse the repository at this point in the history
  • Loading branch information
thijsoo committed May 7, 2024
2 parents 36c618e + 640f7b1 commit 91196f3
Show file tree
Hide file tree
Showing 21 changed files with 114 additions and 2,235 deletions.
6 changes: 6 additions & 0 deletions .phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,12 @@
<exclude-pattern>/inc/wpseo-functions-deprecated\.php$</exclude-pattern>
</rule>

<!-- Ignore unused variables in deprecated functionality. -->
<rule ref="VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable">
<exclude-pattern>/src/deprecated/*</exclude-pattern>
<exclude-pattern>/inc/wpseo-functions-deprecated\.php$</exclude-pattern>
</rule>

<!-- Exclude deprecated code from select sniffs regarding naming conventions.
These classes are still available to prevent BC-breaks and renaming them would
create a BC-break. -->
Expand Down
249 changes: 0 additions & 249 deletions admin/class-customizer.php

This file was deleted.

4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@
"Yoast\\WP\\SEO\\Composer\\Actions::check_coding_standards"
],
"check-cs-thresholds": [
"@putenv YOASTCS_THRESHOLD_ERRORS=2548",
"@putenv YOASTCS_THRESHOLD_WARNINGS=267",
"@putenv YOASTCS_THRESHOLD_ERRORS=2544",
"@putenv YOASTCS_THRESHOLD_WARNINGS=253",
"Yoast\\WP\\SEO\\Composer\\Actions::check_cs_thresholds"
],
"check-cs": [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"webpack-bundle-analyzer": "^4.9.1"
},
"yoast": {
"pluginVersion": "22.7-RC3"
"pluginVersion": "22.7-RC5"
},
"version": "0.0.0"
}
1 change: 0 additions & 1 deletion packages/js/src/initializers/post-scraper.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ export default function initPostScraper( $, store, editorData ) {
marker: getApplyMarks( store ),
contentAnalysisActive: isContentAnalysisActive(),
keywordAnalysisActive: isKeywordAnalysisActive(),
hasSnippetPreview: false,
debouncedRefresh: false,
// eslint-disable-next-line new-cap
researcher: new window.yoast.Researcher.default(),
Expand Down
1 change: 0 additions & 1 deletion packages/js/src/initializers/term-scraper.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,6 @@ export default function initTermScraper( $, store, editorData ) {
locale: wpseoScriptData.metabox.contentLocale,
contentAnalysisActive: isContentAnalysisActive(),
keywordAnalysisActive: isKeywordAnalysisActive(),
hasSnippetPreview: false,
debouncedRefresh: false,
// eslint-disable-next-line new-cap
researcher: new window.yoast.Researcher.default(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const filterReplacementVariableEditorMentions = ( mentions, { fieldId } ) => {
const isProduct = select( "yoast-seo/editor" ).getIsProduct();
const isPreviewField = fieldId === "yoast-google-preview-description-metabox" || fieldId === "yoast-google-preview-description-modal";
const dateCharacters = getDate().length;
const separatorCharacters = 3;
const emDashCharacters = 3;
const newMentions = [];
if ( ! isProduct && isPreviewField ) {
newMentions.push(
Expand All @@ -79,12 +79,13 @@ const filterReplacementVariableEditorMentions = ( mentions, { fieldId } ) => {
/* translators: %s expands to the amount of characters */
_n( "The 'Date' variable is fixed and adds %s character to the length of your meta description.", "The 'Date' variable is fixed and adds %s characters to the length of your meta description.", dateCharacters, "wordpress-seo" ), dateCharacters ) }
</MentionsWithTooltip>
<span className="yst-p-1" />
<MentionsWithTooltip mentionsName={ __( "Separator", "wordpress-seo" ) }>
&nbsp;
<MentionsWithTooltip mentionsName={ "—" }>
{ sprintf(
/* translators: %s expands to the amount of characters */
_n( "The 'Separator' variable is fixed and adds %s character to the length of your meta description.", "The 'Separator' variable is fixed and adds %s characters to the length of your meta description.", separatorCharacters, "wordpress-seo" ), separatorCharacters ) }
_n( "The em dash (—) is fixed and adds %s character to the length of your meta description.", "The em dash (—) is fixed and adds %s characters to the length of your meta description.", emDashCharacters, "wordpress-seo" ), emDashCharacters ) }
</MentionsWithTooltip>
&nbsp;
</Root>
</Fill>
);
Expand Down
7 changes: 6 additions & 1 deletion packages/js/src/structured-data-blocks/faq/block.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* External dependencies */
import { useBlockProps } from "@wordpress/block-editor";
import { registerBlockType } from "@wordpress/blocks";

/* Internal dependencies */
Expand All @@ -17,12 +18,16 @@ registerBlockType( block, {
* @returns {Component} The editor component.
*/
edit: ( { attributes, setAttributes, className } ) => {
const blockProps = useBlockProps();

// Because setAttributes is quite slow right after a block has been added we fake having a single step.
if ( ! attributes.questions || attributes.questions.length === 0 ) {
attributes.questions = [ { id: Faq.generateId( "faq-question" ), question: [], answer: [] } ];
}

return <Faq { ...{ attributes, setAttributes, className } } />;
return <div { ...blockProps }>
<Faq { ...{ attributes, setAttributes, className } } />
</div>;
},

/**
Expand Down
7 changes: 6 additions & 1 deletion packages/js/src/structured-data-blocks/how-to/block.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* External dependencies */
import { useBlockProps } from "@wordpress/block-editor";
import { registerBlockType } from "@wordpress/blocks";

/* Internal dependencies */
Expand All @@ -17,12 +18,16 @@ registerBlockType( block, {
* @returns {Component} The editor component.
*/
edit: ( { attributes, setAttributes, className } ) => {
const blockProps = useBlockProps();

// Because setAttributes is quite slow right after a block has been added we fake having a single step.
if ( ! attributes.steps || attributes.steps.length === 0 ) {
attributes.steps = [ { id: HowTo.generateId( "how-to-step" ), name: [], text: [] } ];
}

return <HowTo { ...{ attributes, setAttributes, className } } />;
return <div { ...blockProps }>
<HowTo { ...{ attributes, setAttributes, className } } />
</div>;
},

/**
Expand Down
Loading

0 comments on commit 91196f3

Please sign in to comment.