Changeset 177435
- Timestamp:
- 10/11/2022 01:47:29 AM (3 years ago)
- Location:
- news-element/1.0.2
- Files:
-
- 4 edited
- 1 copied
- . (copied) (copied from news-element/1.0.1)
- inc/activation/class-welcome-notice.php (modified) (4 diffs)
- inc/activation/css/welcome-notice.css (modified) (3 diffs)
- inc/activation/js/welcome-notice.js (modified) (4 diffs)
- style.css (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
news-element/1.0.2/inc/activation/class-welcome-notice.php
r177116 r177435 29 29 30 30 // Install Plugins 31 add_action( 'wp_ajax_ tpt_install_active_elementor', [$this, 'install_activate_elementor'] );32 add_action( 'wp_ajax_nopriv_ tpt_install_active_elementor', [$this, 'install_activate_elementor'] );33 add_action( 'wp_ajax_ tpt_install_activate_news_element', [$this, 'install_activate_news_element_addon'] );34 add_action( 'wp_ajax_nopriv_ tpt_install_activate_news_element', [$this, 'install_activate_news_element_addon'] );35 36 add_action( 'wp_ajax_ tpt_prevent_elementor_redirect', [$this, 'tpt_prevent_elementor_redirect'] );37 } 38 39 public function tpt_prevent_elementor_redirect() {31 add_action( 'wp_ajax_news_element_install_active_elementor', [$this, 'install_activate_elementor'] ); 32 add_action( 'wp_ajax_nopriv_news_element_install_active_elementor', [$this, 'install_activate_elementor'] ); 33 add_action( 'wp_ajax_news_element_install_activate_addon', [$this, 'install_activate_news_element_addon'] ); 34 add_action( 'wp_ajax_nopriv_news_element_install_activate_addon', [$this, 'install_activate_news_element_addon'] ); 35 36 add_action( 'wp_ajax_news_element_prevent_elementor_redirect', [$this, 'news_element_prevent_elementor_redirect'] ); 37 } 38 39 public function news_element_prevent_elementor_redirect() { 40 40 exit; 41 41 } … … 287 287 if ( ! get_transient( $transient_name ) ) { 288 288 ?> 289 <div class=" tpt-notice notice notice-success is-dismissible" data-notice="<?php echo esc_attr( $transient_name ); ?>">289 <div class="news-element-notice notice notice-success is-dismissible" data-notice="<?php echo esc_attr( $transient_name ); ?>"> 290 290 <button type="button" class="notice-dismiss"></button> 291 291 … … 369 369 <script> 370 370 jQuery(function($) { 371 $( document ).on( 'click', '. tpt-notice .notice-dismiss', function () {371 $( document ).on( 'click', '.news-element-notice .notice-dismiss', function () { 372 372 jQuery.post( 'ajax_url', { 373 373 action: 'tpt_dismiss_handle', 374 notice: $( this ).closest( '. tpt-notice' ).data( 'notice' ),374 notice: $( this ).closest( '.news-element-notice' ).data( 'notice' ), 375 375 }); 376 $( '. tpt-notice' ).hide();376 $( '.news-element-notice' ).hide(); 377 377 } ); 378 378 }); … … 391 391 wp_enqueue_script( 'welcome-notic-js', get_template_directory_uri() . '/inc/activation/js/welcome-notice.js', ['jquery'], false, true ); 392 392 393 wp_localize_script( 'welcome-notic-js', ' tpt_localize', [393 wp_localize_script( 'welcome-notic-js', 'news_element_localize', [ 394 394 'ajax_url' => admin_url( 'admin-ajax.php' ), 395 395 'elementor_nonce' => wp_create_nonce( 'nonce' ), -
news-element/1.0.2/inc/activation/css/welcome-notice.css
r177012 r177435 1 . tpt-notice {1 .news-element-notice { 2 2 display: -webkit-box; 3 3 display: -ms-flexbox; … … 11 11 } 12 12 13 . tpt-notice .welcome-message {13 .news-element-notice .welcome-message { 14 14 max-width: 650px; 15 15 } 16 16 17 . tpt-notice .welcome-message h1 {17 .news-element-notice .welcome-message h1 { 18 18 font-size: 36px; 19 19 font-weight: 600; 20 20 } 21 21 22 . tpt-notice .welcome-message p {22 .news-element-notice .welcome-message p { 23 23 font-size: 14px; 24 24 } 25 25 26 . tpt-notice .welcome-message .action-buttons {26 .news-element-notice .welcome-message .action-buttons { 27 27 margin-top: 30px; 28 28 } 29 29 30 . tpt-notice .welcome-message .action-buttons a {30 .news-element-notice .welcome-message .action-buttons a { 31 31 padding: 7px 20px; 32 32 background-color: #6A4BFF; … … 34 34 } 35 35 36 . tpt-notice .welcome-message .action-buttons a:hover {36 .news-element-notice .welcome-message .action-buttons a:hover { 37 37 background-color: #583ed7; 38 38 } 39 39 40 . tpt-notice .welcome-message .action-buttons a .dashicons {40 .news-element-notice .welcome-message .action-buttons a .dashicons { 41 41 font-size: 12px; 42 42 line-height: 30px; 43 43 } 44 44 45 . tpt-notice .image-wrap {45 .news-element-notice .image-wrap { 46 46 text-align: right; 47 47 } 48 48 49 . tpt-notice .image-wrap img {49 .news-element-notice .image-wrap img { 50 50 display: inline-block; 51 51 } 52 52 53 53 @media screen and (max-width: 1366px) { 54 . tpt-notice .image-wrap img {54 .news-element-notice .image-wrap img { 55 55 max-width: 90%; 56 56 } 57 57 58 . tpt-notice .welcome-message p {58 .news-element-notice .welcome-message p { 59 59 font-size: 13px; 60 60 } -
news-element/1.0.2/inc/activation/js/welcome-notice.js
r177012 r177435 2 2 "use strict"; 3 3 4 $(document).on('click', '. tpt-notice .button-primary', function( e ) {4 $(document).on('click', '.news-element-notice .button-primary', function( e ) { 5 5 6 6 if ( 'install-activate' === $(this).data('action') && ! $( this ).hasClass('init') ) { 7 7 var $self = $(this), 8 8 $href = $self.attr('href'); 9 10 if ( 'true' === $self.data('freemius') ) {11 $href.replace('wpr-addons','wpr-templates-kit')12 }13 9 14 10 $self.addClass('init'); … … 17 13 18 14 var elementorData = { 19 'action' : ' tpt_install_active_elementor',20 'nonce' : tpt_localize.elementor_nonce15 'action' : 'news_element_install_active_elementor', 16 'nonce' : news_element_localize.elementor_nonce 21 17 }; 22 18 23 19 // Send Request. 24 $.post( tpt_localize.ajax_url, elementorData, function( response ) {20 $.post( news_element_localize.ajax_url, elementorData, function( response ) { 25 21 26 22 if ( response.success ) { … … 43 39 44 40 var ThePackData = { 45 'action' : ' tpt_install_activate_news_element',46 'nonce' : tpt_localize.news_element_addon_nonce41 'action' : 'news_element_install_activate_addon', 42 'nonce' : news_element_localize.news_element_addon_nonce 47 43 }; 48 44 49 $.post( tpt_localize.ajax_url, ThePackData, function( response ) {45 $.post( news_element_localize.ajax_url, ThePackData, function( response ) { 50 46 if ( response.success ) { 51 47 52 48 var elementorRedirect = { 53 'action' : ' tpt_prevent_elementor_redirect',49 'action' : 'news_element_prevent_elementor_redirect', 54 50 }; 55 51 56 $.post( tpt_localize.ajax_url, elementorRedirect, function( response ) {52 $.post( news_element_localize.ajax_url, elementorRedirect, function( response ) { 57 53 console.log('news element addon installed'); 58 54 … … 72 68 73 69 } ).fail( function( xhr, textStatus, e ) { 74 $(this).parent().after( `<div class="plugin-activation-warning">${ tpt_localize.failed_message}</div>` );70 $(this).parent().after( `<div class="plugin-activation-warning">${news_element_localize.failed_message}</div>` ); 75 71 } ); 76 72 -
news-element/1.0.2/style.css
r177116 r177435 5 5 Author URI: https://webangon.com 6 6 Description: News Element for elementor page builder. It has header footer builder,mega menu and template library and 110+ custom widgets to create any sites.This theme gives you access to 270+ pre-made sections,30+ pages,22 header & footer. 7 Version: 1.0. 17 Version: 1.0.2 8 8 Requires at least: 4.7 9 9 Requires PHP: 5.2 … … 12 12 License URI: https://www.gnu.org/licenses/gpl-3.0.html 13 13 Text Domain: the-pack-element 14 Tags: blog, e-commerce,one-column, custom-background, custom-colors, full-width-template, custom-menu, custom-logo, featured-images, sticky-post, theme-options, threaded-comments, translation-ready14 Tags: blog, one-column, custom-background, custom-colors, full-width-template, custom-menu, custom-logo, featured-images, sticky-post, theme-options, threaded-comments, translation-ready 15 15 */ 16 16 … … 124 124 text-decoration: underline dotted; 125 125 } 126 126 .site-title a:hover, 127 .site-title a:focus { 128 text-decoration: underline; 129 } 127 130 b, 128 131 strong { … … 662 665 } 663 666 664 .menu-all-pages-container li:hover>.sub-menu {667 .menu-all-pages-container li:hover>.sub-menu,.menu-all-pages-container li:focus-within>.sub-menu { 665 668 margin-top: 0px; 666 669 opacity: 1;
Note: See TracChangeset for help on using the changeset viewer.