Changeset 3133033
- Timestamp:
- 08/09/2024 06:44:08 AM (20 months ago)
- Location:
- gn-publisher/trunk
- Files:
-
- 6 edited
-
assets/css/gn-admin.css (modified) (1 diff)
-
assets/js/gn-admin.js (modified) (2 diffs)
-
gn-publisher.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
templates/settings.php (modified) (11 diffs)
-
utilities.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
gn-publisher/trunk/assets/css/gn-admin.css
r3014271 r3133033 451 451 top: -2px; 452 452 } 453 .gnpub-show{ 454 display: block; 455 } -
gn-publisher/trunk/assets/js/gn-admin.js
r3014271 r3133033 53 53 document.getElementById(tabName).style.display = "block"; 54 54 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 55 64 } 56 65 57 66 // Get the element with id="defaultOpen" and click on it 58 document.getElementById("defaultOpen").click();67 //document.getElementById("defaultOpen").click(); 59 68 jQuery('.gn-publisher-pro-btn').click(function(){ 60 69 jQuery('.gn-tablinks.gn-license-btn').addClass('active'); … … 80 89 } 81 90 }); 82 83 //for active the pro tab on first time84 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 96 91 97 92 var btn_click=false; -
gn-publisher/trunk/gn-publisher.php
r3100525 r3133033 8 8 * Plugin URI: https://gnpublisher.com/ 9 9 * Description: GN Publisher: The easy way to make Google News Publisher compatible RSS feeds. 10 * Version: 1.5.1 510 * Version: 1.5.16 11 11 * Author: Chris Andrews 12 12 * Author URI: https://gnpublisher.com/ … … 41 41 } 42 42 43 define( 'GNPUB_VERSION', '1.5.1 5' );43 define( 'GNPUB_VERSION', '1.5.16' ); 44 44 define( 'GNPUB_PATH', plugin_dir_path( __FILE__ ) ); 45 45 define( 'GNPUB_URL', plugins_url( '', __FILE__) ); -
gn-publisher/trunk/readme.txt
r3100525 r3133033 3 3 Tags: google news, news, rss, feed, feeds 4 4 Requires at least: 3.5 5 Tested up to: 6. 55 Tested up to: 6.6 6 6 Requires PHP: 5.4 7 Stable tag: 1.5.1 57 Stable tag: 1.5.16 8 8 License: GPLv3 9 9 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 90 90 == Changelog == 91 91 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 92 98 = 1.5.15 - (10 June 2024) = 93 99 -
gn-publisher/trunk/templates/settings.php
r3037836 r3133033 3 3 if ( ! defined( 'ABSPATH' ) ) { 4 4 exit; 5 } 6 7 $tab = 'gn-intro'; 8 if( !empty( $_GET['tab'] ) ) { 9 $tab = sanitize_text_field( wp_unslash( $_GET['tab'] ) ); 5 10 } 6 11 … … 28 33 ?> 29 34 <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> 36 41 <?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') ?> <?php42 <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 38 43 if($license_key_status != 'active'){ 39 44 echo '<span style="color: red;">!</span>'; … … 42 47 </button> 43 48 <?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> 45 50 <!-- <button class="gn-tablinks gnpub-upgrade"><a target="_blank" href="https://gnpublisher.com/pricing/#pricing">Upgrade to PRO</a></button> --> 46 51 <?php } ?> 47 <button class="gn-tablinks " onclick="openTab(event, 'gn-help')"><?php echo esc_html__('Help & 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 & 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'); ?>"> 51 56 52 57 <p><?php … … 78 83 </div> 79 84 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'); ?>"> 81 86 82 87 <p><?php esc_html_e( 'Once installed and activated, you can find your GN Publisher RSS feeds at:', 'gn-publisher' ); ?></p> … … 159 164 160 165 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'); ?>"> 162 167 163 168 <div class="gn-menu"> … … 283 288 </div> 284 289 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'); ?>"> 286 291 <div class="gn-flex-container"> 287 292 <div class="gn-left-side"> … … 334 339 </div> 335 340 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'); ?>"> 337 342 338 343 <div class="gn-flex-container-services"> … … 381 386 382 387 ?> 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'); ?>"> 384 389 385 390 <p> … … 448 453 449 454 </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'); ?>"> 451 456 <?php if(!defined('GNPUB_PRO_VERSION')){ ?> 452 457 <?php … … 503 508 504 509 </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;"> 506 511 <?php if(!defined('GNPUB_PRO_VERSION')){ ?> 507 512 <p style="font-weight: bold;font-size: 30px;color: #000;"><?= esc_html_e( 'Thank You for using GN Publisher.', 'gn-publisher' ) ?></p> … … 522 527 523 528 </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'); ?>"> 525 530 <?php if(defined('GNPUB_PRO_VERSION')){ 526 531 do_action('gnpub_pro_license_form'); -
gn-publisher/trunk/utilities.php
r3000549 r3133033 166 166 */ 167 167 function 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'] ); 194 193 195 194 }
Note: See TracChangeset
for help on using the changeset viewer.