Version Description
(06 October 2018) = * Bug fix: Login button was appearing without paywall enable. * Bug fix: Local business schema bug fix.
Download this release
Release Info
Developer | mohammed_kaludi |
Plugin | Schema & Structured Data for WP & AMP |
Version | 1.0.2.1 |
Comparing to | |
See all releases |
Code changes from version 1.0.2 to 1.0.2.1
- output/function.php +13 -5
- readme.txt +6 -2
- structured-data-for-wp.php +3 -3
- view/schema_type.php +5 -2
output/function.php
CHANGED
@@ -111,14 +111,20 @@ function saswp_paywall_data_for_login($content){
|
|
111 |
return $content;
|
112 |
}else{
|
113 |
|
114 |
-
$
|
|
|
115 |
foreach($Conditionals as $schemaConditionals){
|
116 |
-
$schema_options = $schemaConditionals['schema_options'];
|
|
|
117 |
if(isset($schema_options['paywall_class_name'])){
|
118 |
-
$className = $schema_options['paywall_class_name'];
|
119 |
-
|
120 |
-
|
|
|
|
|
|
|
121 |
}
|
|
|
122 |
if(strpos($content, '<!--more-->')!==false && !is_user_logged_in()){
|
123 |
global $wp;
|
124 |
$redirect = home_url( $wp->request );
|
@@ -130,6 +136,8 @@ function saswp_paywall_data_for_login($content){
|
|
130 |
$breakedContent = explode("<!--more-->", $content);
|
131 |
$content = $breakedContent[0].'<div class="'.$className.'">'.$breakedContent[1].'</div>';
|
132 |
}
|
|
|
|
|
133 |
}
|
134 |
return $content;
|
135 |
}
|
111 |
return $content;
|
112 |
}else{
|
113 |
|
114 |
+
$paywallenable ='';
|
115 |
+
$className ='paywall';
|
116 |
foreach($Conditionals as $schemaConditionals){
|
117 |
+
$schema_options = $schemaConditionals['schema_options'];
|
118 |
+
|
119 |
if(isset($schema_options['paywall_class_name'])){
|
120 |
+
$className = $schema_options['paywall_class_name'];
|
121 |
+
}
|
122 |
+
if(isset($schema_options['notAccessibleForFree'])){
|
123 |
+
$paywallenable = $schema_options['notAccessibleForFree'];
|
124 |
+
break;
|
125 |
+
}
|
126 |
}
|
127 |
+
if($paywallenable){
|
128 |
if(strpos($content, '<!--more-->')!==false && !is_user_logged_in()){
|
129 |
global $wp;
|
130 |
$redirect = home_url( $wp->request );
|
136 |
$breakedContent = explode("<!--more-->", $content);
|
137 |
$content = $breakedContent[0].'<div class="'.$className.'">'.$breakedContent[1].'</div>';
|
138 |
}
|
139 |
+
}
|
140 |
+
|
141 |
}
|
142 |
return $content;
|
143 |
}
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: mohammed_kaludi, ahmedkaludi, ampforwp
|
|
3 |
Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 4.9.8
|
6 |
-
Stable tag: 1.0.2
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -65,7 +65,11 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
|
|
65 |
|
66 |
== Changelog ==
|
67 |
|
68 |
-
= 1.0.2 (
|
|
|
|
|
|
|
|
|
69 |
* First Time Installation Setup Wizard
|
70 |
* Added a Support form to provide faster support
|
71 |
* Full Local Business Schema Markup Support
|
3 |
Tags: Schema, Structured Data, Google Snippets, Rich Snippets, Schema.org, SEO, AMP
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 4.9.8
|
6 |
+
Stable tag: 1.0.2.1
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
65 |
|
66 |
== Changelog ==
|
67 |
|
68 |
+
= 1.0.2.1 (06 October 2018) =
|
69 |
+
* Bug fix: Login button was appearing without paywall enable.
|
70 |
+
* Bug fix: Local business schema bug fix.
|
71 |
+
|
72 |
+
= 1.0.2 (28 September 2018) =
|
73 |
* First Time Installation Setup Wizard
|
74 |
* Added a Support form to provide faster support
|
75 |
* Full Local Business Schema Markup Support
|
structured-data-for-wp.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: Schema & Structured Data for WP
|
4 |
Description: Schema & Structured Data adds Google Rich Snippets markup according to Schema.org guidelines to structure your site for SEO. (AMP Compatible)
|
5 |
-
Version: 1.0.2
|
6 |
Text Domain: schema-and-structured-data-for-wp
|
7 |
Author: Mohammed Kaludi, Ahmed Kaludi
|
8 |
Author URI: http://structured-data-for-wp.com/
|
@@ -13,13 +13,13 @@ License: GPL2
|
|
13 |
// Exit if accessed directly.
|
14 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
15 |
|
16 |
-
define('SASWP_VERSION', '1.0.2');
|
17 |
define('SASWP_DIR_NAME_FILE', __FILE__ );
|
18 |
define('SASWP_DIR_NAME', dirname( __FILE__ ));
|
19 |
define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
|
20 |
|
21 |
if ( ! defined( 'SASWP_VERSION' ) ) {
|
22 |
-
define( 'SASWP_VERSION', '1.0.2' );
|
23 |
}
|
24 |
// the name of the settings page for the license input to be displayed
|
25 |
if(! defined('SASWP_ITEM_FOLDER_NAME')){
|
2 |
/*
|
3 |
Plugin Name: Schema & Structured Data for WP
|
4 |
Description: Schema & Structured Data adds Google Rich Snippets markup according to Schema.org guidelines to structure your site for SEO. (AMP Compatible)
|
5 |
+
Version: 1.0.2.1
|
6 |
Text Domain: schema-and-structured-data-for-wp
|
7 |
Author: Mohammed Kaludi, Ahmed Kaludi
|
8 |
Author URI: http://structured-data-for-wp.com/
|
13 |
// Exit if accessed directly.
|
14 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
15 |
|
16 |
+
define('SASWP_VERSION', '1.0.2.1');
|
17 |
define('SASWP_DIR_NAME_FILE', __FILE__ );
|
18 |
define('SASWP_DIR_NAME', dirname( __FILE__ ));
|
19 |
define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
|
20 |
|
21 |
if ( ! defined( 'SASWP_VERSION' ) ) {
|
22 |
+
define( 'SASWP_VERSION', '1.0.2.1' );
|
23 |
}
|
24 |
// the name of the settings page for the license input to be displayed
|
25 |
if(! defined('SASWP_ITEM_FOLDER_NAME')){
|
view/schema_type.php
CHANGED
@@ -525,8 +525,7 @@
|
|
525 |
<?php
|
526 |
}
|
527 |
|
528 |
-
function saswp_schema_type_add_meta_box_save( $post_id ) {
|
529 |
-
|
530 |
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;
|
531 |
if ( ! isset( $_POST['saswp_schema_type_nonce'] ) || ! wp_verify_nonce( $_POST['saswp_schema_type_nonce'], 'saswp_schema_type_nonce' ) ) return;
|
532 |
if ( ! current_user_can( 'edit_post', $post_id ) ) return;
|
@@ -537,10 +536,14 @@
|
|
537 |
|
538 |
if ( isset( $_POST['saswp_business_type'] ) ){
|
539 |
update_post_meta( $post_id, 'saswp_business_type', esc_attr( $_POST['saswp_business_type'] ) );
|
|
|
|
|
540 |
}
|
541 |
|
542 |
if ( isset( $_POST['saswp_business_name'] ) ){
|
543 |
update_post_meta( $post_id, 'saswp_business_name', esc_attr( $_POST['saswp_business_name'] ) );
|
|
|
|
|
544 |
}
|
545 |
|
546 |
$local_business_details = array();
|
525 |
<?php
|
526 |
}
|
527 |
|
528 |
+
function saswp_schema_type_add_meta_box_save( $post_id ) {
|
|
|
529 |
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;
|
530 |
if ( ! isset( $_POST['saswp_schema_type_nonce'] ) || ! wp_verify_nonce( $_POST['saswp_schema_type_nonce'], 'saswp_schema_type_nonce' ) ) return;
|
531 |
if ( ! current_user_can( 'edit_post', $post_id ) ) return;
|
536 |
|
537 |
if ( isset( $_POST['saswp_business_type'] ) ){
|
538 |
update_post_meta( $post_id, 'saswp_business_type', esc_attr( $_POST['saswp_business_type'] ) );
|
539 |
+
}else{
|
540 |
+
update_post_meta( $post_id, 'saswp_business_type','');
|
541 |
}
|
542 |
|
543 |
if ( isset( $_POST['saswp_business_name'] ) ){
|
544 |
update_post_meta( $post_id, 'saswp_business_name', esc_attr( $_POST['saswp_business_name'] ) );
|
545 |
+
}else{
|
546 |
+
update_post_meta( $post_id, 'saswp_business_name', '' );
|
547 |
}
|
548 |
|
549 |
$local_business_details = array();
|