Plugin Directory

Changeset 2913286


Ignore:
Timestamp:
05/17/2023 12:34:03 AM (3 years ago)
Author:
anthonyeden
Message:

Version 1.4.1

Location:
restful-syndication
Files:
2 edited
3 copied

Legend:

Unmodified
Added
Removed
  • restful-syndication/tags/1.4.1/index.php

    r2893200 r2913286  
    44Plugin URI: https://mediarealm.com.au/
    55Description: Import content from the Wordpress REST API on another Wordpress site
    6 Version: 1.4.0
     6Version: 1.4.1
    77Author: Media Realm
    88Author URI: https://www.mediarealm.com.au/
     
    675675        }
    676676
    677         if(!isset($post['yoast_meta']['yoast_wpseo_metadesc'])) {
    678             $post['yoast_meta']['yoast_wpseo_metadesc'] = "";
    679         }
    680 
    681         if(!isset($post['yoast_meta']['yoast_wpseo_canonical'])) {
    682             $post['yoast_meta']['yoast_wpseo_canonical'] = $post['link'];
     677        if(!isset($post['yoast_meta']['yoast_wpseo_metadesc']) || empty($post['yoast_meta']['yoast_wpseo_metadesc'])) {
     678            if(isset($post['yoast_head_json']['description']) && !empty($post['yoast_head_json']['description'])) {
     679                $post['yoast_meta']['yoast_wpseo_metadesc'] = $post['yoast_head_json']['description'];
     680            } else {
     681                $post['yoast_meta']['yoast_wpseo_metadesc'] = "";
     682            }
     683        }
     684
     685        if(!isset($post['yoast_meta']['yoast_wpseo_canonical']) || empty($post['yoast_meta']['yoast_wpseo_canonical'])) {
     686            if(isset($post['yoast_head_json']['canonical']) && !empty($post['yoast_head_json']['canonical'])) {
     687                $post['yoast_meta']['yoast_wpseo_canonical'] = $post['yoast_head_json']['canonical'];
     688            } else {
     689                $post['yoast_meta']['yoast_wpseo_canonical'] = $post['link'];
     690            }
    683691        }
    684692
  • restful-syndication/tags/1.4.1/readme.txt

    r2893200 r2913286  
    33Tags: syndication, rest, wp-rest
    44Requires at least: 5.9.5
    5 Tested up to: 6.1.1
     5Tested up to: 6.2
    66Requires PHP: 7.3.0
    77License: GPLv2 or later
     
    3939No, so long as the master site has the Wordpress REST API enabled, then you're all good to go.
    4040
    41 If you use Yoast, you can optionally install https://github.com/ChazUK/wp-api-yoast-meta to get canonical URLs and Meta Descriptions.
     41If both the Master and Child sites use Yoast SEO, the Canonical URLs and Meta Descriptions of each post will also be imported.
    4242
    4343= I'm having trouble connecting to a HTTPS Master Site, but HTTP works fine. =
     
    5959== Changelog ==
    6060
     61= 1.4.1 =
     62
     63* Uses the native Yoast SEO REST fields, instead of fields supplied by a third party plugin
     64* Adds additional checks to see if Yoast fields are populated or empty
     65
    6166= 1.4.0 =
    6267
    63 * Adds an option for add a specific category to every incoming post
     68* Adds an option to add a specific category to every incoming post
    6469* Tracks syndicated media in a meta field, instead of relying on the filename.
    6570
  • restful-syndication/trunk/index.php

    r2893200 r2913286  
    44Plugin URI: https://mediarealm.com.au/
    55Description: Import content from the Wordpress REST API on another Wordpress site
    6 Version: 1.4.0
     6Version: 1.4.1
    77Author: Media Realm
    88Author URI: https://www.mediarealm.com.au/
     
    675675        }
    676676
    677         if(!isset($post['yoast_meta']['yoast_wpseo_metadesc'])) {
    678             $post['yoast_meta']['yoast_wpseo_metadesc'] = "";
    679         }
    680 
    681         if(!isset($post['yoast_meta']['yoast_wpseo_canonical'])) {
    682             $post['yoast_meta']['yoast_wpseo_canonical'] = $post['link'];
     677        if(!isset($post['yoast_meta']['yoast_wpseo_metadesc']) || empty($post['yoast_meta']['yoast_wpseo_metadesc'])) {
     678            if(isset($post['yoast_head_json']['description']) && !empty($post['yoast_head_json']['description'])) {
     679                $post['yoast_meta']['yoast_wpseo_metadesc'] = $post['yoast_head_json']['description'];
     680            } else {
     681                $post['yoast_meta']['yoast_wpseo_metadesc'] = "";
     682            }
     683        }
     684
     685        if(!isset($post['yoast_meta']['yoast_wpseo_canonical']) || empty($post['yoast_meta']['yoast_wpseo_canonical'])) {
     686            if(isset($post['yoast_head_json']['canonical']) && !empty($post['yoast_head_json']['canonical'])) {
     687                $post['yoast_meta']['yoast_wpseo_canonical'] = $post['yoast_head_json']['canonical'];
     688            } else {
     689                $post['yoast_meta']['yoast_wpseo_canonical'] = $post['link'];
     690            }
    683691        }
    684692
  • restful-syndication/trunk/readme.txt

    r2893200 r2913286  
    33Tags: syndication, rest, wp-rest
    44Requires at least: 5.9.5
    5 Tested up to: 6.1.1
     5Tested up to: 6.2
    66Requires PHP: 7.3.0
    77License: GPLv2 or later
     
    3939No, so long as the master site has the Wordpress REST API enabled, then you're all good to go.
    4040
    41 If you use Yoast, you can optionally install https://github.com/ChazUK/wp-api-yoast-meta to get canonical URLs and Meta Descriptions.
     41If both the Master and Child sites use Yoast SEO, the Canonical URLs and Meta Descriptions of each post will also be imported.
    4242
    4343= I'm having trouble connecting to a HTTPS Master Site, but HTTP works fine. =
     
    5959== Changelog ==
    6060
     61= 1.4.1 =
     62
     63* Uses the native Yoast SEO REST fields, instead of fields supplied by a third party plugin
     64* Adds additional checks to see if Yoast fields are populated or empty
     65
    6166= 1.4.0 =
    6267
    63 * Adds an option for add a specific category to every incoming post
     68* Adds an option to add a specific category to every incoming post
    6469* Tracks syndicated media in a meta field, instead of relying on the filename.
    6570
Note: See TracChangeset for help on using the changeset viewer.