Plugin Directory

Changeset 2367347


Ignore:
Timestamp:
08/23/2020 02:16:12 PM (6 years ago)
Author:
milanmk
Message:

Release 1.16.2

Location:
schema-app-structured-data-for-schemaorg
Files:
26 added
3 edited

Legend:

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

    r2366035 r2367347  
    55 * Plugin URI: http://www.schemaapp.com
    66 * Description: This plugin adds http://schema.org structured data to your website
    7  * Version: 1.16.1
     7 * Version: 1.16.2
    88 * Author: Hunch Manifest
    99 * Author URI: https://www.hunchmanifest.com
  • schema-app-structured-data-for-schemaorg/trunk/lib/SchemaServer.php

    r2366035 r2367347  
    2020
    2121        public function __construct($uri = "") {
    22                 $this->options = get_option('schema_option_name');
     22            $this->options = get_option( 'schema_option_name' );
    2323
    24                 if (!empty($uri)) {
    25                         $this->resource = $uri;
    26                 } elseif (is_front_page() && is_home() || is_front_page()) {
    27                         $this->resource = home_url( '/' );
    28                 } elseif (is_tax() || is_post_type_archive()) {
    29                         $this->resource = 'http' .
    30                                 (null !== filter_input(INPUT_SERVER, 'HTTPS') ? 's' : '') .
    31                                 '://' .
    32                                 filter_input(INPUT_SERVER, 'HTTP_HOST') .
    33                                 filter_input(INPUT_SERVER, 'REQUEST_URI');
    34                 } else {
    35                         $this->resource = get_permalink();
    36                 }
     24            if ( ! empty( $uri ) ) {
     25                $this->resource = $uri;
     26            } elseif ( is_singular() ) {
     27                $this->resource = get_permalink();
     28            } else {
     29                $permalink_structure = get_option( 'permalink_structure' );
     30
     31                // If pretty permalink then remove query string from URL
     32                if ( $permalink_structure ) {
     33                    $request_uri = parse_url( $_SERVER['REQUEST_URI'], PHP_URL_PATH );
     34               
     35                    $this->resource = ( is_ssl() ? 'https' : 'http' ) . "://{$_SERVER['HTTP_HOST']}{$request_uri}";
     36                } else {
     37                    $this->resource = ( is_ssl() ? 'https' : 'http' ) . "://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}";
     38                }
     39            }
    3740        }
    3841
  • schema-app-structured-data-for-schemaorg/trunk/readme.txt

    r2366043 r2367347  
    99Requires PHP: 5.4
    1010Tested up to: 5.5
    11 Stable tag: 1.16.1
     11Stable tag: 1.16.2
    1212License: GPL2
    1313License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8787== Changelog ==
    8888
     89= 1.16.2 =
     90- Fix, Archive permalinks for Schema API resource
     91
    8992= 1.16.1 =
    9093- Improve, updated Yoast SEO filter to remove schema markup
     
    423426== Upgrade Notice ==
    424427
    425 = 1.16.0 =
    426 - Added global option for video schema markup, Webhok fix for delete markup
     428= 1.16.2 =
     429- Fix archive permalinks for Schema API resource
Note: See TracChangeset for help on using the changeset viewer.