Changeset 2571586
- Timestamp:
- 07/24/2021 11:50:28 PM (5 years ago)
- Location:
- websitescanner-custom-schema/trunk
- Files:
-
- 4 edited
-
README.txt (modified) (1 diff)
-
admin/class-websitescanner-custom-schema-admin.php (modified) (2 diffs)
-
public/class-websitescanner-custom-schema-public.php (modified) (2 diffs)
-
websitescanner-custom-schema.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
websitescanner-custom-schema/trunk/README.txt
r2548775 r2571586 4 4 Tags: schema, structured data, schema markup, json-ld, rich snippets, custom schema 5 5 Requires at least: 3.0.1 6 Tested up to: 5. 77 Stable tag: 1.3. 46 Tested up to: 5.8 7 Stable tag: 1.3.7 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html -
websitescanner-custom-schema/trunk/admin/class-websitescanner-custom-schema-admin.php
r2571580 r2571586 95 95 public function options_update() { 96 96 if (isset($_POST[$this->plugin_name])){ 97 $data = $this->validate($ data);97 $data = $this->validate($_POST[$this->plugin_name]); 98 98 if ($data) { 99 99 update_post_meta( get_the_ID(), 'websitescanner_custom_schema_post_data', $data ); … … 111 111 112 112 $valid = array(); 113 error_log("nonce isset"); 113 114 //does it exist? 114 115 if(isset($input['custom_schema_0'])){ -
websitescanner-custom-schema/trunk/public/class-websitescanner-custom-schema-public.php
r2214917 r2571586 57 57 public function get_page_json_ld(){ 58 58 // Get post id 59 $post_ID = url_to_postid((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]");59 $post_ID = get_queried_object_id(); 60 60 61 61 // get page options … … 64 64 //if page options... 65 65 if ($page_options) { 66 66 $html = ''; 67 67 if (isset($page_options['custom_schema_0']) && $page_options['custom_schema_0'] != ""){ 68 echo "<script type=\"application/ld+json\">" . wp_unslash(json_decode($page_options['custom_schema_0'])). "</script>";68 $html .= "<script type=application/ld+json>" . wp_unslash(json_decode($page_options['custom_schema_0'])) . "</script>"; 69 69 } 70 70 if (isset($page_options['custom_schema_1']) && $page_options['custom_schema_1'] != ""){ 71 echo"<script type=\"application/ld+json\">" . wp_unslash(json_decode($page_options['custom_schema_1'])) . "</script>";71 $html .= "<script type=\"application/ld+json\">" . wp_unslash(json_decode($page_options['custom_schema_1'])) . "</script>"; 72 72 } 73 73 if (isset($page_options['custom_schema_2']) && $page_options['custom_schema_2'] != ""){ 74 echo"<script type=\"application/ld+json\">" . wp_unslash(json_decode($page_options['custom_schema_2'])) . "</script>";74 $html .= "<script type=\"application/ld+json\">" . wp_unslash(json_decode($page_options['custom_schema_2'])) . "</script>"; 75 75 } 76 echo $html; 76 77 } 77 78 } -
websitescanner-custom-schema/trunk/websitescanner-custom-schema.php
r2571580 r2571586 17 17 * Plugin URI: https://plugin.nl/en/websitescanner-custom-schema-plugin/ 18 18 * Description: Adds a field to the editor for custom JSON-ld schema markup. 19 * Version: 1.3. 619 * Version: 1.3.7 20 20 * Author: Plugin.nl 21 21 * Author URI: https://plugin.nl/en/ … … 36 36 * Rename this for your plugin and update it as you release new versions. 37 37 */ 38 define( 'WEBSITESCANNER_CUSTOM_SCHEMA_VERSION', '1.3. 6' );38 define( 'WEBSITESCANNER_CUSTOM_SCHEMA_VERSION', '1.3.7' ); 39 39 /** 40 40 * The core plugin class that is used to define internationalization,
Note: See TracChangeset
for help on using the changeset viewer.