Plugin Directory

Changeset 2200589


Ignore:
Timestamp:
11/25/2019 02:27:36 PM (5 years ago)
Author:
dcgws
Message:

tagging version 1.8,6

Location:
hreflang-tags-by-dcgws
Files:
49 added
4 edited

Legend:

Unmodified
Added
Removed
  • hreflang-tags-by-dcgws/trunk/hreflang-init.php

    r2190574 r2200589  
    5555$notices = HREFLangTags_Admin_Notices::get_instance();
    5656$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' );
     57if ($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' );
    5959}
    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  
    44Plugin URI: https://wordpress.org/plugins/hreflang-tags-by-dcgws/
    55Description: Smart implementation of HREFLANG meta tags into the head section of your WordPress site.
    6 Version: 1.8.5
     6Version: 1.8.6
    77Author: DCGWS Internet Solutions
    88Author URI: http://dcgws.com
     
    3232
    3333if (! defined('HREFLANG_VERSION'))
    34     define('HREFLANG_VERSION', '1.8.5');
     34    define('HREFLANG_VERSION', '1.8.6');
    3535
    3636if (! defined('HREFLANG_PLUGIN_FILE'))
  • hreflang-tags-by-dcgws/trunk/includes/functions.php

    r2122545 r2200589  
    11<?php
    22/**
    3  * 
     3 *
    44 *  @package HREFLANG Tags Pro\Includes\Functions
    55 *  @since 1.3.3
    6  * 
     6 *
    77 */
    88
     
    1616
    1717    function hreflang_array_sort($array, $on, $order=SORT_ASC){
    18    
     18
    1919        $new_array = array();
    2020        $sortable_array = array();
    21    
     21
    2222        if (count($array) > 0) {
    2323            foreach ($array as $k => $v) {
     
    3232                }
    3333            }
    34    
     34
    3535            switch ($order) {
    3636                case SORT_ASC:
     
    4141                    break;
    4242            }
    43    
     43
    4444            foreach ($sortable_array as $k => $v) {
    4545                $new_array[$k] = $array[$k];
    4646            }
    4747        }
    48    
     48
    4949        return $new_array;
    5050    }
     
    6262
    6363function hreflang_register_settings() {
    64     register_setting( 'hreflang-settings-group', 'hreflang_post_types'); 
    65 } 
     64    register_setting( 'hreflang-settings-group', 'hreflang_post_types');
     65}
    6666
    6767function hreflang_admin_bar() {
     
    102102    function add_hreflang_to_head() {
    103103        global $post;
    104         if (is_category() || is_tax() || is_tag()):
     104        if (is_category() || is_tax() || is_tag()) {
    105105            $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 {
    130131            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";
    141150                                }
    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";
    167176                                }
    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        }
    184185    }
    185186}
     
    229230        echo '.hreflang_pro-metabox-buy-pro a { text-decoration:none; }';
    230231        echo 'span.hreflang_pro-buy-pro {color: #ff6600; text-decoration:none;}';
    231        
     232
    232233        echo '</style>';
    233234        echo '<div class="hreflang_pro-metabox-buy-pro">
     
    281282                            if ($lang == $href_lang) {
    282283                                 echo ' selected="selected"';
    283                             } 
     284                            }
    284285                            echo '>'.$lang_array['english_name'].'</option>';
    285286                        }
     
    301302}
    302303function 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) {
    304305        add_meta_box('hreflang-meta-box','HREFLANG Tags','hreflang_meta_box',$hreflang_post_type, 'advanced', 'high', null);
    305306    }
     
    411412            $hreflang_data = get_term_meta($term_id);
    412413            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')) {
    415416                        $key_array = explode('-',$key);
    416417                        if (count($key_array) == 3) {
     
    421422                        }
    422423                        delete_term_meta($term_id, 'hreflang-'.$lang);
    423                     endif;
    424                 endforeach;
     424                    }
     425                }
    425426            }
    426427            foreach($_POST['hreflang-href'] as $href) {
  • hreflang-tags-by-dcgws/trunk/readme.txt

    r2190574 r2200589  
    44Tags: hreflang, localization, metatags, seo, google, metabox, meta
    55Requires at least: 4.4.0
    6 Tested up to: 5.2.3
    7 Stable tag: 1.8.5
     6Tested up to: 5.3.0
     7Stable tag: 1.8.6
    88License: GPLv2 or later
    99== Description ==
     
    109109
    110110== Changelog ==
     111= 1.8.6 =
     112* Improvements
     113    * Codebase improvements
     114    * Updated Tested version
    111115
    112116= 1.8.5 =
Note: See TracChangeset for help on using the changeset viewer.