Plugin Directory

Changeset 3142940


Ignore:
Timestamp:
08/28/2024 01:11:28 PM (19 months ago)
Author:
david.kane
Message:

Releasing v2.24.0

Location:
supapress/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • supapress/trunk/admin/admin.php

    r2946444 r3142940  
    464464
    465465    $properties                = array();
    466     $properties['showText']    = isset( $_REQUEST['showText'] ) ? htmlspecialchars( $_REQUEST['showText'] ) : '';
    467     $properties['hideText']    = isset( $_REQUEST['hideText'] ) ? htmlspecialchars( $_REQUEST['hideText'] ) : '';
    468     $properties['clearText']   = isset( $_REQUEST['clearText'] ) ? htmlspecialchars( $_REQUEST['clearText'] ) : '';
     466    $properties['showText']    = isset( $_REQUEST['showText'] ) ? htmlspecialchars( (string) $_REQUEST['showText'] ) : '';
     467    $properties['hideText']    = isset( $_REQUEST['hideText'] ) ? htmlspecialchars( (string) $_REQUEST['hideText'] ) : '';
     468    $properties['clearText']   = isset( $_REQUEST['clearText'] ) ? htmlspecialchars( (string) $_REQUEST['clearText'] ) : '';
    469469    $properties['limits']      = isset( $_REQUEST['limits'] ) ? $_REQUEST['limits'] : array();
    470470    $properties['filtersList'] = isset( $_REQUEST['filters'] ) ? $_REQUEST['filters'] : array();
  • supapress/trunk/admin/views/settings.php

    r2991891 r3142940  
    201201                    <div class="supapress-accordion-content-inner">
    202202                        <div class="supapress-field-wrapper">
     203                            <p class="supapress-paragraph">
     204                                <span>
     205                                    <?php echo __("We strongly recommend keeping this setting enabled to ensure your product details are correctly indexed.", 'supapress'); ?>
     206                                </span>
     207                            </p>
     208                        </div>
     209                        <div class="supapress-field-wrapper">
    203210                            <label class="supapress-label" for="supapress-product-details-seo-override">
    204211                                <?php _e('Override SEO:', 'supapress' );?>
     
    241248                        <div class="supapress-field-wrapper">
    242249                            <label for="supapress-product-details-seo-canonical-primary-format" class="supapress-label">
    243                                 <?php _e('Primary Format Canonical:', 'supapress' );?>
     250                                <?php _e('Redirect to primary format:', 'supapress' );?>
    244251                            </label>
    245252                            <div class="onoffswitch">
  • supapress/trunk/composer.json

    r2991891 r3142940  
    33    "description": "Quickly and easily connect your book metadata (ONIX) to your WordPress site.",
    44    "type": "wordpress-plugin",
    5     "version": "2.23.4",
     5    "version": "2.24.0",
    66    "authors": [
    77        {
  • supapress/trunk/includes/functions.php

    r2901082 r3142940  
    940940        }
    941941
    942     }
     942    }   
    943943
    944944    add_filter( 'wpseo_opengraph_url', $supapress_seo_override_url, 15, 3 );
     
    951951    add_filter( 'wpseo_twitter_image', $supapress_seo_override_cover, 15, 3 );
    952952
    953 }
    954 
     953    supapress_run_canonical_redirect($supapress_seo_override_url( $field ));
     954
     955}
     956
     957function supapress_run_canonical_redirect(string $canonical_url) {
     958
     959    if(empty($canonical_url)){
     960        return;
     961    }
     962   
     963    // if there is a QUERY_STRING don't run
     964    if (!empty($_SERVER['QUERY_STRING'])) {
     965        return;
     966    }
     967
     968    $current_url = "https://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
     969    $canonical_url = apply_filters( 'wpseo_canonical', '' );
     970
     971    if ($current_url !== $canonical_url) {
     972        wp_redirect($canonical_url, 301);
     973        exit();
     974    }
     975}
    955976
    956977
  • supapress/trunk/includes/widget.php

    r2991891 r3142940  
    372372        if ( $result === null ) {
    373373            // Set additional params if they've been added as attributes of the shortcode
    374             $params = $this->setAdditionalParams( $params, $this->properties['atts'] );
     374            $params = $this->setAdditionalParams( $params, $this->properties );
    375375            // Call Supafolio
    376376            $result = $service !== null ? supapress_call_supafolio( $service, $params, $this->properties ) : "Something went wrong";
     
    515515     * Checks attributes for known params and adds to service URL
    516516     */
    517     public static function setAdditionalParams( $params, $atts ) {
     517    public static function setAdditionalParams( $params, $properties ) {
     518
     519        $atts = $properties['atts'];
     520
     521        if( isset( $properties['show_series'] ) && $properties['show_series'] === 'on' ) {
     522            $params['series_data'] = '1';
     523        }
     524
    518525        // Include price for other formats
    519526        if ( isset( $atts['include_price'] ) ) {
  • supapress/trunk/readme.txt

    r2991891 r3142940  
    33Tags: supadü, supadu, folio, books, publishers, supafolio, supadu for wordpress, supapress, supafolio for wordpress
    44Requires at least: 6.0
    5 Tested up to: 6.4
    6 Stable tag: 2.23.4
     5Tested up to: 6.6.1
     6Stable tag: 2.24.0
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    3838
    3939== Changelog ==
     40
     41= 2.24.0 =
     42Release Date: Aug 2024
     43* Update: supapress_run_canonical_redirect added
    4044
    4145= 2.23.4 =
  • supapress/trunk/supapress.php

    r2991891 r3142940  
    77 * Plugin URI: https://www.supadu.com
    88 * Description: Quickly and easily connect your book metadata (ONIX) to your WordPress site.
    9  * Version: 2.23.4
     9 * Version: 2.24.0
    1010 * Author: Supadü
    1111 * Author URI: https://www.supadu.com
     
    3737defined( 'ABSPATH' ) or die( 'Illegal Access!' );
    3838
    39 define( 'SUPAPRESS_VERSION', '2.23.4' );
     39define( 'SUPAPRESS_VERSION', '2.24.0' );
    4040
    4141define( 'SUPAPRESS_SITE_URL', get_site_url() );
Note: See TracChangeset for help on using the changeset viewer.