Plugin Directory

Changeset 3408554


Ignore:
Timestamp:
12/02/2025 10:17:14 PM (3 months ago)
Author:
schemaappnick
Message:

Release 2.3.0

Location:
schema-app-structured-data-for-schemaorg/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • schema-app-structured-data-for-schemaorg/trunk/hunch-schema.php

    r3314005 r3408554  
    55 * Plugin URI: http://www.schemaapp.com
    66 * Description: This plugin adds http://schema.org structured data to your website
    7  * Version: 2.2.9
     7 * Version: 2.3.0
    88 * Author: Schema App
    99 * Author URI: https://www.schemaapp.com
  • schema-app-structured-data-for-schemaorg/trunk/lib/SchemaFront.php

    r3314005 r3408554  
    235235            global $post;
    236236
    237             if (empty($post)) {
     237            // Exclude: empty posts, admin pages, attachments
     238            if (empty($post) || is_admin() || is_attachment()) {
    238239                return;
    239240            }
     241            // Exclude WooCommerce account and checkout pages
     242            if (class_exists('WooCommerce') && (is_account_page() || is_checkout())) {
     243                return;
     244            }
    240245
    241246            $PostType = get_post_type();
    242247
    243 
     248            // Check settings for whether to show markup for singular pages
    244249            if (is_singular()) {
    245250                $global_markup = true;
    246251                $single_markup_disable = get_post_meta($post->ID, '_HunchSchemaDisableMarkup', true);
    247252                $single_markup_enable = get_post_meta($post->ID, '_HunchSchemaEnableMarkup', true);
    248 
    249                 if ($PostType == 'page' && isset($this->Settings['SchemaDefaultShowOnPage']) && $this->Settings['SchemaDefaultShowOnPage'] == 0) {
     253                $typeSettings = [
     254                    'page' => 'SchemaDefaultShowOnPage',
     255                    'post' => 'SchemaDefaultShowOnPost'
     256                ];
     257                if (isset($typeSettings[$PostType]) && isset($this->Settings[$typeSettings[$PostType]]) && $this->Settings[$typeSettings[$PostType]] == 0) {
    250258                    $global_markup = false;
    251259                }
    252 
    253                 if ($PostType == 'post' && isset($this->Settings['SchemaDefaultShowOnPost']) && $this->Settings['SchemaDefaultShowOnPost'] == 0) {
    254                     $global_markup = false;
    255                 }
    256 
    257                 if (($global_markup && $single_markup_disable) || (!$global_markup && !$single_markup_enable)) {
     260                if ($global_markup && $single_markup_disable || !$global_markup && !$single_markup_enable) {
    258261                    return;
    259262                }
    260 
    261                 if (class_exists('WooCommerce') && (is_account_page() || is_checkout())) {
    262                     return;
    263                 }
    264             }
    265 
     263            }
    266264
    267265            $SchemaThing = HunchSchema_Thing::factory($PostType);
  • schema-app-structured-data-for-schemaorg/trunk/readme.txt

    r3314005 r3408554  
    88Requires at least: 4.4
    99Requires PHP: 5.4
    10 Tested up to: 6.8
    11 Stable tag: 2.2.9
     10Tested up to: 6.9
     11Stable tag: 2.3.0
    1212License: GPL2
    1313License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8282
    8383== Changelog ==
     84= 2.3.0 =
     85Release Date - 02 Dec 2025
     86- Improve, Tested up to WordPress 6.9
     87- Fix, Do not attempt to render markup or send to SchemaApp when page is 404 or is attachment
     88
    8489= 2.2.9 =
    8590Release Date - 18 June 2025
Note: See TracChangeset for help on using the changeset viewer.