Plugin Directory

Changeset 3720725


Ignore:
Timestamp:
09/30/2026 08:45:10 AM (4 weeks ago)
Author:
eskapism
Message:

Update to version 1.4.0 from GitHub

Location:
simple-seo
Files:
20 edited
1 copied

Legend:

Unmodified
Added
Removed
  • simple-seo/tags/1.4.0/build/editor-panel.asset.php

    r3715169 r3720725  
    1010                'wp-plugins'
    1111        ),
    12         'version' => '8cc3032c4a9874fa4546'
     12        'version' => '15619d0c8ed75730152f'
    1313);
  • simple-seo/tags/1.4.0/build/editor-panel.js

    r3715169 r3720725  
    1 (()=>{"use strict";const e=window.wp.plugins,s=window.wp.editor,o=window.wp.coreData,t=window.wp.data,i=window.wp.element,n=window.wp.components,l=window.wp.i18n,r=window.ReactJSXRuntime,{otherPlugin:a,simpleHistoryUrl:p,frontPageId:_,faqUrl:m}=window.simpleSeoEditor||{};(0,e.registerPlugin)("simple-seo",{render:function(){const e=(0,t.useSelect)(e=>e(s.store).getCurrentPostType(),[]),c=(0,t.useSelect)(e=>e(s.store).getCurrentPostId(),[]),[d,h]=(0,o.useEntityProp)("postType",e,"meta");if(!d)return null;const w=""!==d._simple_seo_title.trim()||""!==d._simple_seo_description.trim()||!!d._simple_seo_noindex,u=e=>s=>h({[e]:s});return(0,r.jsx)(s.PluginDocumentSettingPanel,{name:"simple-seo",title:(0,l.__)("Simple SEO","simple-seo"),children:(0,r.jsxs)(n.Flex,{direction:"column",gap:4,children:[a&&(0,r.jsx)("p",{className:"components-base-control__help",children:(0,l.sprintf)(/* translators: %s: name of another SEO plugin, like Yoast SEO. */ /* translators: %s: name of another SEO plugin, like Yoast SEO. */
    2 (0,l.__)("%s is active and handles SEO, so these fields aren’t used.","simple-seo"),a)}),(0,r.jsx)(n.TextareaControl,{__nextHasNoMarginBottom:!0,className:"simple-seo-autogrow simple-seo-title",rows:1,label:(0,l.__)("SEO title","simple-seo"),help:c===_?(0,l.__)("The whole title of the front page.","simple-seo"):(0,l.__)("About 50 characters. The site name is added after it.","simple-seo"),value:d._simple_seo_title,onChange:e=>u("_simple_seo_title")(e.replace(/[\r\n]+/g," ")),onKeyDown:e=>{"Enter"===e.key&&e.preventDefault()}}),(0,r.jsx)(n.TextareaControl,{__nextHasNoMarginBottom:!0,className:"simple-seo-autogrow",rows:2,label:(0,l.__)("Meta description","simple-seo"),help:(0,l.__)("Often shown in search results.","simple-seo"),value:d._simple_seo_description,onChange:u("_simple_seo_description")}),(0,r.jsx)(n.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Discourage search engines from indexing this page","simple-seo"),help:(0,l.__)("It’s up to search engines to honor this request.","simple-seo"),checked:!!d._simple_seo_noindex,onChange:e=>h({_simple_seo_noindex:e})}),p&&w&&(0,r.jsx)("p",{className:"simple-seo-tip",children:(0,i.createInterpolateElement)((0,l.__)("Tip: <a>Simple History</a> logs every change to these fields.","simple-seo"),{a:(0,r.jsx)("a",{href:p})})}),(0,r.jsx)("div",{children:(0,r.jsx)(n.ExternalLink,{href:m,children:(0,l.__)("Learn more about these fields","simple-seo")})})]})})}})})();
     1(()=>{"use strict";const e=window.wp.plugins,s=window.wp.editor,i=window.wp.coreData,t=window.wp.data,o=window.wp.element,n=window.wp.components,l=window.wp.i18n,r=window.ReactJSXRuntime,{otherPlugin:a,simpleHistoryUrl:p,frontPageId:_,faqUrl:m}=window.simpleSeoEditor||{};(0,e.registerPlugin)("simple-seo",{render:function(){const e=(0,t.useSelect)(e=>e(s.store).getCurrentPostType(),[]),d=(0,t.useSelect)(e=>e(s.store).getCurrentPostId(),[]),[c,h]=(0,i.useEntityProp)("postType",e,"meta");if(!c)return null;const w=""!==c._simple_seo_title.trim()||""!==c._simple_seo_description.trim()||!!c._simple_seo_noindex,u=e=>s=>h({[e]:s});return(0,r.jsx)(s.PluginDocumentSettingPanel,{name:"simple-seo",title:(0,l.__)("Simple SEO","simple-seo"),children:(0,r.jsxs)(n.Flex,{direction:"column",gap:4,children:[a&&(0,r.jsx)(n.Notice,{status:"warning",isDismissible:!1,children:(0,l.sprintf)(/* translators: %s: name of another SEO plugin, like "Yoast SEO" or "The SEO Framework". */ /* translators: %s: name of another SEO plugin, like "Yoast SEO" or "The SEO Framework". */
     2(0,l.__)("%s plugin is active and handles SEO, so these fields aren’t used.","simple-seo"),a)}),(0,r.jsx)(n.TextareaControl,{__nextHasNoMarginBottom:!0,className:"simple-seo-autogrow simple-seo-title",rows:1,label:(0,l.__)("SEO title","simple-seo"),help:d===_?(0,l.__)("The whole title of the front page.","simple-seo"):(0,l.__)("About 50 characters. The site name is added after it.","simple-seo"),value:c._simple_seo_title,onChange:e=>u("_simple_seo_title")(e.replace(/[\r\n]+/g," ")),onKeyDown:e=>{"Enter"===e.key&&e.preventDefault()}}),(0,r.jsx)(n.TextareaControl,{__nextHasNoMarginBottom:!0,className:"simple-seo-autogrow",rows:2,label:(0,l.__)("Meta description","simple-seo"),help:(0,l.__)("Often shown in search results.","simple-seo"),value:c._simple_seo_description,onChange:u("_simple_seo_description")}),(0,r.jsx)(n.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Discourage search engines from indexing this page","simple-seo"),help:(0,l.__)("It’s up to search engines to honor this request.","simple-seo"),checked:!!c._simple_seo_noindex,onChange:e=>h({_simple_seo_noindex:e})}),p&&w&&(0,r.jsx)("p",{className:"simple-seo-tip",children:(0,o.createInterpolateElement)((0,l.__)("Tip: <a>Simple History</a> logs every change to these fields.","simple-seo"),{a:(0,r.jsx)("a",{href:p})})}),(0,r.jsx)("div",{children:(0,r.jsx)(n.ExternalLink,{href:m,children:(0,l.__)("Learn more about these fields","simple-seo")})})]})})}})})();
  • simple-seo/tags/1.4.0/js/editor-panel.js

    r3715169 r3720725  
    1818        ExternalLink,
    1919        Flex,
     20        Notice,
    2021        TextareaControl,
    2122} from '@wordpress/components';
    … …  
    5657                >
    5758                        <Flex direction="column" gap={ 4 }>
     59                                { /* A warning, not grey help text: easy to miss otherwise, and
     60                                     then the fields look like they do something. */ }
    5861                                { otherPlugin && (
    59                                         <p className="components-base-control__help">
     62                                        <Notice status="warning" isDismissible={ false }>
    6063                                                { sprintf(
    61                                                         /* translators: %s: name of another SEO plugin, like Yoast SEO. */
     64                                                        /* translators: %s: name of another SEO plugin, like "Yoast SEO" or "The SEO Framework". */
    6265                                                        __(
    63                                                                 '%s is active and handles SEO, so these fields aren’t used.',
     66                                                                '%s plugin is active and handles SEO, so these fields aren’t used.',
    6467                                                                'simple-seo'
    6568                                                        ),
    6669                                                        otherPlugin
    6770                                                ) }
    68                                         </p>
     71                                        </Notice>
    6972                                ) }
    7073
  • simple-seo/tags/1.4.0/readme.txt

    r3717579 r3720725  
    66Tested up to: 7.1
    77Requires PHP: 7.4
    8 Stable tag: 1.3.0
     8Stable tag: 1.4.0
    99License: GPLv2
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    8787== Changelog ==
    8888
     89= 1.4.0 (September 2026) =
     90- New: link previews on Bluesky, Mastodon, Facebook and friends always get a description. Without a meta description or excerpt, the start of the post is used.
     91- Fixed: with Jetpack active, pages had two meta descriptions. Jetpack's SEO Tools now step aside for Simple SEO, as they do for other SEO plugins.
     92- Changed: when another SEO plugin is active, the message saying so is a yellow notice, not easy-to-miss grey text.
     93
    8994= 1.3.0 (September 2026) =
    9095- New: the front page tells Google your site's name (a small `WebSite` JSON-LD block), which it shows next to your pages in search results.
  • simple-seo/tags/1.4.0/simple-seo.php

    r3716045 r3720725  
    44 * Plugin URI: https://wordpress.org/plugins/simple-seo/
    55 * Description: Change the page title and menu label output for any page or post, which can be useful for SEO (Search Engine Optimization) reasons. It may also increase the usability of your website, making it more friendly and understandable for your visitors.
    6  * Version: 1.3.0
     6 * Version: 1.4.0
    77 * Requires at least: 6.6
    88 * Requires PHP: 7.4
    … …  
    3535}
    3636
    37 define( 'SIMPLE_SEO_VERSION', '1.3.0' );
     37define( 'SIMPLE_SEO_VERSION', '1.4.0' );
    3838
    3939// This file must stay parseable by PHP 5.6: WordPress before 5.2 ignores "Requires PHP"
  • simple-seo/tags/1.4.0/src/classic-editor.php

    r3715169 r3720725  
    4848        $other_plugin = active_seo_plugin();
    4949
     50        // A warning, not grey help text: easy to miss otherwise.
    5051        if ( $other_plugin ) {
    5152                printf(
    52                         '<p class="description">%s</p>',
     53                        '<div class="notice notice-warning inline"><p>%s</p></div>',
    5354                        esc_html(
    5455                                sprintf(
    55                                         /* translators: %s: name of another SEO plugin, like Yoast SEO. */
    56                                         __( '%s is active and handles SEO, so these fields aren\'t used. The menu label still works.', 'simple-seo' ),
     56                                        /* translators: %s: name of another SEO plugin, like "Yoast SEO" or "The SEO Framework". */
     57                                        __( '%s plugin is active and handles SEO, so these fields aren\'t used. The menu label still works.', 'simple-seo' ),
    5758                                        $other_plugin
    5859                                )
  • simple-seo/tags/1.4.0/src/frontend.php

    r3716045 r3720725  
    3434        add_filter( 'wp_sitemaps_posts_query_args', __NAMESPACE__ . '\\sitemap_skip_noindex' );
    3535        add_filter( 'jetpack_enable_open_graph', __NAMESPACE__ . '\\jetpack_open_graph' );
     36
     37        // Jetpack's SEO Tools print a second meta description. Jetpack turns them off for the SEO
     38        // plugins it knows (its modules/seo-tools.php), with these two filters; do the same.
     39        add_filter( 'jetpack_disable_seo_tools', '__return_true' );
     40        add_filter( 'jetpack_seo_meta_tags_enabled', '__return_false' );
    3641}
    3742
  • simple-seo/tags/1.4.0/src/link-previews.php

    r3715169 r3720725  
    3030
    3131/**
     32 * The first 30 words of a post's text, for link previews. Headings are left out, so it starts
     33 * with a sentence, not "Welcome" or "Features". '' for password-protected posts.
     34 *
     35 * Like core's automatic excerpt, but without running the_content: that filter renders
     36 * everything (page builders, embeds) and other plugins act on it.
     37 *
     38 * @param int $post_id Post ID.
     39 */
     40function automatic_excerpt( int $post_id ): string {
     41        if ( post_password_required( $post_id ) ) {
     42                return '';
     43        }
     44
     45        // Text blocks only, as in core's excerpt.
     46        $content = excerpt_remove_blocks( (string) get_post_field( 'post_content', $post_id ) );
     47        $content = strip_shortcodes( $content );
     48        $content = (string) preg_replace( '#<h[1-6][^>]*>.*?</h[1-6]>#is', ' ', $content );
     49        $text    = trim( (string) preg_replace( '/\s+/', ' ', wp_strip_all_tags( $content ) ) );
     50
     51        return wp_trim_words( $text, 30 );
     52}
     53
     54/**
    3255 * Print the tags for a post, a page, the blog page or the front page. Not on archives or search.
    3356 */
    … …  
    5477                $image = featured_image( $post_id );
    5578
    56                 // No meta description: the excerpt, if someone wrote one. Not an automatic excerpt from the
    57                 // content, which is usually a worse summary than the apps' own.
     79                // No meta description: the hand-written excerpt, else the start of the content, so a
     80                // shared link never shows an empty card (2026-09-30). Link previews only: the meta
     81                // description stays hand-written.
    5882                if ( '' === $description ) {
    5983                        $description = trim( (string) preg_replace( '/\s+/', ' ', wp_strip_all_tags( (string) get_post_field( 'post_excerpt', $post_id ) ) ) );
     84                }
     85
     86                // The blog page's own content is never shown (WordPress lists the posts there), so the
     87                // tagline, as on a front page with the latest posts.
     88                if ( '' === $description ) {
     89                        $description = (int) get_option( 'page_for_posts' ) === $post_id ? get_bloginfo( 'description' ) : automatic_excerpt( $post_id );
    6090                }
    6191        }
  • simple-seo/tags/1.4.0/src/list-table.php

    r3714576 r3720725  
    8686                printf(
    8787                        '<div class="simple-seo-not-used"><span class="screen-reader-text">%s</span>',
    88                         /* translators: %s: name of another SEO plugin, like Yoast SEO. */
     88                        /* translators: %s: name of another SEO plugin, like "Yoast SEO" or "The SEO Framework". */
    8989                        esc_html( sprintf( __( 'Not used, %s handles SEO:', 'simple-seo' ), $other_plugin ) )
    9090                );
    … …  
    165165                printf(
    166166                        '<p class="description simple-seo-note">%s</p>',
    167                         /* translators: %s: name of another SEO plugin, like Yoast SEO. */
    168                         esc_html( sprintf( __( '%s is active and handles SEO, so these fields aren\'t used.', 'simple-seo' ), $other_plugin ) )
     167                        /* translators: %s: name of another SEO plugin, like "Yoast SEO" or "The SEO Framework". */
     168                        esc_html( sprintf( __( '%s plugin is active and handles SEO, so these fields aren\'t used.', 'simple-seo' ), $other_plugin ) )
    169169                );
    170170        }
  • simple-seo/tags/1.4.0/src/settings.php

    r3715169 r3720725  
    6161
    6262        $text = $other_plugin
    63                 /* translators: %s: name of another SEO plugin, like Yoast SEO. */
    64                 ? sprintf( __( 'Settings from the Simple SEO plugin. %s is active and handles SEO, so this isn\'t used.', 'simple-seo' ), $other_plugin )
     63                /* translators: %s: name of another SEO plugin, like "Yoast SEO" or "The SEO Framework". */
     64                ? sprintf( __( 'Settings from the Simple SEO plugin. %s plugin is active and handles SEO, so this isn\'t used.', 'simple-seo' ), $other_plugin )
    6565                : __( 'Settings from the Simple SEO plugin. The SEO title, description and "Discourage search engines" are on each post and page.', 'simple-seo' );
    6666
  • simple-seo/trunk/build/editor-panel.asset.php

    r3715169 r3720725  
    1010                'wp-plugins'
    1111        ),
    12         'version' => '8cc3032c4a9874fa4546'
     12        'version' => '15619d0c8ed75730152f'
    1313);
  • simple-seo/trunk/build/editor-panel.js

    r3715169 r3720725  
    1 (()=>{"use strict";const e=window.wp.plugins,s=window.wp.editor,o=window.wp.coreData,t=window.wp.data,i=window.wp.element,n=window.wp.components,l=window.wp.i18n,r=window.ReactJSXRuntime,{otherPlugin:a,simpleHistoryUrl:p,frontPageId:_,faqUrl:m}=window.simpleSeoEditor||{};(0,e.registerPlugin)("simple-seo",{render:function(){const e=(0,t.useSelect)(e=>e(s.store).getCurrentPostType(),[]),c=(0,t.useSelect)(e=>e(s.store).getCurrentPostId(),[]),[d,h]=(0,o.useEntityProp)("postType",e,"meta");if(!d)return null;const w=""!==d._simple_seo_title.trim()||""!==d._simple_seo_description.trim()||!!d._simple_seo_noindex,u=e=>s=>h({[e]:s});return(0,r.jsx)(s.PluginDocumentSettingPanel,{name:"simple-seo",title:(0,l.__)("Simple SEO","simple-seo"),children:(0,r.jsxs)(n.Flex,{direction:"column",gap:4,children:[a&&(0,r.jsx)("p",{className:"components-base-control__help",children:(0,l.sprintf)(/* translators: %s: name of another SEO plugin, like Yoast SEO. */ /* translators: %s: name of another SEO plugin, like Yoast SEO. */
    2 (0,l.__)("%s is active and handles SEO, so these fields aren’t used.","simple-seo"),a)}),(0,r.jsx)(n.TextareaControl,{__nextHasNoMarginBottom:!0,className:"simple-seo-autogrow simple-seo-title",rows:1,label:(0,l.__)("SEO title","simple-seo"),help:c===_?(0,l.__)("The whole title of the front page.","simple-seo"):(0,l.__)("About 50 characters. The site name is added after it.","simple-seo"),value:d._simple_seo_title,onChange:e=>u("_simple_seo_title")(e.replace(/[\r\n]+/g," ")),onKeyDown:e=>{"Enter"===e.key&&e.preventDefault()}}),(0,r.jsx)(n.TextareaControl,{__nextHasNoMarginBottom:!0,className:"simple-seo-autogrow",rows:2,label:(0,l.__)("Meta description","simple-seo"),help:(0,l.__)("Often shown in search results.","simple-seo"),value:d._simple_seo_description,onChange:u("_simple_seo_description")}),(0,r.jsx)(n.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Discourage search engines from indexing this page","simple-seo"),help:(0,l.__)("It’s up to search engines to honor this request.","simple-seo"),checked:!!d._simple_seo_noindex,onChange:e=>h({_simple_seo_noindex:e})}),p&&w&&(0,r.jsx)("p",{className:"simple-seo-tip",children:(0,i.createInterpolateElement)((0,l.__)("Tip: <a>Simple History</a> logs every change to these fields.","simple-seo"),{a:(0,r.jsx)("a",{href:p})})}),(0,r.jsx)("div",{children:(0,r.jsx)(n.ExternalLink,{href:m,children:(0,l.__)("Learn more about these fields","simple-seo")})})]})})}})})();
     1(()=>{"use strict";const e=window.wp.plugins,s=window.wp.editor,i=window.wp.coreData,t=window.wp.data,o=window.wp.element,n=window.wp.components,l=window.wp.i18n,r=window.ReactJSXRuntime,{otherPlugin:a,simpleHistoryUrl:p,frontPageId:_,faqUrl:m}=window.simpleSeoEditor||{};(0,e.registerPlugin)("simple-seo",{render:function(){const e=(0,t.useSelect)(e=>e(s.store).getCurrentPostType(),[]),d=(0,t.useSelect)(e=>e(s.store).getCurrentPostId(),[]),[c,h]=(0,i.useEntityProp)("postType",e,"meta");if(!c)return null;const w=""!==c._simple_seo_title.trim()||""!==c._simple_seo_description.trim()||!!c._simple_seo_noindex,u=e=>s=>h({[e]:s});return(0,r.jsx)(s.PluginDocumentSettingPanel,{name:"simple-seo",title:(0,l.__)("Simple SEO","simple-seo"),children:(0,r.jsxs)(n.Flex,{direction:"column",gap:4,children:[a&&(0,r.jsx)(n.Notice,{status:"warning",isDismissible:!1,children:(0,l.sprintf)(/* translators: %s: name of another SEO plugin, like "Yoast SEO" or "The SEO Framework". */ /* translators: %s: name of another SEO plugin, like "Yoast SEO" or "The SEO Framework". */
     2(0,l.__)("%s plugin is active and handles SEO, so these fields aren’t used.","simple-seo"),a)}),(0,r.jsx)(n.TextareaControl,{__nextHasNoMarginBottom:!0,className:"simple-seo-autogrow simple-seo-title",rows:1,label:(0,l.__)("SEO title","simple-seo"),help:d===_?(0,l.__)("The whole title of the front page.","simple-seo"):(0,l.__)("About 50 characters. The site name is added after it.","simple-seo"),value:c._simple_seo_title,onChange:e=>u("_simple_seo_title")(e.replace(/[\r\n]+/g," ")),onKeyDown:e=>{"Enter"===e.key&&e.preventDefault()}}),(0,r.jsx)(n.TextareaControl,{__nextHasNoMarginBottom:!0,className:"simple-seo-autogrow",rows:2,label:(0,l.__)("Meta description","simple-seo"),help:(0,l.__)("Often shown in search results.","simple-seo"),value:c._simple_seo_description,onChange:u("_simple_seo_description")}),(0,r.jsx)(n.CheckboxControl,{__nextHasNoMarginBottom:!0,label:(0,l.__)("Discourage search engines from indexing this page","simple-seo"),help:(0,l.__)("It’s up to search engines to honor this request.","simple-seo"),checked:!!c._simple_seo_noindex,onChange:e=>h({_simple_seo_noindex:e})}),p&&w&&(0,r.jsx)("p",{className:"simple-seo-tip",children:(0,o.createInterpolateElement)((0,l.__)("Tip: <a>Simple History</a> logs every change to these fields.","simple-seo"),{a:(0,r.jsx)("a",{href:p})})}),(0,r.jsx)("div",{children:(0,r.jsx)(n.ExternalLink,{href:m,children:(0,l.__)("Learn more about these fields","simple-seo")})})]})})}})})();
  • simple-seo/trunk/js/editor-panel.js

    r3715169 r3720725  
    1818        ExternalLink,
    1919        Flex,
     20        Notice,
    2021        TextareaControl,
    2122} from '@wordpress/components';
    … …  
    5657                >
    5758                        <Flex direction="column" gap={ 4 }>
     59                                { /* A warning, not grey help text: easy to miss otherwise, and
     60                                     then the fields look like they do something. */ }
    5861                                { otherPlugin && (
    59                                         <p className="components-base-control__help">
     62                                        <Notice status="warning" isDismissible={ false }>
    6063                                                { sprintf(
    61                                                         /* translators: %s: name of another SEO plugin, like Yoast SEO. */
     64                                                        /* translators: %s: name of another SEO plugin, like "Yoast SEO" or "The SEO Framework". */
    6265                                                        __(
    63                                                                 '%s is active and handles SEO, so these fields aren’t used.',
     66                                                                '%s plugin is active and handles SEO, so these fields aren’t used.',
    6467                                                                'simple-seo'
    6568                                                        ),
    6669                                                        otherPlugin
    6770                                                ) }
    68                                         </p>
     71                                        </Notice>
    6972                                ) }
    7073
  • simple-seo/trunk/readme.txt

    r3717579 r3720725  
    66Tested up to: 7.1
    77Requires PHP: 7.4
    8 Stable tag: 1.3.0
     8Stable tag: 1.4.0
    99License: GPLv2
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    8787== Changelog ==
    8888
     89= 1.4.0 (September 2026) =
     90- New: link previews on Bluesky, Mastodon, Facebook and friends always get a description. Without a meta description or excerpt, the start of the post is used.
     91- Fixed: with Jetpack active, pages had two meta descriptions. Jetpack's SEO Tools now step aside for Simple SEO, as they do for other SEO plugins.
     92- Changed: when another SEO plugin is active, the message saying so is a yellow notice, not easy-to-miss grey text.
     93
    8994= 1.3.0 (September 2026) =
    9095- New: the front page tells Google your site's name (a small `WebSite` JSON-LD block), which it shows next to your pages in search results.
  • simple-seo/trunk/simple-seo.php

    r3716045 r3720725  
    44 * Plugin URI: https://wordpress.org/plugins/simple-seo/
    55 * Description: Change the page title and menu label output for any page or post, which can be useful for SEO (Search Engine Optimization) reasons. It may also increase the usability of your website, making it more friendly and understandable for your visitors.
    6  * Version: 1.3.0
     6 * Version: 1.4.0
    77 * Requires at least: 6.6
    88 * Requires PHP: 7.4
    … …  
    3535}
    3636
    37 define( 'SIMPLE_SEO_VERSION', '1.3.0' );
     37define( 'SIMPLE_SEO_VERSION', '1.4.0' );
    3838
    3939// This file must stay parseable by PHP 5.6: WordPress before 5.2 ignores "Requires PHP"
  • simple-seo/trunk/src/classic-editor.php

    r3715169 r3720725  
    4848        $other_plugin = active_seo_plugin();
    4949
     50        // A warning, not grey help text: easy to miss otherwise.
    5051        if ( $other_plugin ) {
    5152                printf(
    52                         '<p class="description">%s</p>',
     53                        '<div class="notice notice-warning inline"><p>%s</p></div>',
    5354                        esc_html(
    5455                                sprintf(
    55                                         /* translators: %s: name of another SEO plugin, like Yoast SEO. */
    56                                         __( '%s is active and handles SEO, so these fields aren\'t used. The menu label still works.', 'simple-seo' ),
     56                                        /* translators: %s: name of another SEO plugin, like "Yoast SEO" or "The SEO Framework". */
     57                                        __( '%s plugin is active and handles SEO, so these fields aren\'t used. The menu label still works.', 'simple-seo' ),
    5758                                        $other_plugin
    5859                                )
  • simple-seo/trunk/src/frontend.php

    r3716045 r3720725  
    3434        add_filter( 'wp_sitemaps_posts_query_args', __NAMESPACE__ . '\\sitemap_skip_noindex' );
    3535        add_filter( 'jetpack_enable_open_graph', __NAMESPACE__ . '\\jetpack_open_graph' );
     36
     37        // Jetpack's SEO Tools print a second meta description. Jetpack turns them off for the SEO
     38        // plugins it knows (its modules/seo-tools.php), with these two filters; do the same.
     39        add_filter( 'jetpack_disable_seo_tools', '__return_true' );
     40        add_filter( 'jetpack_seo_meta_tags_enabled', '__return_false' );
    3641}
    3742
  • simple-seo/trunk/src/link-previews.php

    r3715169 r3720725  
    3030
    3131/**
     32 * The first 30 words of a post's text, for link previews. Headings are left out, so it starts
     33 * with a sentence, not "Welcome" or "Features". '' for password-protected posts.
     34 *
     35 * Like core's automatic excerpt, but without running the_content: that filter renders
     36 * everything (page builders, embeds) and other plugins act on it.
     37 *
     38 * @param int $post_id Post ID.
     39 */
     40function automatic_excerpt( int $post_id ): string {
     41        if ( post_password_required( $post_id ) ) {
     42                return '';
     43        }
     44
     45        // Text blocks only, as in core's excerpt.
     46        $content = excerpt_remove_blocks( (string) get_post_field( 'post_content', $post_id ) );
     47        $content = strip_shortcodes( $content );
     48        $content = (string) preg_replace( '#<h[1-6][^>]*>.*?</h[1-6]>#is', ' ', $content );
     49        $text    = trim( (string) preg_replace( '/\s+/', ' ', wp_strip_all_tags( $content ) ) );
     50
     51        return wp_trim_words( $text, 30 );
     52}
     53
     54/**
    3255 * Print the tags for a post, a page, the blog page or the front page. Not on archives or search.
    3356 */
    … …  
    5477                $image = featured_image( $post_id );
    5578
    56                 // No meta description: the excerpt, if someone wrote one. Not an automatic excerpt from the
    57                 // content, which is usually a worse summary than the apps' own.
     79                // No meta description: the hand-written excerpt, else the start of the content, so a
     80                // shared link never shows an empty card (2026-09-30). Link previews only: the meta
     81                // description stays hand-written.
    5882                if ( '' === $description ) {
    5983                        $description = trim( (string) preg_replace( '/\s+/', ' ', wp_strip_all_tags( (string) get_post_field( 'post_excerpt', $post_id ) ) ) );
     84                }
     85
     86                // The blog page's own content is never shown (WordPress lists the posts there), so the
     87                // tagline, as on a front page with the latest posts.
     88                if ( '' === $description ) {
     89                        $description = (int) get_option( 'page_for_posts' ) === $post_id ? get_bloginfo( 'description' ) : automatic_excerpt( $post_id );
    6090                }
    6191        }
  • simple-seo/trunk/src/list-table.php

    r3714576 r3720725  
    8686                printf(
    8787                        '<div class="simple-seo-not-used"><span class="screen-reader-text">%s</span>',
    88                         /* translators: %s: name of another SEO plugin, like Yoast SEO. */
     88                        /* translators: %s: name of another SEO plugin, like "Yoast SEO" or "The SEO Framework". */
    8989                        esc_html( sprintf( __( 'Not used, %s handles SEO:', 'simple-seo' ), $other_plugin ) )
    9090                );
    … …  
    165165                printf(
    166166                        '<p class="description simple-seo-note">%s</p>',
    167                         /* translators: %s: name of another SEO plugin, like Yoast SEO. */
    168                         esc_html( sprintf( __( '%s is active and handles SEO, so these fields aren\'t used.', 'simple-seo' ), $other_plugin ) )
     167                        /* translators: %s: name of another SEO plugin, like "Yoast SEO" or "The SEO Framework". */
     168                        esc_html( sprintf( __( '%s plugin is active and handles SEO, so these fields aren\'t used.', 'simple-seo' ), $other_plugin ) )
    169169                );
    170170        }
  • simple-seo/trunk/src/settings.php

    r3715169 r3720725  
    6161
    6262        $text = $other_plugin
    63                 /* translators: %s: name of another SEO plugin, like Yoast SEO. */
    64                 ? sprintf( __( 'Settings from the Simple SEO plugin. %s is active and handles SEO, so this isn\'t used.', 'simple-seo' ), $other_plugin )
     63                /* translators: %s: name of another SEO plugin, like "Yoast SEO" or "The SEO Framework". */
     64                ? sprintf( __( 'Settings from the Simple SEO plugin. %s plugin is active and handles SEO, so this isn\'t used.', 'simple-seo' ), $other_plugin )
    6565                : __( 'Settings from the Simple SEO plugin. The SEO title, description and "Discourage search engines" are on each post and page.', 'simple-seo' );
    6666
Note: See TracChangeset for help on using the changeset viewer.