Version Description
- Fix: Activating plugin creates unwanted two menu items (Post, Page).
- Fix: Author Twitter URL output even no ID was provided.
- Fix: Warnings on uninstall plugin when enabling delete all settings.
- Enhancement: Moved class-capabilities.php file to admin directory.
- Enhancement: Update the plugin updater class to version 1.6.17
- Enhancement: Added new post meta box for Schema Premium message.
- Enhancement: Added new admin menu item for Schema Premium page.
- Enhancement: Added Schema Premium to the Extensions page.
- Update: Pumped tested WordPress version to 5.0.3 release.
- Update: Updated the readme.txt file.
Download this release
Release Info
Developer | hishaman |
Plugin | Schema |
Version | 1.7.4 |
Comparing to | |
See all releases |
Code changes from version 1.7.3 to 1.7.4
- README.md +2 -3
- includes/{class-capabilities.php → admin/class-capabilities.php} +0 -0
- includes/admin/class-feedback.php +5 -1
- includes/admin/class-menu.php +9 -1
- includes/admin/class-notices.php +3 -0
- includes/admin/extensions.php +24 -15
- includes/admin/meta.php +16 -0
- includes/admin/meta/css/chosen-sprite.png +0 -0
- includes/admin/meta/css/chosen-sprite@2x.png +0 -0
- includes/admin/updater/class-updater.php +96 -21
- includes/deprecated-functions.php +0 -42
- includes/extensions/author.php +2 -2
- includes/install.php +2 -2
- includes/integrations/divi.php +31 -0
- includes/integrations/thirstyaffiliates.php +1 -1
- includes/integrations/visual-composer.php +33 -0
- includes/integrations/yoast-seo.php +1 -1
- includes/json/{author.php → author-archive.php} +1 -1
- includes/json/schema-output.php +4 -0
- readme.txt +52 -11
- schema.php +4 -4
- uninstall.php +8 -5
README.md
CHANGED
@@ -68,8 +68,7 @@ Schema markup is code (semantic vocabulary) that you put on your website to help
|
|
68 |
Schema plugin integrates, and play nicely with:
|
69 |
|
70 |
* Yoast SEO
|
71 |
-
* AMP plugin
|
72 |
-
* Accelerated Mobile Pages - AMP for WP
|
73 |
* WPRichSnippets
|
74 |
* The SEO Framework
|
75 |
* Visual Composer
|
@@ -83,4 +82,4 @@ Schema plugin integrates, and play nicely with:
|
|
83 |
* Thesis 2.x
|
84 |
* Divi
|
85 |
|
86 |
-
More information and documentation can be found at [scema.press](https://schema.press/
|
68 |
Schema plugin integrates, and play nicely with:
|
69 |
|
70 |
* Yoast SEO
|
71 |
+
* AMP plugin
|
|
|
72 |
* WPRichSnippets
|
73 |
* The SEO Framework
|
74 |
* Visual Composer
|
82 |
* Thesis 2.x
|
83 |
* Divi
|
84 |
|
85 |
+
More information and documentation can be found at [scema.press](https://schema.press/).
|
includes/{class-capabilities.php → admin/class-capabilities.php}
RENAMED
File without changes
|
includes/admin/class-feedback.php
CHANGED
@@ -10,6 +10,10 @@
|
|
10 |
* @copyright Copyright (c), Ryan Hellyer
|
11 |
* @author Ryan Hellyer <ryanhellyer@gmail.com>
|
12 |
*/
|
|
|
|
|
|
|
|
|
13 |
if ( ! class_exists( 'Schema_DotOrg_Plugin_Feedback' ) ) :
|
14 |
class Schema_DotOrg_Plugin_Feedback {
|
15 |
|
@@ -280,7 +284,7 @@ endif;
|
|
280 |
|
281 |
|
282 |
/*
|
283 |
-
* Instantiate
|
284 |
*
|
285 |
* @since 1.5.4
|
286 |
*/
|
10 |
* @copyright Copyright (c), Ryan Hellyer
|
11 |
* @author Ryan Hellyer <ryanhellyer@gmail.com>
|
12 |
*/
|
13 |
+
|
14 |
+
// Exit if accessed directly
|
15 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
16 |
+
|
17 |
if ( ! class_exists( 'Schema_DotOrg_Plugin_Feedback' ) ) :
|
18 |
class Schema_DotOrg_Plugin_Feedback {
|
19 |
|
284 |
|
285 |
|
286 |
/*
|
287 |
+
* Instantiate Schema_DotOrg_Plugin_Feedback class
|
288 |
*
|
289 |
* @since 1.5.4
|
290 |
*/
|
includes/admin/class-menu.php
CHANGED
@@ -18,7 +18,8 @@ class Schema_WP_Admin_Menu {
|
|
18 |
add_action( 'admin_menu', array( $this, 'register_main_menus' ), 10 );
|
19 |
add_action( 'admin_menu', array( $this, 'register_types_menus' ), 20 );
|
20 |
add_action( 'admin_menu', array( $this, 'register_extensions_menus' ), 30 );
|
21 |
-
add_action( 'admin_menu', array( $this, '
|
|
|
22 |
}
|
23 |
|
24 |
public function register_main_menus() {
|
@@ -81,6 +82,13 @@ class Schema_WP_Admin_Menu {
|
|
81 |
'admin.php?page=schema-wp-what-is-new'
|
82 |
);
|
83 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
|
85 |
}
|
86 |
|
18 |
add_action( 'admin_menu', array( $this, 'register_main_menus' ), 10 );
|
19 |
add_action( 'admin_menu', array( $this, 'register_types_menus' ), 20 );
|
20 |
add_action( 'admin_menu', array( $this, 'register_extensions_menus' ), 30 );
|
21 |
+
add_action( 'admin_menu', array( $this, 'schema_premium_submenu' ), 40 );
|
22 |
+
add_action( 'admin_menu', array( $this, 'register_about_menus' ), 50 );
|
23 |
}
|
24 |
|
25 |
public function register_main_menus() {
|
82 |
'admin.php?page=schema-wp-what-is-new'
|
83 |
);
|
84 |
}
|
85 |
+
|
86 |
+
public function schema_premium_submenu() {
|
87 |
+
|
88 |
+
global $submenu;
|
89 |
+
|
90 |
+
$submenu['schema'][] = array( __('Premium', 'schema-wp'), 'manage_options', 'https://schema.press/downloads/schema-premium/');
|
91 |
+
}
|
92 |
|
93 |
}
|
94 |
|
includes/admin/class-notices.php
CHANGED
@@ -1,5 +1,8 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
3 |
class Schema_WP_Admin_Notices {
|
4 |
|
5 |
public function __construct() {
|
1 |
<?php
|
2 |
|
3 |
+
// Exit if accessed directly
|
4 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
5 |
+
|
6 |
class Schema_WP_Admin_Notices {
|
7 |
|
8 |
public function __construct() {
|
includes/admin/extensions.php
CHANGED
@@ -28,11 +28,11 @@ function schema_wp_admin_extensions_page() {
|
|
28 |
* @param array $tabs Extensions tabs.
|
29 |
*/
|
30 |
$add_ons_tabs = (array) apply_filters( 'schema_wp_extensions_tabs', array(
|
31 |
-
'
|
32 |
-
'official-free' => __('Official Free')
|
33 |
) );
|
34 |
|
35 |
-
$active_tab = isset( $_GET['tab'] ) && array_key_exists( $_GET['tab'], $add_ons_tabs ) ? $_GET['tab'] : '
|
36 |
|
37 |
ob_start();
|
38 |
?>
|
@@ -43,14 +43,14 @@ function schema_wp_admin_extensions_page() {
|
|
43 |
<a href="https://schema.press/downloads/?utm_source=plugin-extensions-page&utm_medium=plugin&utm_campaign=Schema%20Extensions%20Page&utm_content=All%20Extensions" class="button-primary" title="<?php _e( 'Browse all extensions', 'schema-wp' ); ?>" target="_blank"><?php _e( 'Browse all extensions', 'schema-wp' ); ?></a>
|
44 |
</span>
|
45 |
</h1>
|
46 |
-
<p><?php _e( 'These extensions <em><strong>add functionality</strong></em> to your Schema-powered site.', '
|
47 |
<h2 class="nav-tab-wrapper">
|
48 |
<?php schema_wp_admin_navigation_tabs( $add_ons_tabs, $active_tab, array( 'settings-updated' => false ) ); ?>
|
49 |
</h2>
|
50 |
<div id="tab_container">
|
51 |
|
52 |
-
<?php if ( '
|
53 |
-
<p><?php printf( __( '
|
54 |
<p><?php printf( __( 'If you have a Personal or Plus license, you can easily upgrade from your account page to <a href="%s">get access to all of these extensions</a>!', 'schema-wp' ), 'https://schema.press/account/?utm_source=plugin-extensions-page&utm_medium=plugin&utm_campaign=Schema%20Extensions%20Page&utm_content=Account' ); ?></p>
|
55 |
<?php else : ?>
|
56 |
<p><?php _e( 'Our official free extensions are available to all license holders!', 'schema-wp' ); ?></p>
|
@@ -75,7 +75,7 @@ function schema_wp_admin_extensions_page() {
|
|
75 |
*
|
76 |
* @return void
|
77 |
*/
|
78 |
-
function schema_wp_extensions_get_rest( $tab = '
|
79 |
|
80 |
$cache = get_transient( 'schema_wp_extensions_feed_' . $tab );
|
81 |
|
@@ -101,21 +101,30 @@ function schema_wp_extensions_get_rest( $tab = 'pro' ) {
|
|
101 |
|
102 |
// exclude Schema core plugin
|
103 |
if ($info['slug'] === 'schema' ) continue;
|
104 |
-
|
105 |
-
//
|
106 |
-
|
107 |
-
|
108 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
// prepare info
|
110 |
-
$ext_url
|
111 |
-
$excerpt
|
|
|
112 |
|
113 |
// prepare our output
|
114 |
$cache .= '<div class="schema-wp-extension">';
|
115 |
$cache .= '<h3 class="schema-wp-extension-title">'.$info['title'].'</h3>';
|
116 |
$cache .= '<a href="'.$ext_url.'?utm_source=plugin-extensions-page&utm_medium=plugin&utm_campaign=SchemaExtentionsPage&utm_content='.$info['title'].'" title="Recurring Payments"><img width="880" height="440" src="'.$info['thumbnail'].'" class="attachment-showcase size-showcase wp-post-image" alt="" title="Recurring Payments"></a>';
|
117 |
$cache .= '<p>'.$excerpt.'</p>';
|
118 |
-
$cache .= '<a href="'.$ext_url.'?utm_source=plugin-extensions-page&utm_medium=plugin&utm_campaign=SchemaExtentionsPage&utm_content='.$info['title'].'" title="Recurring Payments" class="button-secondary">'.
|
119 |
$cache .= '</div>';
|
120 |
} //end foreach
|
121 |
|
28 |
* @param array $tabs Extensions tabs.
|
29 |
*/
|
30 |
$add_ons_tabs = (array) apply_filters( 'schema_wp_extensions_tabs', array(
|
31 |
+
'premium' => __('Premium', 'schema-wp'),
|
32 |
+
'official-free' => __('Official Free', 'schema-wp')
|
33 |
) );
|
34 |
|
35 |
+
$active_tab = isset( $_GET['tab'] ) && array_key_exists( $_GET['tab'], $add_ons_tabs ) ? $_GET['tab'] : 'premium';
|
36 |
|
37 |
ob_start();
|
38 |
?>
|
43 |
<a href="https://schema.press/downloads/?utm_source=plugin-extensions-page&utm_medium=plugin&utm_campaign=Schema%20Extensions%20Page&utm_content=All%20Extensions" class="button-primary" title="<?php _e( 'Browse all extensions', 'schema-wp' ); ?>" target="_blank"><?php _e( 'Browse all extensions', 'schema-wp' ); ?></a>
|
44 |
</span>
|
45 |
</h1>
|
46 |
+
<p><?php _e( 'These extensions <em><strong>add functionality</strong></em> to your Schema-powered site.', 'schema-wp' ); ?></p>
|
47 |
<h2 class="nav-tab-wrapper">
|
48 |
<?php schema_wp_admin_navigation_tabs( $add_ons_tabs, $active_tab, array( 'settings-updated' => false ) ); ?>
|
49 |
</h2>
|
50 |
<div id="tab_container">
|
51 |
|
52 |
+
<?php if ( 'premium' === $active_tab ) : ?>
|
53 |
+
<p><?php printf( __( 'Premium Extensions are only available with a Professional or Ultimate license. If you already have one of these licenses, simply <a href="%s">log in to your account</a> to download any of these extensions.', 'schema-wp' ), 'https://schema.press/account/?utm_source=plugin-extensions-page&utm_medium=plugin&utm_campaign=Schema%20Extensions%20Page&utm_content=Account' ); ?></p>
|
54 |
<p><?php printf( __( 'If you have a Personal or Plus license, you can easily upgrade from your account page to <a href="%s">get access to all of these extensions</a>!', 'schema-wp' ), 'https://schema.press/account/?utm_source=plugin-extensions-page&utm_medium=plugin&utm_campaign=Schema%20Extensions%20Page&utm_content=Account' ); ?></p>
|
55 |
<?php else : ?>
|
56 |
<p><?php _e( 'Our official free extensions are available to all license holders!', 'schema-wp' ); ?></p>
|
75 |
*
|
76 |
* @return void
|
77 |
*/
|
78 |
+
function schema_wp_extensions_get_rest( $tab = 'premium' ) {
|
79 |
|
80 |
$cache = get_transient( 'schema_wp_extensions_feed_' . $tab );
|
81 |
|
101 |
|
102 |
// exclude Schema core plugin
|
103 |
if ($info['slug'] === 'schema' ) continue;
|
104 |
+
|
105 |
+
// add premium
|
106 |
+
if ( $tab === 'premium' ) {
|
107 |
+
// exclude if not in this category
|
108 |
+
$category = isset($info['category'][0]['slug']) ? $info['category'][0]['slug'] : '';
|
109 |
+
if ( $category != $tab && $info['slug'] != 'schema-premium' ) continue;
|
110 |
+
} else {
|
111 |
+
// exclude if not in this category
|
112 |
+
$category = isset($info['category'][0]['slug']) ? $info['category'][0]['slug'] : '';
|
113 |
+
if ( $category != $tab ) continue;
|
114 |
+
}
|
115 |
+
|
116 |
+
|
117 |
// prepare info
|
118 |
+
$ext_url = $url.$info['slug'].'/';
|
119 |
+
$excerpt = wp_trim_words( $info['excerpt'], 18, '...' );
|
120 |
+
$get_extention = ($info['slug'] === 'schema-premium') ? __('Get Schema Premium', 'schema-wp') : __('Get this Extension', 'schema-wp');
|
121 |
|
122 |
// prepare our output
|
123 |
$cache .= '<div class="schema-wp-extension">';
|
124 |
$cache .= '<h3 class="schema-wp-extension-title">'.$info['title'].'</h3>';
|
125 |
$cache .= '<a href="'.$ext_url.'?utm_source=plugin-extensions-page&utm_medium=plugin&utm_campaign=SchemaExtentionsPage&utm_content='.$info['title'].'" title="Recurring Payments"><img width="880" height="440" src="'.$info['thumbnail'].'" class="attachment-showcase size-showcase wp-post-image" alt="" title="Recurring Payments"></a>';
|
126 |
$cache .= '<p>'.$excerpt.'</p>';
|
127 |
+
$cache .= '<a href="'.$ext_url.'?utm_source=plugin-extensions-page&utm_medium=plugin&utm_campaign=SchemaExtentionsPage&utm_content='.$info['title'].'" title="Recurring Payments" class="button-secondary">'.$get_extention.'</a>';
|
128 |
$cache .= '</div>';
|
129 |
} //end foreach
|
130 |
|
includes/admin/meta.php
CHANGED
@@ -237,6 +237,21 @@ $fields_post_meta_box = array (
|
|
237 |
|
238 |
);
|
239 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
240 |
/**
|
241 |
* Instantiate the class with all variables to create a meta box
|
242 |
* var $id string meta box id
|
@@ -251,6 +266,7 @@ $fields_post_meta_box = array (
|
|
251 |
$schema_article_box = new Schema_Custom_Add_Meta_Box( 'schema_article', __('Article', 'schema-wp'), $fields_article, 'schema', 'normal', 'high', true );
|
252 |
$schema_cpt_box = new Schema_Custom_Add_Meta_Box( 'schema_cpt', __('Post Types', 'schema-wp'), $fields_post_types, 'schema', 'side', 'default', true );
|
253 |
$schema_post_meta_box = new Schema_Custom_Add_Meta_Box( 'schema_post_meta_box', __('Post Meta', 'schema-wp'), $fields_post_meta_box, 'schema', 'normal', 'default', true );
|
|
|
254 |
}
|
255 |
|
256 |
|
237 |
|
238 |
);
|
239 |
|
240 |
+
/**
|
241 |
+
* Schema Premium plugin post meta message
|
242 |
+
*
|
243 |
+
* @since 1.7.4
|
244 |
+
*/
|
245 |
+
$fields_schema_premium_plugin = array(
|
246 |
+
|
247 |
+
array( // Post Types Select box
|
248 |
+
'label' => '', // <label>
|
249 |
+
'desc' => '<b>'.__('Want to enable new features?', 'schema-wp') .'<br>'. __(' Check out <a target="_blank" href="https://schema.press/downloads/schema-premium/">Schema Premium</a>.', 'schema-wp') . '</b>', // description
|
250 |
+
'id' => $prefix.'schema_premium', // field id and name
|
251 |
+
'type' => 'desc' // type of field
|
252 |
+
),
|
253 |
+
);
|
254 |
+
|
255 |
/**
|
256 |
* Instantiate the class with all variables to create a meta box
|
257 |
* var $id string meta box id
|
266 |
$schema_article_box = new Schema_Custom_Add_Meta_Box( 'schema_article', __('Article', 'schema-wp'), $fields_article, 'schema', 'normal', 'high', true );
|
267 |
$schema_cpt_box = new Schema_Custom_Add_Meta_Box( 'schema_cpt', __('Post Types', 'schema-wp'), $fields_post_types, 'schema', 'side', 'default', true );
|
268 |
$schema_post_meta_box = new Schema_Custom_Add_Meta_Box( 'schema_post_meta_box', __('Post Meta', 'schema-wp'), $fields_post_meta_box, 'schema', 'normal', 'default', true );
|
269 |
+
$schema_post_meta_box = new Schema_Custom_Add_Meta_Box( 'schema_premium_plugin', __('Go Premium', 'schema-wp'), $fields_schema_premium_plugin, 'schema', 'side', 'default', true );
|
270 |
}
|
271 |
|
272 |
|
includes/admin/meta/css/chosen-sprite.png
CHANGED
File without changes
|
includes/admin/meta/css/chosen-sprite@2x.png
CHANGED
File without changes
|
includes/admin/updater/class-updater.php
CHANGED
@@ -10,7 +10,9 @@ if ( ! defined( 'ABSPATH' ) ) exit;
|
|
10 |
* Allows plugins to use their own update API.
|
11 |
*
|
12 |
* @author Easy Digital Downloads
|
13 |
-
* @version 1.6.
|
|
|
|
|
14 |
*/
|
15 |
class Schema_WP_SL_Plugin_Updater {
|
16 |
|
@@ -22,6 +24,8 @@ class Schema_WP_SL_Plugin_Updater {
|
|
22 |
private $wp_override = false;
|
23 |
private $cache_key = '';
|
24 |
|
|
|
|
|
25 |
/**
|
26 |
* Class constructor.
|
27 |
*
|
@@ -43,10 +47,19 @@ class Schema_WP_SL_Plugin_Updater {
|
|
43 |
$this->version = $_api_data['version'];
|
44 |
$this->wp_override = isset( $_api_data['wp_override'] ) ? (bool) $_api_data['wp_override'] : false;
|
45 |
$this->beta = ! empty( $this->api_data['beta'] ) ? true : false;
|
46 |
-
$this->cache_key = md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) );
|
47 |
|
48 |
$edd_plugin_data[ $this->slug ] = $this->api_data;
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
// Set up hooks.
|
51 |
$this->init();
|
52 |
|
@@ -115,7 +128,7 @@ class Schema_WP_SL_Plugin_Updater {
|
|
115 |
|
116 |
}
|
117 |
|
118 |
-
$_transient_data->last_checked =
|
119 |
$_transient_data->checked[ $this->name ] = $this->version;
|
120 |
|
121 |
}
|
@@ -161,6 +174,19 @@ class Schema_WP_SL_Plugin_Updater {
|
|
161 |
if ( false === $version_info ) {
|
162 |
$version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug, 'beta' => $this->beta ) );
|
163 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
164 |
$this->set_version_info_cache( $version_info );
|
165 |
}
|
166 |
|
@@ -174,7 +200,7 @@ class Schema_WP_SL_Plugin_Updater {
|
|
174 |
|
175 |
}
|
176 |
|
177 |
-
$update_cache->last_checked =
|
178 |
$update_cache->checked[ $this->name ] = $this->version;
|
179 |
|
180 |
set_site_transient( 'update_plugins', $update_cache );
|
@@ -254,7 +280,8 @@ class Schema_WP_SL_Plugin_Updater {
|
|
254 |
'is_ssl' => is_ssl(),
|
255 |
'fields' => array(
|
256 |
'banners' => array(),
|
257 |
-
'reviews' => false
|
|
|
258 |
)
|
259 |
);
|
260 |
|
@@ -281,27 +308,43 @@ class Schema_WP_SL_Plugin_Updater {
|
|
281 |
|
282 |
// Convert sections into an associative array, since we're getting an object, but Core expects an array.
|
283 |
if ( isset( $_data->sections ) && ! is_array( $_data->sections ) ) {
|
284 |
-
$
|
285 |
-
foreach ( $_data->sections as $key => $value ) {
|
286 |
-
$new_sections[ $key ] = $value;
|
287 |
-
}
|
288 |
-
|
289 |
-
$_data->sections = $new_sections;
|
290 |
}
|
291 |
|
292 |
// Convert banners into an associative array, since we're getting an object, but Core expects an array.
|
293 |
if ( isset( $_data->banners ) && ! is_array( $_data->banners ) ) {
|
294 |
-
$
|
295 |
-
|
296 |
-
$new_banners[ $key ] = $value;
|
297 |
-
}
|
298 |
|
299 |
-
|
|
|
|
|
300 |
}
|
301 |
|
302 |
return $_data;
|
303 |
}
|
304 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
/**
|
306 |
* Disable SSL verification in order to prevent download update failures
|
307 |
*
|
@@ -332,7 +375,29 @@ class Schema_WP_SL_Plugin_Updater {
|
|
332 |
*/
|
333 |
private function api_request( $_action, $_data ) {
|
334 |
|
335 |
-
global $wp_version;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
336 |
|
337 |
$data = array_merge( $this->api_data, $_data );
|
338 |
|
@@ -340,7 +405,7 @@ class Schema_WP_SL_Plugin_Updater {
|
|
340 |
return;
|
341 |
}
|
342 |
|
343 |
-
if( $this->api_url == trailingslashit (home_url() ) ) {
|
344 |
return false; // Don't allow a plugin to ping itself
|
345 |
}
|
346 |
|
@@ -373,6 +438,10 @@ class Schema_WP_SL_Plugin_Updater {
|
|
373 |
$request->banners = maybe_unserialize( $request->banners );
|
374 |
}
|
375 |
|
|
|
|
|
|
|
|
|
376 |
if( ! empty( $request->sections ) ) {
|
377 |
foreach( $request->sections as $key => $section ) {
|
378 |
$request->$key = (array) $section;
|
@@ -458,11 +527,17 @@ class Schema_WP_SL_Plugin_Updater {
|
|
458 |
|
459 |
$cache = get_option( $cache_key );
|
460 |
|
461 |
-
if( empty( $cache['timeout'] ) ||
|
462 |
return false; // Cache is expired
|
463 |
}
|
464 |
|
465 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
466 |
|
467 |
}
|
468 |
|
@@ -473,7 +548,7 @@ class Schema_WP_SL_Plugin_Updater {
|
|
473 |
}
|
474 |
|
475 |
$data = array(
|
476 |
-
'timeout' => strtotime( '+3 hours',
|
477 |
'value' => json_encode( $value )
|
478 |
);
|
479 |
|
10 |
* Allows plugins to use their own update API.
|
11 |
*
|
12 |
* @author Easy Digital Downloads
|
13 |
+
* @version 1.6.17
|
14 |
+
*
|
15 |
+
* @souce https://github.com/easydigitaldownloads/easy-digital-downloads/blob/master/includes/EDD_SL_Plugin_Updater.php
|
16 |
*/
|
17 |
class Schema_WP_SL_Plugin_Updater {
|
18 |
|
24 |
private $wp_override = false;
|
25 |
private $cache_key = '';
|
26 |
|
27 |
+
private $health_check_timeout = 5;
|
28 |
+
|
29 |
/**
|
30 |
* Class constructor.
|
31 |
*
|
47 |
$this->version = $_api_data['version'];
|
48 |
$this->wp_override = isset( $_api_data['wp_override'] ) ? (bool) $_api_data['wp_override'] : false;
|
49 |
$this->beta = ! empty( $this->api_data['beta'] ) ? true : false;
|
50 |
+
$this->cache_key = 'edd_sl_' . md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) );
|
51 |
|
52 |
$edd_plugin_data[ $this->slug ] = $this->api_data;
|
53 |
|
54 |
+
/**
|
55 |
+
* Fires after the $edd_plugin_data is setup.
|
56 |
+
*
|
57 |
+
* @since x.x.x
|
58 |
+
*
|
59 |
+
* @param array $edd_plugin_data Array of EDD SL plugin data.
|
60 |
+
*/
|
61 |
+
do_action( 'post_edd_sl_plugin_updater_setup', $edd_plugin_data );
|
62 |
+
|
63 |
// Set up hooks.
|
64 |
$this->init();
|
65 |
|
128 |
|
129 |
}
|
130 |
|
131 |
+
$_transient_data->last_checked = time();
|
132 |
$_transient_data->checked[ $this->name ] = $this->version;
|
133 |
|
134 |
}
|
174 |
if ( false === $version_info ) {
|
175 |
$version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug, 'beta' => $this->beta ) );
|
176 |
|
177 |
+
// Since we disabled our filter for the transient, we aren't running our object conversion on banners, sections, or icons. Do this now:
|
178 |
+
if ( isset( $version_info->banners ) && ! is_array( $version_info->banners ) ) {
|
179 |
+
$version_info->banners = $this->convert_object_to_array( $version_info->banners );
|
180 |
+
}
|
181 |
+
|
182 |
+
if ( isset( $version_info->sections ) && ! is_array( $version_info->sections ) ) {
|
183 |
+
$version_info->sections = $this->convert_object_to_array( $version_info->sections );
|
184 |
+
}
|
185 |
+
|
186 |
+
if ( isset( $version_info->icons ) && ! is_array( $version_info->icons ) ) {
|
187 |
+
$version_info->icons = $this->convert_object_to_array( $version_info->icons );
|
188 |
+
}
|
189 |
+
|
190 |
$this->set_version_info_cache( $version_info );
|
191 |
}
|
192 |
|
200 |
|
201 |
}
|
202 |
|
203 |
+
$update_cache->last_checked = time();
|
204 |
$update_cache->checked[ $this->name ] = $this->version;
|
205 |
|
206 |
set_site_transient( 'update_plugins', $update_cache );
|
280 |
'is_ssl' => is_ssl(),
|
281 |
'fields' => array(
|
282 |
'banners' => array(),
|
283 |
+
'reviews' => false,
|
284 |
+
'icons' => array(),
|
285 |
)
|
286 |
);
|
287 |
|
308 |
|
309 |
// Convert sections into an associative array, since we're getting an object, but Core expects an array.
|
310 |
if ( isset( $_data->sections ) && ! is_array( $_data->sections ) ) {
|
311 |
+
$_data->sections = $this->convert_object_to_array( $_data->sections );
|
|
|
|
|
|
|
|
|
|
|
312 |
}
|
313 |
|
314 |
// Convert banners into an associative array, since we're getting an object, but Core expects an array.
|
315 |
if ( isset( $_data->banners ) && ! is_array( $_data->banners ) ) {
|
316 |
+
$_data->banners = $this->convert_object_to_array( $_data->banners );
|
317 |
+
}
|
|
|
|
|
318 |
|
319 |
+
// Convert icons into an associative array, since we're getting an object, but Core expects an array.
|
320 |
+
if ( isset( $_data->icons ) && ! is_array( $_data->icons ) ) {
|
321 |
+
$_data->icons = $this->convert_object_to_array( $_data->icons );
|
322 |
}
|
323 |
|
324 |
return $_data;
|
325 |
}
|
326 |
|
327 |
+
/**
|
328 |
+
* Convert some objects to arrays when injecting data into the update API
|
329 |
+
*
|
330 |
+
* Some data like sections, banners, and icons are expected to be an associative array, however due to the JSON
|
331 |
+
* decoding, they are objects. This method allows us to pass in the object and return an associative array.
|
332 |
+
*
|
333 |
+
* @since 3.6.5
|
334 |
+
*
|
335 |
+
* @param stdClass $data
|
336 |
+
*
|
337 |
+
* @return array
|
338 |
+
*/
|
339 |
+
private function convert_object_to_array( $data ) {
|
340 |
+
$new_data = array();
|
341 |
+
foreach ( $data as $key => $value ) {
|
342 |
+
$new_data[ $key ] = $value;
|
343 |
+
}
|
344 |
+
|
345 |
+
return $new_data;
|
346 |
+
}
|
347 |
+
|
348 |
/**
|
349 |
* Disable SSL verification in order to prevent download update failures
|
350 |
*
|
375 |
*/
|
376 |
private function api_request( $_action, $_data ) {
|
377 |
|
378 |
+
global $wp_version, $edd_plugin_url_available;
|
379 |
+
|
380 |
+
// Do a quick status check on this domain if we haven't already checked it.
|
381 |
+
$store_hash = md5( $this->api_url );
|
382 |
+
if ( ! is_array( $edd_plugin_url_available ) || ! isset( $edd_plugin_url_available[ $store_hash ] ) ) {
|
383 |
+
$test_url_parts = parse_url( $this->api_url );
|
384 |
+
|
385 |
+
$scheme = ! empty( $test_url_parts['scheme'] ) ? $test_url_parts['scheme'] : 'http';
|
386 |
+
$host = ! empty( $test_url_parts['host'] ) ? $test_url_parts['host'] : '';
|
387 |
+
$port = ! empty( $test_url_parts['port'] ) ? ':' . $test_url_parts['port'] : '';
|
388 |
+
|
389 |
+
if ( empty( $host ) ) {
|
390 |
+
$edd_plugin_url_available[ $store_hash ] = false;
|
391 |
+
} else {
|
392 |
+
$test_url = $scheme . '://' . $host . $port;
|
393 |
+
$response = wp_remote_get( $test_url, array( 'timeout' => $this->health_check_timeout, 'sslverify' => true ) );
|
394 |
+
$edd_plugin_url_available[ $store_hash ] = is_wp_error( $response ) ? false : true;
|
395 |
+
}
|
396 |
+
}
|
397 |
+
|
398 |
+
if ( false === $edd_plugin_url_available[ $store_hash ] ) {
|
399 |
+
return;
|
400 |
+
}
|
401 |
|
402 |
$data = array_merge( $this->api_data, $_data );
|
403 |
|
405 |
return;
|
406 |
}
|
407 |
|
408 |
+
if( $this->api_url == trailingslashit ( home_url() ) ) {
|
409 |
return false; // Don't allow a plugin to ping itself
|
410 |
}
|
411 |
|
438 |
$request->banners = maybe_unserialize( $request->banners );
|
439 |
}
|
440 |
|
441 |
+
if ( $request && isset( $request->icons ) ) {
|
442 |
+
$request->icons = maybe_unserialize( $request->icons );
|
443 |
+
}
|
444 |
+
|
445 |
if( ! empty( $request->sections ) ) {
|
446 |
foreach( $request->sections as $key => $section ) {
|
447 |
$request->$key = (array) $section;
|
527 |
|
528 |
$cache = get_option( $cache_key );
|
529 |
|
530 |
+
if( empty( $cache['timeout'] ) || time() > $cache['timeout'] ) {
|
531 |
return false; // Cache is expired
|
532 |
}
|
533 |
|
534 |
+
// We need to turn the icons into an array, thanks to WP Core forcing these into an object at some point.
|
535 |
+
$cache['value'] = json_decode( $cache['value'] );
|
536 |
+
if ( ! empty( $cache['value']->icons ) ) {
|
537 |
+
$cache['value']->icons = (array) $cache['value']->icons;
|
538 |
+
}
|
539 |
+
|
540 |
+
return $cache['value'];
|
541 |
|
542 |
}
|
543 |
|
548 |
}
|
549 |
|
550 |
$data = array(
|
551 |
+
'timeout' => strtotime( '+3 hours', time() ),
|
552 |
'value' => json_encode( $value )
|
553 |
);
|
554 |
|
includes/deprecated-functions.php
CHANGED
@@ -39,45 +39,3 @@ function schema_wp_first_post_date( $format = 'Y-m-d' ) {
|
|
39 |
|
40 |
return $output;
|
41 |
}
|
42 |
-
|
43 |
-
|
44 |
-
//add_filter( 'schema_wp_filter_content', 'remove_visual_composer_shortcodes' );
|
45 |
-
/**
|
46 |
-
* Remove VC shortcodes from content
|
47 |
-
*
|
48 |
-
* @since 1.5.9.3
|
49 |
-
* @return string
|
50 |
-
*/
|
51 |
-
function remove_visual_composer_shortcodes( $content ) {
|
52 |
-
|
53 |
-
global $post;
|
54 |
-
|
55 |
-
$vc_enabled = get_post_meta($post->ID, '_wpb_vc_js_status', true);
|
56 |
-
|
57 |
-
if ( isset($vc_enabled) && $vc_enabled == 'true') {
|
58 |
-
|
59 |
-
$content = preg_replace('/\[\/?vc_.*?\]/', '', $content);
|
60 |
-
}
|
61 |
-
|
62 |
-
return $content;
|
63 |
-
}
|
64 |
-
|
65 |
-
|
66 |
-
//add_filter( 'schema_wp_filter_content', 'schema_wp_remove_divi_shortcodes' );
|
67 |
-
/**
|
68 |
-
* Remove Divi shortcodes from content
|
69 |
-
*
|
70 |
-
* @since 1.5.9
|
71 |
-
* @return string
|
72 |
-
*/
|
73 |
-
function schema_wp_remove_divi_shortcodes( $content ) {
|
74 |
-
|
75 |
-
$my_theme = wp_get_theme();
|
76 |
-
|
77 |
-
if ( $my_theme == 'Divi') {
|
78 |
-
|
79 |
-
$content = preg_replace('/\[\/?et_pb.*?\]/', '', $content);
|
80 |
-
}
|
81 |
-
|
82 |
-
return $content;
|
83 |
-
}
|
39 |
|
40 |
return $output;
|
41 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/extensions/author.php
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/**
|
4 |
* Author extention
|
5 |
*
|
@@ -108,7 +107,8 @@ function schema_wp_get_author_array( $post_id = null ) {
|
|
108 |
|
109 |
// Add full URL to Twitter
|
110 |
// @since 1.7.3
|
111 |
-
|
|
|
112 |
|
113 |
$sameAs_links = array( $website, $googleplus, $facebook, $twitter, $instagram, $youtube, $linkedin, $myspace, $pinterest, $soundcloud, $tumblr, $github);
|
114 |
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* Author extention
|
4 |
*
|
107 |
|
108 |
// Add full URL to Twitter
|
109 |
// @since 1.7.3
|
110 |
+
// @since 1.7.4
|
111 |
+
if ( isset($twitter) && $twitter != '' ) $twitter = 'https://twitter.com/' . $twitter;
|
112 |
|
113 |
$sameAs_links = array( $website, $googleplus, $facebook, $twitter, $instagram, $youtube, $linkedin, $myspace, $pinterest, $soundcloud, $tumblr, $github);
|
114 |
|
includes/install.php
CHANGED
@@ -46,7 +46,7 @@ function schema_wp_install() {
|
|
46 |
'post_content' => '',
|
47 |
'post_status' => 'publish',
|
48 |
'post_author' => 1,
|
49 |
-
'post_type' => '
|
50 |
)
|
51 |
) : false; // set to false if already exists
|
52 |
|
@@ -89,7 +89,7 @@ function schema_wp_install() {
|
|
89 |
'post_content' => '',
|
90 |
'post_status' => 'publish',
|
91 |
'post_author' => 1,
|
92 |
-
'post_type' => '
|
93 |
)
|
94 |
) : false; // set to false if already exists
|
95 |
|
46 |
'post_content' => '',
|
47 |
'post_status' => 'publish',
|
48 |
'post_author' => 1,
|
49 |
+
'post_type' => 'schema'
|
50 |
)
|
51 |
) : false; // set to false if already exists
|
52 |
|
89 |
'post_content' => '',
|
90 |
'post_status' => 'publish',
|
91 |
'post_author' => 1,
|
92 |
+
'post_type' => 'schema'
|
93 |
)
|
94 |
) : false; // set to false if already exists
|
95 |
|
includes/integrations/divi.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Divi Theme integration
|
4 |
+
*
|
5 |
+
*
|
6 |
+
* plugin url: http://elegantthemes.com/
|
7 |
+
* @since 1.5.9
|
8 |
+
*/
|
9 |
+
|
10 |
+
// Exit if accessed directly
|
11 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
12 |
+
|
13 |
+
|
14 |
+
add_filter( 'schema_wp_filter_content', 'remove_divi_shortcodes' );
|
15 |
+
/**
|
16 |
+
* Remove Divi shortcodes from content
|
17 |
+
*
|
18 |
+
* @since 1.5.9
|
19 |
+
* @return string
|
20 |
+
*/
|
21 |
+
function remove_divi_shortcodes( $content ) {
|
22 |
+
|
23 |
+
$my_theme = wp_get_theme();
|
24 |
+
|
25 |
+
if ( $my_theme == 'Divi') {
|
26 |
+
|
27 |
+
$content = preg_replace('/\[\/?et_pb.*?\]/', '', $content);
|
28 |
+
}
|
29 |
+
|
30 |
+
return $content;
|
31 |
+
}
|
includes/integrations/thirstyaffiliates.php
CHANGED
@@ -21,7 +21,7 @@ add_action( 'schema_wp_post_types', 'schema_wp_thirstyaffiliates_remove_cpt' );
|
|
21 |
*/
|
22 |
function schema_wp_thirstyaffiliates_remove_cpt( $post_types ) {
|
23 |
|
24 |
-
if (
|
25 |
return $post_types;
|
26 |
|
27 |
unset($post_types['thirstylink']);
|
21 |
*/
|
22 |
function schema_wp_thirstyaffiliates_remove_cpt( $post_types ) {
|
23 |
|
24 |
+
if (!is_plugin_active('thirstyaffiliates/thirstyaffiliates.php'))
|
25 |
return $post_types;
|
26 |
|
27 |
unset($post_types['thirstylink']);
|
includes/integrations/visual-composer.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Visual Composer plugin integration
|
4 |
+
*
|
5 |
+
*
|
6 |
+
* plugin url: https://vc.wpbakery.com/
|
7 |
+
* @since 1.5.9.3
|
8 |
+
*/
|
9 |
+
|
10 |
+
// Exit if accessed directly
|
11 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
12 |
+
|
13 |
+
|
14 |
+
add_filter( 'schema_wp_filter_content', 'remove_visual_composer_shortcodes' );
|
15 |
+
/**
|
16 |
+
* Remove VC shortcodes from content
|
17 |
+
*
|
18 |
+
* @since 1.5.9.3
|
19 |
+
* @return string
|
20 |
+
*/
|
21 |
+
function remove_visual_composer_shortcodes( $content ) {
|
22 |
+
|
23 |
+
global $post;
|
24 |
+
|
25 |
+
$vc_enabled = get_post_meta($post->ID, '_wpb_vc_js_status', true);
|
26 |
+
|
27 |
+
if ( isset($vc_enabled) && $vc_enabled == 'true') {
|
28 |
+
|
29 |
+
$content = preg_replace('/\[\/?vc_.*?\]/', '', $content);
|
30 |
+
}
|
31 |
+
|
32 |
+
return $content;
|
33 |
+
}
|
includes/integrations/yoast-seo.php
CHANGED
@@ -41,7 +41,7 @@ function my_wpseo_breadcrumb_output( $output ) {
|
|
41 |
|
42 |
if ( $breadcrumbs_enable ) {
|
43 |
|
44 |
-
//
|
45 |
$output = str_replace('xmlns:v="http://rdf.data-vocabulary.org/#"', '', $output);
|
46 |
$output = str_replace('typeof="v:Breadcrumb"', '', $output);
|
47 |
$output = str_replace('rel="v:url"', '', $output);
|
41 |
|
42 |
if ( $breadcrumbs_enable ) {
|
43 |
|
44 |
+
// clean Yoast SEO from RDF markups
|
45 |
$output = str_replace('xmlns:v="http://rdf.data-vocabulary.org/#"', '', $output);
|
46 |
$output = str_replace('typeof="v:Breadcrumb"', '', $output);
|
47 |
$output = str_replace('rel="v:url"', '', $output);
|
includes/json/{author.php → author-archive.php}
RENAMED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Author
|
4 |
*
|
5 |
* @since 1.4.5
|
6 |
*/
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Author Archive
|
4 |
*
|
5 |
* @since 1.4.5
|
6 |
*/
|
includes/json/schema-output.php
CHANGED
@@ -181,6 +181,10 @@ function schema_wp_get_schema_json( $type ) {
|
|
181 |
|
182 |
$schema["url"] = $json['permalink'];
|
183 |
|
|
|
|
|
|
|
|
|
184 |
// get supported article types
|
185 |
$support_article_types = schema_wp_get_support_article_types();
|
186 |
|
181 |
|
182 |
$schema["url"] = $json['permalink'];
|
183 |
|
184 |
+
if ( ! empty( $json["author"] ) ) {
|
185 |
+
//$schema["author"] = $json['author'];
|
186 |
+
}
|
187 |
+
|
188 |
// get supported article types
|
189 |
$support_article_types = schema_wp_get_support_article_types();
|
190 |
|
readme.txt
CHANGED
@@ -3,9 +3,9 @@ Contributors: hishaman, schemapress
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=NGVUBT2QXN7YL
|
4 |
Tags: schema, schema.org, json, json-ld, google, seo, structured data, markup, search engine, search, rich snippets, breadcrumbs, social, post, page, plugin, wordpress, content, article, news, search results, site name, knowledge graph, social, social profiles, keywords, meta-tags, metadata, tags, categories, optimize, ranking, search engine optimization, search engines, serp, sitelinks, google sitelinks, sitelinks search box, google sitelinks search box, semantic, structured, canonical, custom post types, post type, title, terms, media, images, thumb, featured, url, video, video markup, video object, VideoObject, video schema, audio object, AudioObject, audio schema, audio, sameAs, about, contact, amp, mobile, taxonomy
|
5 |
Requires at least: 4.0
|
6 |
-
Tested up to: 5.0.
|
7 |
Requires PHP: 5.4
|
8 |
-
Stable tag: 1.7.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -22,25 +22,30 @@ Enhanced Presentation in Search Results By including structured data appropriate
|
|
22 |
Check out the [Plugin Homepage](https://schema.press/) for more info and [documentation](https://schema.press/docs/).
|
23 |
|
24 |
|
25 |
-
|
26 |
|
27 |
Schema markup is code (semantic vocabulary) that you put on your website to help the search engines return more informative results for users. So, Schema is not just for SEO reasons, it’s also for the benefit of the searcher.
|
28 |
|
29 |
-
|
30 |
|
31 |
-
* Easy to use, set it and forget it, with minimal settings.
|
|
|
32 |
* Enable Schema types at once per post type or post category.
|
|
|
|
|
33 |
* Valid markup, test it in Google Structured Data Testing Tool.
|
34 |
* Output JSON-LD format, the most recommended by Google.
|
35 |
* Reuse data saved in post meta, which is created by other plugins.
|
36 |
* Extensible, means you can extend its functionality via other plugins, extensions or within your Theme’s functions.php file.
|
37 |
|
|
|
|
|
38 |
**Plugin Extensions**
|
39 |
|
40 |
* [Schema Review](https://wordpress.org/plugins/schema-review/): Extend Schema functionality by adding review and rating Structured Data functionality for Editors and Authors.
|
41 |
* [Schema Default Image](https://wordpress.org/plugins/schema-default-image/): Add ability to set a default WordPress Featured image for schema.org markup.
|
42 |
|
43 |
-
|
44 |
|
45 |
* [Knowledge Graph](https://developers.google.com/structured-data/customize/overview)
|
46 |
* [Logos](https://developers.google.com/structured-data/customize/logos)
|
@@ -51,7 +56,7 @@ Schema markup is code (semantic vocabulary) that you put on your website to help
|
|
51 |
* [Enable Sitelinks Search Box](https://developers.google.com/structured-data/customize/logos)
|
52 |
* [Show Your Site Name in Search](https://developers.google.com/structured-data/site-name)
|
53 |
|
54 |
-
|
55 |
|
56 |
* Creative Work
|
57 |
* [Article](https://schema.org/Article) enabled on Pages
|
@@ -74,7 +79,15 @@ Schema markup is code (semantic vocabulary) that you put on your website to help
|
|
74 |
* [VideoObject](https://schema.org/VideoObject) enable automatically on all videos embedded with oEmbed. Supports VideoPress, YouTube, TED, Vimeo, Dailymotion, and Vine.
|
75 |
* [AudioObject](https://schema.org/AudioObject) enable automatically on all audio embedded with oEmbed. Supports SoundCloud, and Mixcloud.
|
76 |
|
77 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
|
79 |
Schema plugin integrates and/or play nicely with (not necessarily a full integration):
|
80 |
|
@@ -88,13 +101,19 @@ Schema plugin integrates and/or play nicely with (not necessarily a full integra
|
|
88 |
* WooCommerce
|
89 |
* Easy Digital Downloads (EDD)
|
90 |
|
91 |
-
|
92 |
|
93 |
* Genesis 2.x
|
94 |
* Thesis 2.x
|
95 |
* Divi
|
96 |
|
97 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
|
99 |
Feel free to [fork the project on GitHub](https://github.com/schemapress/Schema) and submit your contributions via pull request.
|
100 |
|
@@ -108,6 +127,10 @@ Feel free to [fork the project on GitHub](https://github.com/schemapress/Schema)
|
|
108 |
|
109 |
== Frequently Asked Questions ==
|
110 |
|
|
|
|
|
|
|
|
|
111 |
= The plugin isn't working or have a bug? =
|
112 |
|
113 |
Post detailed information about the issue in the [support forum](https://wordpress.org/support/plugin/schema) and we will work to fix it.
|
@@ -122,6 +145,9 @@ Nope! The Schema plugin is meant to add markup to a basic WordPress installation
|
|
122 |
|
123 |
Other schema.org types shall be added via [Plugin Extensions](https://schema.press/downloads/), or a custom code.
|
124 |
|
|
|
|
|
|
|
125 |
|
126 |
= Is there a way to add a new schema.org type? =
|
127 |
|
@@ -157,6 +183,18 @@ Yes, Schema plugin will detect AMP plugin and output a more complete and valid s
|
|
157 |
|
158 |
== Changelog ==
|
159 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
= 1.7.3 =
|
161 |
* Fix: AMP markup when checking if variable hold an array by using is_array function.
|
162 |
* Fix: Use get_option instead of deprecated function get_settings in AMP.
|
@@ -796,4 +834,7 @@ Fixed an important bug within the plugin, Schema post was saved as draft and no
|
|
796 |
Added ability to set Featured image automatically when creating or editing a post. Added back settings Content tab. Fixed admin notices and bugs. A few minor code/ documentation tweaks, updated readme.txt file with new details. Please, update the plugin on your website now to get bug fixes, enhancements and new cool features in this release.
|
797 |
|
798 |
= 1.7.3 =
|
799 |
-
Added several bug fixes and enhancements. Please, update the plugin on your website now to get bug fixes.
|
|
|
|
|
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=NGVUBT2QXN7YL
|
4 |
Tags: schema, schema.org, json, json-ld, google, seo, structured data, markup, search engine, search, rich snippets, breadcrumbs, social, post, page, plugin, wordpress, content, article, news, search results, site name, knowledge graph, social, social profiles, keywords, meta-tags, metadata, tags, categories, optimize, ranking, search engine optimization, search engines, serp, sitelinks, google sitelinks, sitelinks search box, google sitelinks search box, semantic, structured, canonical, custom post types, post type, title, terms, media, images, thumb, featured, url, video, video markup, video object, VideoObject, video schema, audio object, AudioObject, audio schema, audio, sameAs, about, contact, amp, mobile, taxonomy
|
5 |
Requires at least: 4.0
|
6 |
+
Tested up to: 5.0.3
|
7 |
Requires PHP: 5.4
|
8 |
+
Stable tag: 1.7.4
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
22 |
Check out the [Plugin Homepage](https://schema.press/) for more info and [documentation](https://schema.press/docs/).
|
23 |
|
24 |
|
25 |
+
###What is Schema markup?
|
26 |
|
27 |
Schema markup is code (semantic vocabulary) that you put on your website to help the search engines return more informative results for users. So, Schema is not just for SEO reasons, it’s also for the benefit of the searcher.
|
28 |
|
29 |
+
### Schema Key Features
|
30 |
|
31 |
+
* Easy to use, set it and forget it, with minimal settings.
|
32 |
+
* **[Premium]** Support for different schema.org types.
|
33 |
* Enable Schema types at once per post type or post category.
|
34 |
+
* **[Premium]** Enable Schema types anywhere you want on your site content.
|
35 |
+
* **[Premium]** Integration: Customize source data of schema.org properties.
|
36 |
* Valid markup, test it in Google Structured Data Testing Tool.
|
37 |
* Output JSON-LD format, the most recommended by Google.
|
38 |
* Reuse data saved in post meta, which is created by other plugins.
|
39 |
* Extensible, means you can extend its functionality via other plugins, extensions or within your Theme’s functions.php file.
|
40 |
|
41 |
+
> Note: some features are Premium. Which means you need Schema Premium to have those features. You can [get Schema Premium here](https://schema.press/pricing/)!
|
42 |
+
|
43 |
**Plugin Extensions**
|
44 |
|
45 |
* [Schema Review](https://wordpress.org/plugins/schema-review/): Extend Schema functionality by adding review and rating Structured Data functionality for Editors and Authors.
|
46 |
* [Schema Default Image](https://wordpress.org/plugins/schema-default-image/): Add ability to set a default WordPress Featured image for schema.org markup.
|
47 |
|
48 |
+
### Supported Google/Schema Markups
|
49 |
|
50 |
* [Knowledge Graph](https://developers.google.com/structured-data/customize/overview)
|
51 |
* [Logos](https://developers.google.com/structured-data/customize/logos)
|
56 |
* [Enable Sitelinks Search Box](https://developers.google.com/structured-data/customize/logos)
|
57 |
* [Show Your Site Name in Search](https://developers.google.com/structured-data/site-name)
|
58 |
|
59 |
+
### Supported Schema.org Types
|
60 |
|
61 |
* Creative Work
|
62 |
* [Article](https://schema.org/Article) enabled on Pages
|
79 |
* [VideoObject](https://schema.org/VideoObject) enable automatically on all videos embedded with oEmbed. Supports VideoPress, YouTube, TED, Vimeo, Dailymotion, and Vine.
|
80 |
* [AudioObject](https://schema.org/AudioObject) enable automatically on all audio embedded with oEmbed. Supports SoundCloud, and Mixcloud.
|
81 |
|
82 |
+
### Premium Supported Schema.org Types
|
83 |
+
|
84 |
+
> Schema Premium has additional support for [schema.org types](https://schema.press/docs-premium/supported-types/).
|
85 |
+
|
86 |
+
* LocalBusiness
|
87 |
+
* Event
|
88 |
+
* JobPosting
|
89 |
+
|
90 |
+
### Supported Plugins
|
91 |
|
92 |
Schema plugin integrates and/or play nicely with (not necessarily a full integration):
|
93 |
|
101 |
* WooCommerce
|
102 |
* Easy Digital Downloads (EDD)
|
103 |
|
104 |
+
### Supported Themes
|
105 |
|
106 |
* Genesis 2.x
|
107 |
* Thesis 2.x
|
108 |
* Divi
|
109 |
|
110 |
+
### Premium support
|
111 |
+
|
112 |
+
schema.press team does not always provide active support for the Schema plugin on the WordPress.org forums, as we prioritize our email support. One-on-one email support is available to people who [bought Schema Premium](https://schema.press/pricing/) only.
|
113 |
+
|
114 |
+
Note that the [Schema Premium](https://schema.press/downloads/schema-premium/) also has several extra [features](https://schema.press/features/) too, including the option to enable more schema.org types, set content location target for markup, and map schema.org properties, so it is well worth your investment!
|
115 |
+
|
116 |
+
### Developers?
|
117 |
|
118 |
Feel free to [fork the project on GitHub](https://github.com/schemapress/Schema) and submit your contributions via pull request.
|
119 |
|
127 |
|
128 |
== Frequently Asked Questions ==
|
129 |
|
130 |
+
= Do you offer a Premium plugin? =
|
131 |
+
|
132 |
+
Yes, we do have a [Schema Premium](https://schema.press/downloads/schema-premium/) plugin that is packed with [features](https://schema.press/features/).
|
133 |
+
|
134 |
= The plugin isn't working or have a bug? =
|
135 |
|
136 |
Post detailed information about the issue in the [support forum](https://wordpress.org/support/plugin/schema) and we will work to fix it.
|
145 |
|
146 |
Other schema.org types shall be added via [Plugin Extensions](https://schema.press/downloads/), or a custom code.
|
147 |
|
148 |
+
= Is there a way to add a new schema.org type? =
|
149 |
+
|
150 |
+
Yes we do. We have a premium schema.org plugin called [Schema Premium](https://schema.press/downloads/schema-premium/).
|
151 |
|
152 |
= Is there a way to add a new schema.org type? =
|
153 |
|
183 |
|
184 |
== Changelog ==
|
185 |
|
186 |
+
= 1.7.4 =
|
187 |
+
* Fix: Activating plugin creates unwanted two menu items (Post, Page).
|
188 |
+
* Fix: Author Twitter URL output even no ID was provided.
|
189 |
+
* Fix: Warnings on uninstall plugin when enabling delete all settings.
|
190 |
+
* Enhancement: Moved class-capabilities.php file to admin directory.
|
191 |
+
* Enhancement: Update the plugin updater class to version 1.6.17
|
192 |
+
* Enhancement: Added new post meta box for Schema Premium message.
|
193 |
+
* Enhancement: Added new admin menu item for Schema Premium page.
|
194 |
+
* Enhancement: Added Schema Premium to the Extensions page.
|
195 |
+
* Update: Pumped tested WordPress version to 5.0.3 release.
|
196 |
+
* Update: Updated the readme.txt file.
|
197 |
+
|
198 |
= 1.7.3 =
|
199 |
* Fix: AMP markup when checking if variable hold an array by using is_array function.
|
200 |
* Fix: Use get_option instead of deprecated function get_settings in AMP.
|
834 |
Added ability to set Featured image automatically when creating or editing a post. Added back settings Content tab. Fixed admin notices and bugs. A few minor code/ documentation tweaks, updated readme.txt file with new details. Please, update the plugin on your website now to get bug fixes, enhancements and new cool features in this release.
|
835 |
|
836 |
= 1.7.3 =
|
837 |
+
Added several bug fixes and enhancements. Please, update the plugin on your website now to get bug fixes.
|
838 |
+
|
839 |
+
= 1.7.4 =
|
840 |
+
Added several bug fixes and enhancements. Please, update Schema plugin on your website now to get bug fixes.
|
schema.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: The next generation of Structured Data.
|
6 |
* Author: Hesham
|
7 |
* Author URI: http://zebida.com
|
8 |
-
* Version: 1.7.
|
9 |
* Text Domain: schema-wp
|
10 |
* Domain Path: languages
|
11 |
*
|
@@ -51,7 +51,7 @@ final class Schema_WP {
|
|
51 |
*
|
52 |
* @since 1.0
|
53 |
*/
|
54 |
-
private $version = '1.7.
|
55 |
|
56 |
/**
|
57 |
* The settings instance variable
|
@@ -188,7 +188,7 @@ final class Schema_WP {
|
|
188 |
// get settings
|
189 |
$schema_wp_options = schema_wp_get_settings();
|
190 |
|
191 |
-
require_once SCHEMAWP_PLUGIN_DIR . 'includes/class-capabilities.php';
|
192 |
|
193 |
require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/post-type/schema-post-type.php';
|
194 |
require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/post-type/schema-wp-submit.php';
|
@@ -234,7 +234,7 @@ final class Schema_WP {
|
|
234 |
require_once SCHEMAWP_PLUGIN_DIR . 'includes/json/tag.php';
|
235 |
require_once SCHEMAWP_PLUGIN_DIR . 'includes/json/post-type-archive.php';
|
236 |
require_once SCHEMAWP_PLUGIN_DIR . 'includes/json/taxonomy.php';
|
237 |
-
require_once SCHEMAWP_PLUGIN_DIR . 'includes/json/author.php';
|
238 |
|
239 |
// Schema main output
|
240 |
require_once SCHEMAWP_PLUGIN_DIR . 'includes/json/schema-output.php';
|
5 |
* Description: The next generation of Structured Data.
|
6 |
* Author: Hesham
|
7 |
* Author URI: http://zebida.com
|
8 |
+
* Version: 1.7.4
|
9 |
* Text Domain: schema-wp
|
10 |
* Domain Path: languages
|
11 |
*
|
51 |
*
|
52 |
* @since 1.0
|
53 |
*/
|
54 |
+
private $version = '1.7.4';
|
55 |
|
56 |
/**
|
57 |
* The settings instance variable
|
188 |
// get settings
|
189 |
$schema_wp_options = schema_wp_get_settings();
|
190 |
|
191 |
+
require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/class-capabilities.php';
|
192 |
|
193 |
require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/post-type/schema-post-type.php';
|
194 |
require_once SCHEMAWP_PLUGIN_DIR . 'includes/admin/post-type/schema-wp-submit.php';
|
234 |
require_once SCHEMAWP_PLUGIN_DIR . 'includes/json/tag.php';
|
235 |
require_once SCHEMAWP_PLUGIN_DIR . 'includes/json/post-type-archive.php';
|
236 |
require_once SCHEMAWP_PLUGIN_DIR . 'includes/json/taxonomy.php';
|
237 |
+
require_once SCHEMAWP_PLUGIN_DIR . 'includes/json/author-archive.php';
|
238 |
|
239 |
// Schema main output
|
240 |
require_once SCHEMAWP_PLUGIN_DIR . 'includes/json/schema-output.php';
|
uninstall.php
CHANGED
@@ -10,14 +10,17 @@
|
|
10 |
*/
|
11 |
|
12 |
// Exit if accessed directly
|
13 |
-
if ( ! defined( '
|
14 |
|
15 |
// Make sure that we are uninstalling
|
16 |
-
if ( !defined( 'WP_UNINSTALL_PLUGIN' ) )
|
17 |
-
exit();
|
18 |
|
19 |
-
//
|
20 |
-
|
|
|
|
|
|
|
|
|
21 |
|
22 |
// Leave no trail
|
23 |
$option_name = 'schema_wp_settings';
|
10 |
*/
|
11 |
|
12 |
// Exit if accessed directly
|
13 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
14 |
|
15 |
// Make sure that we are uninstalling
|
16 |
+
if ( !defined( 'WP_UNINSTALL_PLUGIN' ) ) exit();
|
|
|
17 |
|
18 |
+
// Plugin Folder Path
|
19 |
+
if ( ! defined( 'SCHEMAWP_PLUGIN_DIR' ) )
|
20 |
+
define( 'SCHEMAWP_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
21 |
+
|
22 |
+
// Load file
|
23 |
+
include_once( SCHEMAWP_PLUGIN_DIR . 'includes/admin/class-capabilities.php' );
|
24 |
|
25 |
// Leave no trail
|
26 |
$option_name = 'schema_wp_settings';
|