Changeset 2200589
- Timestamp:
- 11/25/2019 02:27:36 PM (5 years ago)
- Location:
- hreflang-tags-by-dcgws
- Files:
-
- 49 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
hreflang-tags-by-dcgws/trunk/hreflang-init.php
r2190574 r2200589 55 55 $notices = HREFLangTags_Admin_Notices::get_instance(); 56 56 $date_now = date("Y-m-d"); 57 if ($date_now <= '2019-11- 30' && $date_now >= '2019-11-18') {58 $notices->info( ' Save 60% on ALL licenses now for Black Friday. Simply <b>GO</b> to our <a href="https://www.hreflangtags.com/pricing/">Pricing</a> page or our <a href="https://www.hreflangtags.com/lifetime-pricing/">Lifetime Pricing</a> page, <b>CHOOSE</b> which plan is best for you, <b>CLICK BUY NOW</b>, and enter the discount code <b>BLACKFRIDAY</b> during checkout. Simple.', 'all-licenses-60-dismissed' );57 if ($date_now <= '2019-11-27' && $date_now >= '2019-11-25') { 58 $notices->info( 'For the next 24 hours only and for our HREFLANG Tags Lite users only, Save 80% on our Developer license. Normally $49.99, now for the next 24 hrs <strong>ONLY $9.99</strong>. Do not miss out on this limited time offer. Includes our newly improved Bulk Editor. <a href="https://www.hreflangtags.com/checkout/?edd_action=add_to_cart&download_id=2077&edd_options%5Bprice_id%5D=4&discount=CRAZY80#utm_source=plugin-page&utm_medium=notice&utm_campaign=crazy-80-discount">Click Here</a> to download our Premium version right now. Use the discount code CRAZY80!', 'crazy-80-dismissed' ); 59 59 } 60 else if ($date_now <= '2020-01-01' && $date_now >= '2019-11-10') {61 $notices->info( 'Now with <b>UNLIMITED</b> language/region combinations!<br>Save on ALL licenses for a limited time only. Simply <b>GO</b> to our <a href="https://www.hreflangtags.com/pricing/">Pricing</a> page or our <a href="https://www.hreflangtags.com/lifetime-pricing/">Lifetime Pricing</a> page, <b>CHOOSE</b> which plan is best for you, <b>CLICK BUY NOW</b>, and enter any of the following discount codes <b>STANDARD5</b> for 5% Off Standard Plan, <b>PRO10</b> for 10% Off Pro Plan, <b>ELITE20</b> for 20% Off Elite Plan & <b>DEVELOPER50</b> for 50% Off Developer Plan</b> during checkout. It\'s That Simple.', 'all-licenses-varies-plus-dismissed' );62 } -
hreflang-tags-by-dcgws/trunk/hreflang-tags-by-dcgws.php
r2190574 r2200589 4 4 Plugin URI: https://wordpress.org/plugins/hreflang-tags-by-dcgws/ 5 5 Description: Smart implementation of HREFLANG meta tags into the head section of your WordPress site. 6 Version: 1.8. 56 Version: 1.8.6 7 7 Author: DCGWS Internet Solutions 8 8 Author URI: http://dcgws.com … … 32 32 33 33 if (! defined('HREFLANG_VERSION')) 34 define('HREFLANG_VERSION', '1.8. 5');34 define('HREFLANG_VERSION', '1.8.6'); 35 35 36 36 if (! defined('HREFLANG_PLUGIN_FILE')) -
hreflang-tags-by-dcgws/trunk/includes/functions.php
r2122545 r2200589 1 1 <?php 2 2 /** 3 * 3 * 4 4 * @package HREFLANG Tags Pro\Includes\Functions 5 5 * @since 1.3.3 6 * 6 * 7 7 */ 8 8 … … 16 16 17 17 function hreflang_array_sort($array, $on, $order=SORT_ASC){ 18 18 19 19 $new_array = array(); 20 20 $sortable_array = array(); 21 21 22 22 if (count($array) > 0) { 23 23 foreach ($array as $k => $v) { … … 32 32 } 33 33 } 34 34 35 35 switch ($order) { 36 36 case SORT_ASC: … … 41 41 break; 42 42 } 43 43 44 44 foreach ($sortable_array as $k => $v) { 45 45 $new_array[$k] = $array[$k]; 46 46 } 47 47 } 48 48 49 49 return $new_array; 50 50 } … … 62 62 63 63 function hreflang_register_settings() { 64 register_setting( 'hreflang-settings-group', 'hreflang_post_types'); 65 } 64 register_setting( 'hreflang-settings-group', 'hreflang_post_types'); 65 } 66 66 67 67 function hreflang_admin_bar() { … … 102 102 function add_hreflang_to_head() { 103 103 global $post; 104 if (is_category() || is_tax() || is_tag()) :104 if (is_category() || is_tax() || is_tag()) { 105 105 $terms = get_queried_object(); 106 if ($terms): 107 $hreflang_data = get_term_meta($terms->term_id); 108 $metatag = '<!-- / HREFLANG Tags by DCGWS -->'."\n"; 109 if (!empty($hreflang_data)) { 110 foreach($hreflang_data as $key=>$value) { 111 if (stristr($key,'hreflang')) { 112 $key_array = explode('-',$key); 113 if (count($key_array) == 3) { 114 $lang = 'x-default'; 115 } 116 else { 117 $lang = $key_array[1]; 118 } 119 if ($lang == 'Select one') { 120 continue; 121 } 122 $metatag .= '<link rel="alternate" href="'.$value[0].'" hreflang="'.str_replace('_','-', $lang).'" />'."\n"; 123 } 124 } 125 $metatag .= '<!-- / HREFLANG Tags by DCGWS -->'."\n"; 126 echo $metatag; 127 } 128 endif; 129 else: 106 if ($terms) { 107 $hreflang_data = get_term_meta($terms->term_id); 108 $metatag = '<!-- / HREFLANG Tags by DCGWS -->'."\n"; 109 if (!empty($hreflang_data)) { 110 foreach($hreflang_data as $key=>$value) { 111 if (stristr($key,'hreflang')) { 112 $key_array = explode('-',$key); 113 if (count($key_array) == 3) { 114 $lang = 'x-default'; 115 } 116 else { 117 $lang = $key_array[1]; 118 } 119 if ($lang == 'Select one') { 120 continue; 121 } 122 $metatag .= '<link rel="alternate" href="'.$value[0].'" hreflang="'.str_replace('_','-', $lang).'" />'."\n"; 123 } 124 } 125 $metatag .= '<!-- / HREFLANG Tags by DCGWS -->'."\n"; 126 echo $metatag; 127 } 128 } 129 } 130 else { 130 131 if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) { 131 if (!is_home() && !is_author() && !is_tag() && !is_shop()): 132 if ($post) { 133 $hreflang_data = get_post_meta($post->ID); 134 $metatag = '<!-- / HREFLANG Tags by DCGWS -->'."\n"; 135 if (!empty($hreflang_data)) { 136 foreach($hreflang_data as $key=>$value) { 137 if (stristr($key,'hreflang')) { 138 $key_array = explode('-',$key); 139 if (count($key_array) == 3) { 140 $lang = 'x-default'; 132 if (!is_home() && !is_author() && !is_tag() && !is_shop()) { 133 if ($post) { 134 $hreflang_data = get_post_meta($post->ID); 135 $metatag = '<!-- / HREFLANG Tags by DCGWS -->'."\n"; 136 if (!empty($hreflang_data)) { 137 foreach($hreflang_data as $key=>$value) { 138 if (stristr($key,'hreflang')) { 139 $key_array = explode('-',$key); 140 if (count($key_array) == 3) { 141 $lang = 'x-default'; 142 } 143 else { 144 $lang = $key_array[1]; 145 } 146 if ($lang == 'Select one') { 147 continue; 148 } 149 $metatag .= '<link rel="alternate" href="'.$value[0].'" hreflang="'.str_replace('_','-', $lang).'" />'."\n"; 141 150 } 142 else {143 $lang = $key_array[1];144 }145 if ($lang == 'Select one') {146 continue;147 }148 $metatag .= '<link rel="alternate" href="'.$value[0].'" hreflang="'.str_replace('_','-', $lang).'" />'."\n";149 }150 }151 $ metatag .= '<!-- / HREFLANG Tags by DCGWS -->'."\n";152 echo $metatag;153 }154 }155 endif;156 } else {157 if (!is_home() && !is_author() && !is_tag()):158 if ($post) {159 $hreflang_data = get_post_meta($post->ID);160 $metatag = '<!-- / HREFLANG Tags by DCGWS -->'."\n";161 if (is_array($hreflang_data) && !empty($hreflang_data)) {162 foreach($hreflang_data as $key=>$value) {163 if (stristr($key,'hreflang')) {164 $key_array = explode('-',$key);165 if (count($key_array) == 3) {166 $ lang = 'x-default';151 } 152 $metatag .= '<!-- / HREFLANG Tags by DCGWS -->'."\n"; 153 echo $metatag; 154 } 155 } 156 } 157 } else { 158 if (!is_home() && !is_author() && !is_tag()) { 159 if ($post) { 160 $hreflang_data = get_post_meta($post->ID); 161 $metatag = '<!-- / HREFLANG Tags by DCGWS -->'."\n"; 162 if (is_array($hreflang_data) && !empty($hreflang_data)) { 163 foreach($hreflang_data as $key=>$value) { 164 if (stristr($key,'hreflang')) { 165 $key_array = explode('-',$key); 166 if (count($key_array) == 3) { 167 $lang = 'x-default'; 168 } 169 else { 170 $lang = $key_array[1]; 171 } 172 if ($lang == 'Select one') { 173 continue; 174 } 175 $metatag .= '<link rel="alternate" href="'.$value[0].'" hreflang="'.str_replace('_','-', $lang).'" />'."\n"; 167 176 } 168 else { 169 $lang = $key_array[1]; 170 } 171 if ($lang == 'Select one') { 172 continue; 173 } 174 $metatag .= '<link rel="alternate" href="'.$value[0].'" hreflang="'.str_replace('_','-', $lang).'" />'."\n"; 175 } 176 } 177 $metatag .= '<!-- / HREFLANG Tags by DCGWS -->'."\n"; 178 echo $metatag; 179 } 180 } 181 endif; 182 } 183 endif; 177 } 178 $metatag .= '<!-- / HREFLANG Tags by DCGWS -->'."\n"; 179 echo $metatag; 180 } 181 } 182 } 183 } 184 } 184 185 } 185 186 } … … 229 230 echo '.hreflang_pro-metabox-buy-pro a { text-decoration:none; }'; 230 231 echo 'span.hreflang_pro-buy-pro {color: #ff6600; text-decoration:none;}'; 231 232 232 233 echo '</style>'; 233 234 echo '<div class="hreflang_pro-metabox-buy-pro"> … … 281 282 if ($lang == $href_lang) { 282 283 echo ' selected="selected"'; 283 } 284 } 284 285 echo '>'.$lang_array['english_name'].'</option>'; 285 286 } … … 301 302 } 302 303 function add_hreflang_meta_box() { 303 foreach (get_option('hreflang_post_types') as $hreflang_post_type) { 304 foreach (get_option('hreflang_post_types') as $hreflang_post_type) { 304 305 add_meta_box('hreflang-meta-box','HREFLANG Tags','hreflang_meta_box',$hreflang_post_type, 'advanced', 'high', null); 305 306 } … … 411 412 $hreflang_data = get_term_meta($term_id); 412 413 if (is_array($hreflang_data) && !empty($hreflang_data)) { 413 foreach($hreflang_data as $key=>$value ) :414 if (stristr($key,'hreflang')) :414 foreach($hreflang_data as $key=>$value ) { 415 if (stristr($key,'hreflang')) { 415 416 $key_array = explode('-',$key); 416 417 if (count($key_array) == 3) { … … 421 422 } 422 423 delete_term_meta($term_id, 'hreflang-'.$lang); 423 endif;424 endforeach;424 } 425 } 425 426 } 426 427 foreach($_POST['hreflang-href'] as $href) { -
hreflang-tags-by-dcgws/trunk/readme.txt
r2190574 r2200589 4 4 Tags: hreflang, localization, metatags, seo, google, metabox, meta 5 5 Requires at least: 4.4.0 6 Tested up to: 5. 2.37 Stable tag: 1.8. 56 Tested up to: 5.3.0 7 Stable tag: 1.8.6 8 8 License: GPLv2 or later 9 9 == Description == … … 109 109 110 110 == Changelog == 111 = 1.8.6 = 112 * Improvements 113 * Codebase improvements 114 * Updated Tested version 111 115 112 116 = 1.8.5 =
Note: See TracChangeset
for help on using the changeset viewer.