Plugin Directory

Changeset 2614698


Ignore:
Timestamp:
10/15/2021 11:58:25 AM (4 years ago)
Author:
tivnet
Message:

2.8.4

Location:
wpglobus/trunk
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • wpglobus/trunk/includes/builders/class-wpglobus-builders.php

    r2334512 r2614698  
    9999            );
    100100
    101             if ( file_exists( WP_PLUGIN_DIR . '/wordpress-seo-premium/wp-seo-premium.php' ) ) {
    102 
    103                 self::$add_on['yoast_seo'] = array(
    104                     'id'                    => 'yoast_seo',
    105                     'role'                  => 'builder',
    106                     'admin_bar_label'       => 'Add-on',
    107                     'supported_min_version' => '7.7',
    108                     'const'                 => 'WPSEO_VERSION',
    109                     'plugin_name'           => 'Yoast SEO Premium',
    110                     'plugin_uri'            => 'https://yoast.com/wordpress/plugins/seo/',
    111                     'path'                  => 'wordpress-seo-premium/wp-seo-premium.php',
    112                     'stage'                 => 'production',
    113                 );
    114 
    115             }
    116 
    117101            /**
     102             * Yoast SEO add-ons.
    118103             * @since 2.3.11
     104             * @since 2.8.4 Moved to separate file.
    119105             */
    120             $_file = 'wordpress-seo/wp-seo.php';
    121             $_plugin_name = 'Yoast SEO';
    122             if ( defined( 'WPGLOBUS_YOAST_PLUGIN_FILE' ) ) {
    123                 $_file = WPGLOBUS_YOAST_PLUGIN_FILE;
    124                 $_plugin_name = 'Yoast SEO('.$_file.')';
    125             }
    126            
    127             if ( file_exists( WP_PLUGIN_DIR . '/' . $_file ) ) {
    128 
    129                 if ( ! defined( 'WPSEO_PREMIUM_PLUGIN_FILE' ) ) {
    130 
    131                     self::$add_on['yoast_seo'] = array(
    132                         'id'                    => 'yoast_seo',
    133                         'role'                  => 'builder',
    134                         'admin_bar_label'       => 'Add-on',
    135                         'supported_min_version' => '7.7',
    136                         'const'                 => 'WPSEO_VERSION',
    137                         'plugin_name'           => $_plugin_name,
    138                         'plugin_uri'            => 'https://wordpress.org/plugins/wordpress-seo/',
    139                         'path'                  => $_file,
    140                         'stage'                 => 'production',
    141                     );
    142 
    143                 }
    144             }
    145 
     106            $_addon_dir = dirname( __FILE__ ) . '/yoast_seo/addon-yoast_seo.php';
     107            if ( file_exists($_addon_dir) ) {
     108                require_once $_addon_dir;
     109            }
     110
     111            /**
     112             * WooCommerce.
     113             */
    146114            self::$add_on['woocommerce'] = array(
    147115                'id'                    => 'woocommerce',
     
    12551223            if ( defined( 'WPSEO_VERSION' ) ) {
    12561224
     1225                /**
     1226                 * @since 2.8.4
     1227                 */
     1228                $id = 'yoast_seo';
     1229                $version = WPSEO_VERSION;
     1230
     1231                if ( version_compare( WPSEO_VERSION, '17.3', '>=' ) ) {
     1232                    /** @see code in addon-yoast_seo.php */
     1233
     1234                    $id = self::$add_on['yoast_seo']['id'];
     1235                   
     1236                    if ( defined( 'WPSEO_PREMIUM_VERSION' ) ) {
     1237                        $id = self::$add_on['yoast_seo_premium']['id'];
     1238                        $version = WPSEO_PREMIUM_VERSION;
     1239                    }
     1240                }
     1241
    12571242                /** @global string $pagenow */
    12581243                global $pagenow;
     
    12781263
    12791264                    $_attrs = array(
    1280                         'id'           => 'yoast_seo',
    1281                         'version'      => WPSEO_VERSION,
     1265                        'id'           => $id,
     1266                        'version'      => $version,
    12821267                        'class'        => 'WPGlobus_Yoast_SEO',
    12831268                        'builder_page' => false,
     
    13091294                    return $attrs;
    13101295
    1311                 } elseif ( 'term.php' === $pagenow ) {
     1296                } else if ( 'term.php' === $pagenow ) {
    13121297
    13131298                    $tax = empty( $_GET['taxonomy'] ) ? false : sanitize_text_field( wp_unslash( $_GET['taxonomy'] ) ); // phpcs:ignore WordPress.CSRF.NonceVerification
     
    13161301
    13171302                        $_attrs = array(
    1318                             'id'           => 'yoast_seo',
    1319                             'version'      => WPSEO_VERSION,
     1303                            'id'           => $id,
     1304                            'version'      => $version,
    13201305                            'class'        => 'WPGlobus_Yoast_SEO',
    13211306                            'builder_page' => false,
     
    13391324                        return $attrs;
    13401325                    }
    1341                 } elseif ( 'edit-tags.php' === $pagenow ) {
     1326                } else if ( 'edit-tags.php' === $pagenow ) {
    13421327                    /**
    13431328                     * Case when Update button was clicked on term.php page .
     
    13491334
    13501335                        $_attrs = array(
    1351                             'id'           => 'yoast_seo',
    1352                             'version'      => WPSEO_VERSION,
     1336                            'id'           => $id,
     1337                            'version'      => $version,
    13531338                            'class'        => 'WPGlobus_Yoast_SEO',
    13541339                            'builder_page' => false,
     
    13741359
    13751360            return false;
    1376 
    13771361        }
    13781362
  • wpglobus/trunk/includes/class-wpglobus-widget.php

    r2363945 r2614698  
    4747    public function widget( $args, $instance ) {
    4848
    49         if ( ! empty( $instance['type'] ) ) {
    50             $type = $instance['type'];
    51         } else {
    52             $type = 'flags';
    53         }
     49        $type = ! empty( $instance['type'] ) ? $instance['type'] : 'flags';
     50
     51        /**
     52         * @since 2.8.4
     53         */
     54        $title = ! empty( $instance['title'] ) ? $instance['title'] : 'Language switcher';
    5455
    5556        $inside = '';
     
    152153        $flag_classes = array();
    153154
     155        /**
     156         * @since 2.8.4
     157         *
     158         * This filter is documented in wp-includes/widgets/class-wp-widget-pages.php
     159         */
     160        $title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
     161
    154162        echo $args['before_widget']; // WPCS: XSS ok.
    155         if ( ! empty( $instance['title'] ) ) {
    156             echo $args['before_title'] . $instance['title'] . $args['after_title']; // WPCS: XSS ok.
     163        if ( ! empty( $title ) ) {
     164            echo $args['before_title'] . $title . $args['after_title']; // WPCS: XSS ok.
    157165        }
    158166        foreach ( $enabled_languages as $language ) :
  • wpglobus/trunk/includes/js/wpglobus-media.js

    r1567245 r2614698  
    3333            api.iniSet();
    3434            api.setContent();
     35            api.translate();
    3536            api.attachListeners();
    3637        },
     
    5354                    $('#'+id).val( WPGlobusCore.TextFilter( api.content[id], WPGlobusMedia.language, 'RETURN_EMPTY' ) );
    5455                });
     56            }
     57        },
     58        translate: function() {
     59            /* Translate post title in Suvmit Box */
     60            var $postTitle = $('#submitpost .misc-pub-uploadedto strong');
     61            if ( $postTitle.length == 1 ) {
     62                var title = $postTitle.text();
     63                if ( '' != title ) {
     64                    $postTitle.text(WPGlobusCore.TextFilter(title));
     65                }
    5566            }
    5667        },
  • wpglobus/trunk/includes/js/wpglobus-media.min.js

    r2542267 r2614698  
    1 !function(n){"use strict";var a;"undefined"!=typeof WPGlobusCore&&"undefined"!=typeof WPGlobusMedia&&(a={content:{},save:!0,resetContent:!0,init:function(t){var e=n(".wpglobus-post-body-tabs");1==e.length&&(e.insertBefore(".wp_attachment_details"),e.tabs(),a.iniSet(),a.setContent(),a.attachListeners())},iniSet:function(){n.each(WPGlobusMedia.attachment,function(t,e){a.content[e]=n("#"+e).val(),n("#"+e).addClass("wpglobus-translatable")})},setContent:function(t){(t=void 0===t?!1:t)?n.each(WPGlobusMedia.attachment,function(t,e){n("#"+e).val(a.content[e])}):n.each(WPGlobusMedia.attachment,function(t,e){n("#"+e).val(WPGlobusCore.TextFilter(a.content[e],WPGlobusMedia.language,"RETURN_EMPTY"))})},attachListeners:function(){n(document).on("tabsactivate",".wpglobus-post-body-tabs",function(t,e){WPGlobusMedia.language=e.newTab[0].dataset.language,a.setContent()}),n.each(WPGlobusMedia.attachment,function(t,e){n(document).on("keyup","#"+e,function(t){a.content[t.currentTarget.id]=WPGlobusCore.getString(a.content[t.currentTarget.id],t.currentTarget.value,WPGlobusMedia.language)})}),n(document).on("mouseenter","#publish",function(t){a.setContent(a.save)}).on("mouseleave","#publish",function(t){a.resetContent&&a.setContent(),a.resetContent=!0}).on("click","#publish",function(t){a.resetContent=!1}),n(document).ajaxSend(function(t,e,n){void 0!==n.data&&-1!=n.data.indexOf("action=send-attachment-to-editor")&&(n.data=n.data+"&wpglobusLanguageTab="+WPGlobusAdmin.currentTab)})}},(WPGlobusMedia=n.extend({},WPGlobusMedia,a)).init())}(jQuery);
     1!function(n){"use strict";var a;"undefined"!=typeof WPGlobusCore&&"undefined"!=typeof WPGlobusMedia&&(a={content:{},save:!0,resetContent:!0,init:function(t){var e=n(".wpglobus-post-body-tabs");1==e.length&&(e.insertBefore(".wp_attachment_details"),e.tabs(),a.iniSet(),a.setContent(),a.translate(),a.attachListeners())},iniSet:function(){n.each(WPGlobusMedia.attachment,function(t,e){a.content[e]=n("#"+e).val(),n("#"+e).addClass("wpglobus-translatable")})},setContent:function(t){(t=void 0===t?!1:t)?n.each(WPGlobusMedia.attachment,function(t,e){n("#"+e).val(a.content[e])}):n.each(WPGlobusMedia.attachment,function(t,e){n("#"+e).val(WPGlobusCore.TextFilter(a.content[e],WPGlobusMedia.language,"RETURN_EMPTY"))})},translate:function(){var t,e=n("#submitpost .misc-pub-uploadedto strong");1!=e.length||""!=(t=e.text())&&e.text(WPGlobusCore.TextFilter(t))},attachListeners:function(){n(document).on("tabsactivate",".wpglobus-post-body-tabs",function(t,e){WPGlobusMedia.language=e.newTab[0].dataset.language,a.setContent()}),n.each(WPGlobusMedia.attachment,function(t,e){n(document).on("keyup","#"+e,function(t){a.content[t.currentTarget.id]=WPGlobusCore.getString(a.content[t.currentTarget.id],t.currentTarget.value,WPGlobusMedia.language)})}),n(document).on("mouseenter","#publish",function(t){a.setContent(a.save)}).on("mouseleave","#publish",function(t){a.resetContent&&a.setContent(),a.resetContent=!0}).on("click","#publish",function(t){a.resetContent=!1}),n(document).ajaxSend(function(t,e,n){void 0!==n.data&&-1!=n.data.indexOf("action=send-attachment-to-editor")&&(n.data=n.data+"&wpglobusLanguageTab="+WPGlobusAdmin.currentTab)})}},(WPGlobusMedia=n.extend({},WPGlobusMedia,a)).init())}(jQuery);
  • wpglobus/trunk/includes/vendor/yoast-seo/class-wpglobus-yoastseo140.php

    r2572349 r2614698  
    708708                     * @since 2.8.1
    709709                     */
    710                     if ( empty( $meta_cache['_yoast_wpseo_focuskw'][0] ) ) {
     710                    if ( empty( $meta_cache['_yoast_wpseo_title'][0] ) ) {
    711711                        $__title = self::get_option( 'wpseo_titles', 'title-' . $presentation->model->object_sub_type );
    712712                        if ( ! is_null($__title) ) {
  • wpglobus/trunk/readme.txt

    r2605532 r2614698  
    221221== Changelog ==
    222222
     223= 2.8.4 =
     224* (Core/Widget class) Added `widget_title` filter.
     225* (Vendor/Yoast) Fixed PHP Notice: `Undefined index: _yoast_wpseo_title`.
     226* (Builders/Yoast) Added compatibility with Yoast from v.17.3.
     227* (Core/Media) Translate post title in submit box.
     228
    223229= 2.8.3 =
    224230* (Core/JS) Added trigger handler `wpglobus_post_title`.
  • wpglobus/trunk/wpglobus.php

    r2605532 r2614698  
    1616 * Text Domain: wpglobus
    1717 * Domain Path: /languages/
    18  * Version: 2.8.3
     18 * Version: 2.8.4
    1919 * Author: WPGlobus
    2020 * Author URI: https://wpglobus.com/
     
    4545}
    4646
    47 define( 'WPGLOBUS_VERSION', '2.8.3' );
     47define( 'WPGLOBUS_VERSION', '2.8.4' );
    4848define( 'WPGLOBUS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
    4949define( 'WPGLOBUS_AJAX', 'wpglobus-ajax' );
Note: See TracChangeset for help on using the changeset viewer.