Changeset 2614698
- Timestamp:
- 10/15/2021 11:58:25 AM (4 years ago)
- Location:
- wpglobus/trunk
- Files:
-
- 1 added
- 7 edited
-
includes/builders/class-wpglobus-builders.php (modified) (8 diffs)
-
includes/builders/yoast_seo/addon-yoast_seo.php (added)
-
includes/class-wpglobus-widget.php (modified) (2 diffs)
-
includes/js/wpglobus-media.js (modified) (2 diffs)
-
includes/js/wpglobus-media.min.js (modified) (1 diff)
-
includes/vendor/yoast-seo/class-wpglobus-yoastseo140.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
-
wpglobus.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wpglobus/trunk/includes/builders/class-wpglobus-builders.php
r2334512 r2614698 99 99 ); 100 100 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 117 101 /** 102 * Yoast SEO add-ons. 118 103 * @since 2.3.11 104 * @since 2.8.4 Moved to separate file. 119 105 */ 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 */ 146 114 self::$add_on['woocommerce'] = array( 147 115 'id' => 'woocommerce', … … 1255 1223 if ( defined( 'WPSEO_VERSION' ) ) { 1256 1224 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 1257 1242 /** @global string $pagenow */ 1258 1243 global $pagenow; … … 1278 1263 1279 1264 $_attrs = array( 1280 'id' => 'yoast_seo',1281 'version' => WPSEO_VERSION,1265 'id' => $id, 1266 'version' => $version, 1282 1267 'class' => 'WPGlobus_Yoast_SEO', 1283 1268 'builder_page' => false, … … 1309 1294 return $attrs; 1310 1295 1311 } else if ( 'term.php' === $pagenow ) {1296 } else if ( 'term.php' === $pagenow ) { 1312 1297 1313 1298 $tax = empty( $_GET['taxonomy'] ) ? false : sanitize_text_field( wp_unslash( $_GET['taxonomy'] ) ); // phpcs:ignore WordPress.CSRF.NonceVerification … … 1316 1301 1317 1302 $_attrs = array( 1318 'id' => 'yoast_seo',1319 'version' => WPSEO_VERSION,1303 'id' => $id, 1304 'version' => $version, 1320 1305 'class' => 'WPGlobus_Yoast_SEO', 1321 1306 'builder_page' => false, … … 1339 1324 return $attrs; 1340 1325 } 1341 } else if ( 'edit-tags.php' === $pagenow ) {1326 } else if ( 'edit-tags.php' === $pagenow ) { 1342 1327 /** 1343 1328 * Case when Update button was clicked on term.php page . … … 1349 1334 1350 1335 $_attrs = array( 1351 'id' => 'yoast_seo',1352 'version' => WPSEO_VERSION,1336 'id' => $id, 1337 'version' => $version, 1353 1338 'class' => 'WPGlobus_Yoast_SEO', 1354 1339 'builder_page' => false, … … 1374 1359 1375 1360 return false; 1376 1377 1361 } 1378 1362 -
wpglobus/trunk/includes/class-wpglobus-widget.php
r2363945 r2614698 47 47 public function widget( $args, $instance ) { 48 48 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'; 54 55 55 56 $inside = ''; … … 152 153 $flag_classes = array(); 153 154 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 154 162 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. 157 165 } 158 166 foreach ( $enabled_languages as $language ) : -
wpglobus/trunk/includes/js/wpglobus-media.js
r1567245 r2614698 33 33 api.iniSet(); 34 34 api.setContent(); 35 api.translate(); 35 36 api.attachListeners(); 36 37 }, … … 53 54 $('#'+id).val( WPGlobusCore.TextFilter( api.content[id], WPGlobusMedia.language, 'RETURN_EMPTY' ) ); 54 55 }); 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 } 55 66 } 56 67 }, -
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 708 708 * @since 2.8.1 709 709 */ 710 if ( empty( $meta_cache['_yoast_wpseo_ focuskw'][0] ) ) {710 if ( empty( $meta_cache['_yoast_wpseo_title'][0] ) ) { 711 711 $__title = self::get_option( 'wpseo_titles', 'title-' . $presentation->model->object_sub_type ); 712 712 if ( ! is_null($__title) ) { -
wpglobus/trunk/readme.txt
r2605532 r2614698 221 221 == Changelog == 222 222 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 223 229 = 2.8.3 = 224 230 * (Core/JS) Added trigger handler `wpglobus_post_title`. -
wpglobus/trunk/wpglobus.php
r2605532 r2614698 16 16 * Text Domain: wpglobus 17 17 * Domain Path: /languages/ 18 * Version: 2.8. 318 * Version: 2.8.4 19 19 * Author: WPGlobus 20 20 * Author URI: https://wpglobus.com/ … … 45 45 } 46 46 47 define( 'WPGLOBUS_VERSION', '2.8. 3' );47 define( 'WPGLOBUS_VERSION', '2.8.4' ); 48 48 define( 'WPGLOBUS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); 49 49 define( 'WPGLOBUS_AJAX', 'wpglobus-ajax' );
Note: See TracChangeset
for help on using the changeset viewer.