Changeset 3039236
- Timestamp:
- 02/21/2024 02:30:51 PM (2 years ago)
- Location:
- diagnoseo
- Files:
-
- 3 edited
- 37 copied
-
tags/1.2.27 (copied) (copied from diagnoseo/trunk)
-
tags/1.2.27/css/diagnoseo-admin.css (copied) (copied from diagnoseo/trunk/css/diagnoseo-admin.css)
-
tags/1.2.27/css/diagnoseo-editor.css (copied) (copied from diagnoseo/trunk/css/diagnoseo-editor.css)
-
tags/1.2.27/diagnoseo.php (copied) (copied from diagnoseo/trunk/diagnoseo.php) (1 diff)
-
tags/1.2.27/includes/admin-bar-menu.php (copied) (copied from diagnoseo/trunk/includes/admin-bar-menu.php)
-
tags/1.2.27/includes/api-endpoints.php (copied) (copied from diagnoseo/trunk/includes/api-endpoints.php)
-
tags/1.2.27/includes/assets.php (copied) (copied from diagnoseo/trunk/includes/assets.php)
-
tags/1.2.27/includes/blocks.php (copied) (copied from diagnoseo/trunk/includes/blocks.php)
-
tags/1.2.27/includes/blocks/breadcrumbs/breadcrumbs.php (copied) (copied from diagnoseo/trunk/includes/blocks/breadcrumbs/breadcrumbs.php)
-
tags/1.2.27/includes/category-links.php (copied) (copied from diagnoseo/trunk/includes/category-links.php)
-
tags/1.2.27/includes/class-diagnoseo-breadcrumbs.php (copied) (copied from diagnoseo/trunk/includes/class-diagnoseo-breadcrumbs.php)
-
tags/1.2.27/includes/class-diagnoseo-generalsettings.php (copied) (copied from diagnoseo/trunk/includes/class-diagnoseo-generalsettings.php)
-
tags/1.2.27/includes/class-diagnoseo-metatags.php (copied) (copied from diagnoseo/trunk/includes/class-diagnoseo-metatags.php)
-
tags/1.2.27/includes/class-diagnoseo-metatagsettings.php (copied) (copied from diagnoseo/trunk/includes/class-diagnoseo-metatagsettings.php)
-
tags/1.2.27/includes/class-diagnoseo-schemasettings.php (copied) (copied from diagnoseo/trunk/includes/class-diagnoseo-schemasettings.php)
-
tags/1.2.27/includes/class-diagnoseo-settings.php (copied) (copied from diagnoseo/trunk/includes/class-diagnoseo-settings.php)
-
tags/1.2.27/includes/class-diagnoseo-settingshelper.php (copied) (copied from diagnoseo/trunk/includes/class-diagnoseo-settingshelper.php)
-
tags/1.2.27/includes/class-diagnoseo-socialsettings.php (copied) (copied from diagnoseo/trunk/includes/class-diagnoseo-socialsettings.php)
-
tags/1.2.27/includes/content-watcher-meta.php (copied) (copied from diagnoseo/trunk/includes/content-watcher-meta.php)
-
tags/1.2.27/includes/content-watcher-scripts.php (copied) (copied from diagnoseo/trunk/includes/content-watcher-scripts.php)
-
tags/1.2.27/includes/customize/breadcrumbs.php (copied) (copied from diagnoseo/trunk/includes/customize/breadcrumbs.php)
-
tags/1.2.27/includes/customize/customize-utils.php (copied) (copied from diagnoseo/trunk/includes/customize/customize-utils.php)
-
tags/1.2.27/includes/customize/defaults.php (copied) (copied from diagnoseo/trunk/includes/customize/defaults.php)
-
tags/1.2.27/includes/metabox-seo-settings.php (copied) (copied from diagnoseo/trunk/includes/metabox-seo-settings.php)
-
tags/1.2.27/includes/option-defaults.php (copied) (copied from diagnoseo/trunk/includes/option-defaults.php)
-
tags/1.2.27/includes/sitemap.php (copied) (copied from diagnoseo/trunk/includes/sitemap.php)
-
tags/1.2.27/includes/structured-data.php (copied) (copied from diagnoseo/trunk/includes/structured-data.php) (5 diffs)
-
tags/1.2.27/includes/utils.php (copied) (copied from diagnoseo/trunk/includes/utils.php)
-
tags/1.2.27/js/blocks/breadcrumbs.min.js (copied) (copied from diagnoseo/trunk/js/blocks/breadcrumbs.min.js)
-
tags/1.2.27/js/build/index.js (copied) (copied from diagnoseo/trunk/js/build/index.js)
-
tags/1.2.27/js/diagnoseo-checks.min.js (copied) (copied from diagnoseo/trunk/js/diagnoseo-checks.min.js)
-
tags/1.2.27/js/diagnoseo-editor-metabox.min.js (copied) (copied from diagnoseo/trunk/js/diagnoseo-editor-metabox.min.js)
-
tags/1.2.27/js/diagnoseo-editor.min.js (copied) (copied from diagnoseo/trunk/js/diagnoseo-editor.min.js)
-
tags/1.2.27/js/diagnoseo.min.js (copied) (copied from diagnoseo/trunk/js/diagnoseo.min.js)
-
tags/1.2.27/languages (copied) (copied from diagnoseo/trunk/languages)
-
tags/1.2.27/readme.txt (copied) (copied from diagnoseo/trunk/readme.txt) (1 diff)
-
tags/1.2.27/wpml-config.xml (copied) (copied from diagnoseo/trunk/wpml-config.xml)
-
trunk/diagnoseo.php (modified) (1 diff)
-
trunk/includes/structured-data.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
diagnoseo/tags/1.2.27/diagnoseo.php
r3039163 r3039236 4 4 * Plugin URI: https://diagnoseo.com/wordpress-seo-plugin/ 5 5 * Description: Powerful SEO plugin for WordPress. The most lightweight and complete SEO solution on the market! It includes best-in-class content analyzer and keyword placement checkpoints. 6 * Version: 1.2.2 66 * Version: 1.2.27 7 7 * Author: DiagnoSEO 8 8 * Author URI: https://diagnoseo.com/ -
diagnoseo/tags/1.2.27/includes/structured-data.php
r3032390 r3039236 48 48 $type = '@type'; 49 49 $context = '@context'; 50 $id = '@id'; 50 51 51 52 switch ( $post_data->post_type ) { … … 72 73 $schema->author->$type = 'Person'; 73 74 $schema->author->name = get_the_author_meta( 'display_name', $post_data->post_author ); 75 76 $reviewedby_name = get_option( 'diagnoseo_reviewedby_name', '' ); 77 $reviewedby_url = get_option( 'diagnoseo_reviewedby_url', '' ); 78 79 if ( ! empty( $reviewedby_name ) ) { 80 if ( 'WebPage' === $schema_type ) { 81 $schema->reviewedBy = diagnoseo_get_reviewedby_schema( null ); // phpcs:ignore 82 } else { 83 $main_entity = new stdClass(); 84 $main_entity->$type = 'WebPage'; 85 $main_entity->$id = get_the_permalink( $post_data->ID ); 86 $main_entity->name = get_the_title( $post_data->ID ); 87 $main_entity->reviewedBy = diagnoseo_get_reviewedby_schema( null ); // phpcs:ignore 88 89 $schema->mainEntityOfPage = $main_entity; // phpcs:ignore 90 } 91 } 74 92 } 75 93 } … … 1107 1125 */ 1108 1126 function diagnoseo_get_reviewedby_schema( $data ) { 1109 if ( empty( $data->reviewedby_name ) ) {1127 if ( empty( $data->reviewedby_name ) && empty( get_option( 'diagnoseo_reviewedby_name' ) ) ) { 1110 1128 return ''; 1111 1129 } … … 1114 1132 1115 1133 $schema = new stdClass(); 1116 $schema->$type = $data->reviewedby_type; 1117 $schema->name = $data->reviewedby_name; 1118 if ( ! empty( $data->reviewedby_url ) ) { 1119 $schema->url = $data->reviewedby_url; 1120 } 1134 $schema->$type = empty( $data->reviewedby_type ) ? get_option( 'diagnoseo_reviewedby_type', 'Person' ) : $data->reviewedby_type; 1135 $schema->name = empty( $data->reviewedby_name ) ? get_option( 'diagnoseo_reviewedby_name', '' ) : $data->reviewedby_name; 1136 $schema->url = empty( $data->reviewedby_url ) ? get_option( 'diagnoseo_reviewedby_url', '' ) : $data->reviewedby_url; 1121 1137 1122 1138 return $schema; … … 1133 1149 global $post; 1134 1150 1135 $schema = new stdClass(); 1136 $schema->$type = 'WebPage'; 1137 $schema->$id = get_the_permalink( $post->ID ); 1138 $schema->name = get_the_title( $post->ID ); 1139 if ( ! empty( $data->reviewedby_name ) ) { 1140 $schema->reviewedBy = diagnoseo_get_reviewedby_schema( $data ); // phpcs:ignore 1141 } 1151 $schema = new stdClass(); 1152 $schema->$type = 'WebPage'; 1153 $schema->$id = get_the_permalink( $post->ID ); 1154 $schema->name = get_the_title( $post->ID ); 1155 $schema->reviewedBy = diagnoseo_get_reviewedby_schema( $data ); // phpcs:ignore 1142 1156 1143 1157 return $schema; -
diagnoseo/tags/1.2.27/readme.txt
r3039163 r3039236 4 4 Requires at least: 4.7 5 5 Tested up to: 6.4.3 6 Stable tag: 1.2.2 66 Stable tag: 1.2.27 7 7 Requires PHP: 5.0 8 8 License: GPLv2 or later -
diagnoseo/trunk/diagnoseo.php
r3039163 r3039236 4 4 * Plugin URI: https://diagnoseo.com/wordpress-seo-plugin/ 5 5 * Description: Powerful SEO plugin for WordPress. The most lightweight and complete SEO solution on the market! It includes best-in-class content analyzer and keyword placement checkpoints. 6 * Version: 1.2.2 66 * Version: 1.2.27 7 7 * Author: DiagnoSEO 8 8 * Author URI: https://diagnoseo.com/ -
diagnoseo/trunk/includes/structured-data.php
r3032390 r3039236 48 48 $type = '@type'; 49 49 $context = '@context'; 50 $id = '@id'; 50 51 51 52 switch ( $post_data->post_type ) { … … 72 73 $schema->author->$type = 'Person'; 73 74 $schema->author->name = get_the_author_meta( 'display_name', $post_data->post_author ); 75 76 $reviewedby_name = get_option( 'diagnoseo_reviewedby_name', '' ); 77 $reviewedby_url = get_option( 'diagnoseo_reviewedby_url', '' ); 78 79 if ( ! empty( $reviewedby_name ) ) { 80 if ( 'WebPage' === $schema_type ) { 81 $schema->reviewedBy = diagnoseo_get_reviewedby_schema( null ); // phpcs:ignore 82 } else { 83 $main_entity = new stdClass(); 84 $main_entity->$type = 'WebPage'; 85 $main_entity->$id = get_the_permalink( $post_data->ID ); 86 $main_entity->name = get_the_title( $post_data->ID ); 87 $main_entity->reviewedBy = diagnoseo_get_reviewedby_schema( null ); // phpcs:ignore 88 89 $schema->mainEntityOfPage = $main_entity; // phpcs:ignore 90 } 91 } 74 92 } 75 93 } … … 1107 1125 */ 1108 1126 function diagnoseo_get_reviewedby_schema( $data ) { 1109 if ( empty( $data->reviewedby_name ) ) {1127 if ( empty( $data->reviewedby_name ) && empty( get_option( 'diagnoseo_reviewedby_name' ) ) ) { 1110 1128 return ''; 1111 1129 } … … 1114 1132 1115 1133 $schema = new stdClass(); 1116 $schema->$type = $data->reviewedby_type; 1117 $schema->name = $data->reviewedby_name; 1118 if ( ! empty( $data->reviewedby_url ) ) { 1119 $schema->url = $data->reviewedby_url; 1120 } 1134 $schema->$type = empty( $data->reviewedby_type ) ? get_option( 'diagnoseo_reviewedby_type', 'Person' ) : $data->reviewedby_type; 1135 $schema->name = empty( $data->reviewedby_name ) ? get_option( 'diagnoseo_reviewedby_name', '' ) : $data->reviewedby_name; 1136 $schema->url = empty( $data->reviewedby_url ) ? get_option( 'diagnoseo_reviewedby_url', '' ) : $data->reviewedby_url; 1121 1137 1122 1138 return $schema; … … 1133 1149 global $post; 1134 1150 1135 $schema = new stdClass(); 1136 $schema->$type = 'WebPage'; 1137 $schema->$id = get_the_permalink( $post->ID ); 1138 $schema->name = get_the_title( $post->ID ); 1139 if ( ! empty( $data->reviewedby_name ) ) { 1140 $schema->reviewedBy = diagnoseo_get_reviewedby_schema( $data ); // phpcs:ignore 1141 } 1151 $schema = new stdClass(); 1152 $schema->$type = 'WebPage'; 1153 $schema->$id = get_the_permalink( $post->ID ); 1154 $schema->name = get_the_title( $post->ID ); 1155 $schema->reviewedBy = diagnoseo_get_reviewedby_schema( $data ); // phpcs:ignore 1142 1156 1143 1157 return $schema; -
diagnoseo/trunk/readme.txt
r3039163 r3039236 4 4 Requires at least: 4.7 5 5 Tested up to: 6.4.3 6 Stable tag: 1.2.2 66 Stable tag: 1.2.27 7 7 Requires PHP: 5.0 8 8 License: GPLv2 or later
Note: See TracChangeset
for help on using the changeset viewer.