Version Description
(17 November 2018) =
- Bug Fixed: Load review css only when review is enable for that post. #67
- Menified review css in amp to put under amp css limitation.
Download this release
Release Info
Developer | ampforwp |
Plugin | Schema & Structured Data for WP & AMP |
Version | 1.0.4.1 |
Comparing to | |
See all releases |
Code changes from version 1.0.4 to 1.0.4.1
- admin_section/common-function.php +149 -140
- admin_section/images/blank_star.png +0 -0
- admin_section/images/full_star.png +0 -0
- admin_section/images/half_star.png +0 -0
- readme.txt +6 -1
- structured-data-for-wp.php +2 -2
admin_section/common-function.php
CHANGED
@@ -9,6 +9,7 @@
|
|
9 |
function saswp_import_all_settings_and_schema(){
|
10 |
$url = get_option('saswp-file-upload_url');
|
11 |
global $wpdb;
|
|
|
12 |
if($url){
|
13 |
$json_data = file_get_contents($url);
|
14 |
$json_array = json_decode($json_data, true);
|
@@ -884,145 +885,153 @@ function saswp_frontend_enqueue(){
|
|
884 |
}
|
885 |
add_action( 'wp_enqueue_scripts', 'saswp_frontend_enqueue' );
|
886 |
|
887 |
-
function saswp_enque_amp_script(){
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
}
|
979 |
-
.
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
}
|
993 |
-
.
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
|
1012 |
-
|
1013 |
-
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
}
|
1025 |
-
|
1026 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1027 |
}
|
1028 |
add_action('amp_post_template_css','saswp_enque_amp_script');
|
9 |
function saswp_import_all_settings_and_schema(){
|
10 |
$url = get_option('saswp-file-upload_url');
|
11 |
global $wpdb;
|
12 |
+
$result ='';
|
13 |
if($url){
|
14 |
$json_data = file_get_contents($url);
|
15 |
$json_array = json_decode($json_data, true);
|
885 |
}
|
886 |
add_action( 'wp_enqueue_scripts', 'saswp_frontend_enqueue' );
|
887 |
|
888 |
+
function saswp_enque_amp_script(){
|
889 |
+
global $sd_data;
|
890 |
+
$saswp_review_details = esc_sql ( get_post_meta(get_the_ID(), 'saswp_review_details', true));
|
891 |
+
$saswp_review_item_enable = 0;
|
892 |
+
if(isset($saswp_review_details['saswp-review-item-enable'])){
|
893 |
+
$saswp_review_item_enable = $saswp_review_details['saswp-review-item-enable'];
|
894 |
+
}
|
895 |
+
if($sd_data['saswp-review-module']==1 && $saswp_review_item_enable ==1){
|
896 |
+
?>
|
897 |
+
.saswp-pc-wrap{
|
898 |
+
background-color: #004f74;
|
899 |
+
padding: 15px;
|
900 |
+
color: #fff;
|
901 |
+
display: flex;
|
902 |
+
width:auto;
|
903 |
+
flex-wrap: wrap;
|
904 |
+
margin-bottom: 20px;
|
905 |
+
}
|
906 |
+
.saswp-pc-wrap .saswp-lst span{
|
907 |
+
font-size: 18px;
|
908 |
+
font-weight: 500;
|
909 |
+
margin-bottom: 10px;
|
910 |
+
display: inline-block;
|
911 |
+
line-height: 1.3;
|
912 |
+
}
|
913 |
+
.saswp-pc-wrap .saswp-lst{
|
914 |
+
flex:1 0 42%;
|
915 |
+
}
|
916 |
+
.saswp-pc-wrap .saswp-lst ul{
|
917 |
+
margin:0;
|
918 |
+
}
|
919 |
+
.saswp-pc-wrap .saswp-lst p{
|
920 |
+
list-style-type: none;
|
921 |
+
font-size: 15px;
|
922 |
+
font-weight: lighter;
|
923 |
+
line-height: 1.2;
|
924 |
+
margin-bottom: 10px;
|
925 |
+
position: relative;
|
926 |
+
padding-left: 20px;
|
927 |
+
color:#eee;
|
928 |
+
}
|
929 |
+
.saswp-pc-wrap .saswp-lst p:before{
|
930 |
+
content: '';
|
931 |
+
position: absolute;
|
932 |
+
width: 8px;
|
933 |
+
height: 8px;
|
934 |
+
background-color: #ccc;
|
935 |
+
left: 0px;
|
936 |
+
top: 6px;
|
937 |
+
border-radius: 10px;
|
938 |
+
}
|
939 |
+
.sgl .saswp-rvw {
|
940 |
+
width: 100%;
|
941 |
+
margin-bottom: 34px;
|
942 |
+
font-size: 13px;
|
943 |
+
border-bottom: 1px solid #ededed;
|
944 |
+
}
|
945 |
+
.saswp-rvw-hd span {
|
946 |
+
background-color: #222;
|
947 |
+
color: #fff;
|
948 |
+
display: inline-block;
|
949 |
+
font-size: 15px;
|
950 |
+
line-height: 1.4;
|
951 |
+
padding: 8px 12px 6px;
|
952 |
+
margin: 26px 0px;
|
953 |
+
}
|
954 |
+
.saswp-rvw tbody{
|
955 |
+
width:100%;
|
956 |
+
display:inline-block;
|
957 |
+
}
|
958 |
+
.saswp-rvw td {
|
959 |
+
padding: 7px 14px;
|
960 |
+
}
|
961 |
+
.sgl table td, .saswp-rvw td {
|
962 |
+
border: 1px solid #ededed;
|
963 |
+
}
|
964 |
+
.saswp-rvw-sm span{
|
965 |
+
background-color: #222;
|
966 |
+
color: #fff;
|
967 |
+
display: inline-block;
|
968 |
+
padding: 8px 12px 6px;
|
969 |
+
margin-bottom: 13px;
|
970 |
+
position: relative;
|
971 |
+
font-size: 15px;
|
972 |
+
line-height: 1.2;
|
973 |
+
}
|
974 |
+
.saswp-rvw-fs {
|
975 |
+
line-height: 1.5;
|
976 |
+
font-size: 48px;
|
977 |
+
font-weight: 600;
|
978 |
+
margin-bottom: 5px;
|
979 |
+
}
|
980 |
+
.saswp-rvw-ov .ovs {
|
981 |
+
font-size: 11px;
|
982 |
+
font-weight:600;
|
983 |
+
}
|
984 |
+
.sgl .saswp-rvw tr td{
|
985 |
+
background:#fff;
|
986 |
+
width:100%;
|
987 |
+
}
|
988 |
+
.sgl .saswp-rvw tr:hover td {
|
989 |
+
background-color: #fcfcfc;
|
990 |
+
}
|
991 |
+
.saswp-rvw .saswp-rvw-sm {
|
992 |
+
padding: 21px 14px;
|
993 |
+
}
|
994 |
+
.str-ic{
|
995 |
+
font-size: 18px;
|
996 |
+
line-height: 1.2;
|
997 |
+
}
|
998 |
+
.saswp-rvw-str{
|
999 |
+
display: inline-flex;
|
1000 |
+
width: 100%;
|
1001 |
+
}
|
1002 |
+
.saswp-rvw-ov{
|
1003 |
+
text-align:center;
|
1004 |
+
}
|
1005 |
+
.saswp-rvw-str .half-str{
|
1006 |
+
display:inline-block;
|
1007 |
+
width: 20px;
|
1008 |
+
height: 16px;
|
1009 |
+
background-repeat: no-repeat;
|
1010 |
+
background-image: url(<?php echo SASWP_DIR_URI.'/admin_section/images/half_star.png'; ?>);
|
1011 |
+
}
|
1012 |
+
.saswp-rvw-str .str-ic{
|
1013 |
+
display:inline-block;
|
1014 |
+
width: 20px;
|
1015 |
+
height: 16px;
|
1016 |
+
background-repeat: no-repeat;
|
1017 |
+
background-image: url(<?php echo SASWP_DIR_URI.'/admin_section/images/full_star.png'; ?>);
|
1018 |
+
}
|
1019 |
+
.saswp-rvw-str .df-clr{
|
1020 |
+
display:inline-block;
|
1021 |
+
width: 20px;
|
1022 |
+
height: 16px;
|
1023 |
+
background-repeat: no-repeat;
|
1024 |
+
background-image: url(<?php echo SASWP_DIR_URI.'/admin_section/images/blank_star.png'; ?>);
|
1025 |
+
}
|
1026 |
+
@media(max-width:500px){
|
1027 |
+
.saswp-pc-wrap{
|
1028 |
+
display:block;
|
1029 |
+
}
|
1030 |
+
.saswp-pc-wrap .saswp-lst{
|
1031 |
+
margin-bottom:20px;
|
1032 |
+
}
|
1033 |
+
}
|
1034 |
+
<?php
|
1035 |
+
}
|
1036 |
}
|
1037 |
add_action('amp_post_template_css','saswp_enque_amp_script');
|
admin_section/images/blank_star.png
ADDED
Binary file
|
admin_section/images/full_star.png
ADDED
Binary file
|
admin_section/images/half_star.png
ADDED
Binary file
|
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.4
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -65,6 +65,11 @@ You can contact us from [here](http://structured-data-for-wp.com/contact-us/)
|
|
65 |
|
66 |
== Changelog ==
|
67 |
|
|
|
|
|
|
|
|
|
|
|
68 |
= 1.0.4 (16 November 2018) =
|
69 |
* Major Feature: Post Specific Meta boxes to override the schemas on posts
|
70 |
* Major Feature: Rich Snippets for Reviews and Ratings
|
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.4.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.4.1 (17 November 2018) =
|
69 |
+
|
70 |
+
* Bug Fixed: Load review css only when review is enable for that post. #67
|
71 |
+
* Menified review css in amp to put under amp css limitation.
|
72 |
+
|
73 |
= 1.0.4 (16 November 2018) =
|
74 |
* Major Feature: Post Specific Meta boxes to override the schemas on posts
|
75 |
* Major Feature: Rich Snippets for Reviews and Ratings
|
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.4
|
6 |
Text Domain: schema-and-structured-data-for-wp
|
7 |
Author: Mohammed Kaludi, Ahmed Kaludi
|
8 |
Author URI: http://structured-data-for-wp.com/
|
@@ -12,7 +12,7 @@ License: GPL2
|
|
12 |
// Exit if accessed directly.
|
13 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
14 |
|
15 |
-
define('SASWP_VERSION', '1.0.4');
|
16 |
define('SASWP_DIR_NAME_FILE', __FILE__ );
|
17 |
define('SASWP_DIR_NAME', dirname( __FILE__ ));
|
18 |
define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
|
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.4.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/
|
12 |
// Exit if accessed directly.
|
13 |
if ( ! defined( 'ABSPATH' ) ) exit;
|
14 |
|
15 |
+
define('SASWP_VERSION', '1.0.4.1');
|
16 |
define('SASWP_DIR_NAME_FILE', __FILE__ );
|
17 |
define('SASWP_DIR_NAME', dirname( __FILE__ ));
|
18 |
define('SASWP_DIR_URI', plugin_dir_url(__FILE__));
|