Plugin Directory

Changeset 3133033


Ignore:
Timestamp:
08/09/2024 06:44:08 AM (20 months ago)
Author:
gnpublisher
Message:

Released version 1.5.16

Location:
gn-publisher/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • gn-publisher/trunk/assets/css/gn-admin.css

    r3014271 r3133033  
    451451  top: -2px;
    452452}
     453.gnpub-show{
     454    display: block;
     455}
  • gn-publisher/trunk/assets/js/gn-admin.js

    r3014271 r3133033  
    5353    document.getElementById(tabName).style.display = "block";
    5454    evt.currentTarget.className += " active";
     55   
     56    /**
     57     * Set tab param to current url
     58     * @since 1.5.16
     59     * */
     60    var url = new URL(window.location.href);
     61    url.searchParams.set('tab', tabName);
     62    window.history.replaceState(null, null, url.toString());
     63
    5564  }
    5665 
    5766  // Get the element with id="defaultOpen" and click on it
    58   document.getElementById("defaultOpen").click();
     67  //document.getElementById("defaultOpen").click();
    5968  jQuery('.gn-publisher-pro-btn').click(function(){
    6069    jQuery('.gn-tablinks.gn-license-btn').addClass('active');
     
    8089      }     
    8190    });
    82 
    83     //for active the pro tab on first time
    84     if($('.gnpub-upgrade').length > 0){
    85       let findWelcomeClass =  $('.gnpub-upgrade').attr('class');
    86       if(findWelcomeClass.indexOf('welcome') !== -1){
    87         $('.gn-tabcontent').hide('active');
    88         $('.gn-tablinks').removeClass('active');
    89         $('.gn-tablinks.gnpub-upgrade').addClass('active')
    90         $('.gnpub-upgrade').addClass('active');
    91         $('.gnpub-upgrade').removeClass('welcome');
    92         $('#gn-upgrade').show();
    93       }
    94     }
    95 
    9691
    9792    var btn_click=false;
  • gn-publisher/trunk/gn-publisher.php

    r3100525 r3133033  
    88 * Plugin URI: https://gnpublisher.com/
    99 * Description: GN Publisher: The easy way to make Google News Publisher compatible RSS feeds.
    10  * Version: 1.5.15
     10 * Version: 1.5.16
    1111 * Author: Chris Andrews
    1212 * Author URI: https://gnpublisher.com/
     
    4141    }
    4242 
    43     define( 'GNPUB_VERSION', '1.5.15' );
     43    define( 'GNPUB_VERSION', '1.5.16' );
    4444    define( 'GNPUB_PATH', plugin_dir_path( __FILE__ ) );
    4545    define( 'GNPUB_URL', plugins_url( '', __FILE__) );
  • gn-publisher/trunk/readme.txt

    r3100525 r3133033  
    33Tags: google news, news, rss, feed, feeds
    44Requires at least: 3.5
    5 Tested up to: 6.5
     5Tested up to: 6.6
    66Requires PHP: 5.4
    7 Stable tag: 1.5.15
     7Stable tag: 1.5.16
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    9090== Changelog ==
    9191
     92= 1.5.16 - (09 August 2024) =
     93
     94* Fixed : Reload issue on tab click #96
     95* Fixed : PHP fatal error on feed #98
     96* Tested with WordPress v6.6 and updated readme.txt #99
     97
    9298= 1.5.15 - (10 June 2024) =
    9399
  • gn-publisher/trunk/templates/settings.php

    r3037836 r3133033  
    33if ( ! defined( 'ABSPATH' ) ) {
    44  exit;
     5}
     6
     7$tab  = 'gn-intro';
     8if( !empty( $_GET['tab'] ) ) {
     9  $tab  = sanitize_text_field( wp_unslash( $_GET['tab'] ) );
    510}
    611
     
    2833?>
    2934  <div class="gn-tab">
    30   <button class="gn-tablinks" onclick="openTab(event, 'gn-intro')" id="defaultOpen"><?php echo esc_html__('Dashboard', 'gn-publisher') ?></button>
    31   <button class="gn-tablinks" onclick="openTab(event, 'gn-google-feed')" id="gn-feed"><?php echo esc_html__('Google News Feed Setup', 'gn-publisher') ?></button>
    32   <button class="gn-tablinks" onclick="openTab(event, 'gn-features')"><?php echo esc_html__('Features', 'gn-publisher') ?></button>
    33   <button class="gn-tablinks" onclick="openTab(event, 'gn-compatibility')"><?php echo esc_html__('Compatibility', 'gn-publisher') ?></button>
    34   <button class="gn-tablinks" onclick="openTab(event, 'gn-troubleshooting')"><?php echo esc_html__('Troubleshooting', 'gn-publisher') ?></button>
    35   <button class="gn-tablinks" onclick="openTab(event, 'gn-services')"><?php echo esc_html__('Services', 'gn-publisher') ?></button>
     35  <button class="gn-tablinks <?php echo esc_attr( $tab == 'gn-intro' ? 'active' : ''); ?>" onclick="openTab(event, 'gn-intro')" id="defaultOpen" data-link-id="gn-intro"><?php echo esc_html__('Dashboard', 'gn-publisher') ?></button>
     36  <button class="gn-tablinks <?php echo esc_attr( $tab == 'gn-google-feed' ? 'active' : ''); ?>" onclick="openTab(event, 'gn-google-feed')" id="gn-feed" data-link-id="gn-google-feed"><?php echo esc_html__('Google News Feed Setup', 'gn-publisher') ?></button>
     37  <button class="gn-tablinks <?php echo esc_attr( $tab == 'gn-features' ? 'active' : ''); ?>" onclick="openTab(event, 'gn-features')" data-link-id="gn-features"><?php echo esc_html__('Features', 'gn-publisher') ?></button>
     38  <button class="gn-tablinks <?php echo esc_attr( $tab == 'gn-compatibility' ? 'active' : ''); ?>" onclick="openTab(event, 'gn-compatibility')" data-link-id="gn-compatibility"><?php echo esc_html__('Compatibility', 'gn-publisher') ?></button>
     39  <button class="gn-tablinks <?php echo esc_attr( $tab == 'gn-troubleshooting' ? 'active' : ''); ?>" onclick="openTab(event, 'gn-troubleshooting')" data-link-id="gn-troubleshooting"><?php echo esc_html__('Troubleshooting', 'gn-publisher') ?></button>
     40  <button class="gn-tablinks <?php echo esc_attr( $tab == 'gn-services' ? 'active' : ''); ?>" onclick="openTab(event, 'gn-services')" data-link-id="gn-services"><?php echo esc_html__('Services', 'gn-publisher') ?></button>
    3641  <?php if(defined('GNPUB_PRO_VERSION')){ ?>
    37     <button class="gn-tablinks gn-license-btn" onclick="openTab(event, 'gn-license')"><?php echo esc_html__('License', 'gn-publisher') ?> <?php
     42    <button class="gn-tablinks gn-license-btn <?php echo esc_attr( $tab == 'gn-license' ? 'active' : ''); ?>" onclick="openTab(event, 'gn-license')" data-link-id="gn-license"><?php echo esc_html__('License', 'gn-publisher') ?> <?php
    3843    if($license_key_status != 'active'){
    3944    echo '<span style="color: red;">!</span>';
     
    4247  </button>
    4348  <?php } else { ?>
    44     <button class="gn-tablinks gnpub-upgrade <?php echo isset($_GET['tab']) ? esc_attr($_GET['tab']) : ''; ?>" onclick="openTab(event, 'gn-upgrade')"><?php echo esc_html__('Upgrade to PRO', 'gn-publisher') ?></button>
     49    <button class="gn-tablinks gnpub-upgrade <?php echo esc_attr( $tab == 'gn-upgrade' || $tab == 'welcome' ? $tab.' active' : ''); ?>" onclick="openTab(event, 'gn-upgrade')" data-link-id="gn-upgrade"><?php echo esc_html__('Upgrade to PRO', 'gn-publisher') ?></button>
    4550    <!-- <button class="gn-tablinks gnpub-upgrade"><a target="_blank" href="https://gnpublisher.com/pricing/#pricing">Upgrade to PRO</a></button> -->
    4651    <?php } ?>
    47     <button class="gn-tablinks" onclick="openTab(event, 'gn-help')"><?php echo esc_html__('Help &amp; Support', 'gn-publisher') ?></button>
    48 </div>
    49 
    50 <div id="gn-intro" class="gn-tabcontent">
     52    <button class="gn-tablinks <?php echo esc_attr( $tab == 'gn-help' ? 'active' : ''); ?>" onclick="openTab(event, 'gn-help')" data-link-id="gn-help"><?php echo esc_html__('Help &amp; Support', 'gn-publisher') ?></button>
     53</div>
     54
     55<div id="gn-intro" class="gn-tabcontent <?php echo esc_attr( $tab == 'gn-intro' ? 'gnpub-show' : 'gnpub-d-none'); ?>">
    5156   
    5257  <p><?php
     
    7883</div>
    7984
    80 <div id="gn-google-feed" class="gn-tabcontent">
     85<div id="gn-google-feed" class="gn-tabcontent <?php echo esc_attr( $tab == 'gn-google-feed' ? 'gnpub-show' : 'gnpub-d-none'); ?>">
    8186   
    8287   <p><?php esc_html_e( 'Once installed and activated, you can find your GN Publisher RSS feeds at:', 'gn-publisher' ); ?></p>
     
    159164
    160165
    161 <div id="gn-troubleshooting" class="gn-tabcontent">
     166<div id="gn-troubleshooting" class="gn-tabcontent <?php echo esc_attr( $tab == 'gn-troubleshooting' ? 'gnpub-show' : 'gnpub-d-none'); ?>">
    162167
    163168<div class="gn-menu">
     
    283288</div>
    284289
    285 <div id="gn-help" class="gn-tabcontent">
     290<div id="gn-help" class="gn-tabcontent <?php echo esc_attr( $tab == 'gn-help' ? 'gnpub-show' : 'gnpub-d-none'); ?>">
    286291<div class="gn-flex-container">
    287292<div class="gn-left-side">
     
    334339</div>
    335340
    336 <div id="gn-services" class="gn-tabcontent">
     341<div id="gn-services" class="gn-tabcontent <?php echo esc_attr( $tab == 'gn-services' ? 'gnpub-show' : 'gnpub-d-none'); ?>">
    337342
    338343<div class="gn-flex-container-services">
     
    381386
    382387?>
    383 <div id="gn-features" class="gn-tabcontent">
     388<div id="gn-features" class="gn-tabcontent <?php echo esc_attr( $tab == 'gn-features' ? 'gnpub-show' : 'gnpub-d-none'); ?>">
    384389
    385390        <p>
     
    448453 
    449454  </div>
    450   <div id="gn-compatibility" class="gn-tabcontent">
     455  <div id="gn-compatibility" class="gn-tabcontent <?php echo esc_attr( $tab == 'gn-compatibility' ? 'gnpub-show' : 'gnpub-d-none'); ?>">
    451456<?php if(!defined('GNPUB_PRO_VERSION')){ ?>
    452457  <?php
     
    503508
    504509  </div>
    505   <div id="gn-upgrade" class="gn-tabcontent" style="text-align: center;">
     510  <div id="gn-upgrade" class="gn-tabcontent <?php echo esc_attr( $tab == 'gn-upgrade' || $tab == 'welcome' ? 'gnpub-show' : 'gnpub-d-none'); ?>" style="text-align: center;">
    506511<?php if(!defined('GNPUB_PRO_VERSION')){ ?>
    507512  <p style="font-weight: bold;font-size: 30px;color: #000;"><?= esc_html_e( 'Thank You for using GN Publisher.', 'gn-publisher' ) ?></p>
     
    522527
    523528  </div>
    524 <div id="gn-license" class="gn-tabcontent">
     529<div id="gn-license" class="gn-tabcontent <?php echo esc_attr( $tab == 'gn-license' ? 'gnpub-show' : 'gnpub-d-none'); ?>">
    525530<?php if(defined('GNPUB_PRO_VERSION')){
    526531   do_action('gnpub_pro_license_form');
  • gn-publisher/trunk/utilities.php

    r3000549 r3133033  
    166166 */
    167167function gnpub_feed_channel_link() {
    168     $url = esc_url( apply_filters( 'self_link', get_self_link() ) );
    169     $host_url = @parse_url($url);
    170 
    171     if(isset($host_url['query']))
    172     {
    173         $host_url['query']="";
    174     }
    175 
    176     if(isset($host_url['path']))
    177     {
    178         $path_check=explode('/feed/',$host_url['path']);
    179        
    180 
    181             $tmp_arr=explode('/',$path_check[0]);
    182             foreach($tmp_arr as $key=>$single)
    183             {
    184                 $tmp_arr[$key]=strtolower(urlencode(urldecode($single)));
    185             }
    186             $host_url['path']=implode('/',$tmp_arr);   
    187        
    188 
    189     }
    190 
    191    
    192 
    193     echo set_url_scheme($host_url['scheme'].'://'.$host_url['host'].$host_url['path']);
     168    if(  ! function_exists ( 'get_self_link' ) ) {
     169        require_once( ABSPATH . 'wp-includes/feed.php' );
     170    }
     171
     172    $url = ''; $host_url = array();
     173    if( function_exists( 'get_self_link' ) ) {
     174        $url = esc_url( apply_filters( 'self_link', get_self_link() ) );
     175        $host_url = @parse_url( $url );
     176    }
     177
     178    if( isset( $host_url['query'] ) ){
     179        $host_url['query']  =   "";
     180    }
     181
     182    if( isset( $host_url['path'] ) ){
     183        $path_check     =   explode( '/feed/', $host_url['path'] );
     184
     185        $tmp_arr        =   explode( '/', $path_check[0] );
     186        foreach( $tmp_arr as $key => $single ) {
     187            $tmp_arr[ $key ]    =   strtolower( urlencode( urldecode( $single ) ) );
     188        }
     189        $host_url['path']       =   implode( '/', $tmp_arr );   
     190    }
     191
     192    echo set_url_scheme( $host_url['scheme'].'://'.$host_url['host'].$host_url['path'] );
    194193
    195194}
Note: See TracChangeset for help on using the changeset viewer.