PluginProbe ʕ •ᴥ•ʔ
Code Manager / 1.0.35
Code Manager v1.0.35
1.0.48 1.0.47 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.17 1.0.18 1.0.19 1.0.2 1.0.20 1.0.21 1.0.22 1.0.23 1.0.24 1.0.25 1.0.26 1.0.27 1.0.28 1.0.3 1.0.30 1.0.31 1.0.32 1.0.33 1.0.34 1.0.35 1.0.36 1.0.37 1.0.38 1.0.39 1.0.4 1.0.40 1.0.41 1.0.42 1.0.43 1.0.44 1.0.45 1.0.46 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9
code-manager / freemius / templates / sticky-admin-notice-js.php
code-manager / freemius / templates Last commit date
account 2 years ago connect 2 years ago debug 2 years ago forms 2 years ago js 2 years ago partials 2 years ago plugin-info 2 years ago account.php 2 years ago add-ons.php 2 years ago add-trial-to-pricing.php 2 years ago admin-notice.php 2 years ago ajax-loader.php 2 years ago api-connectivity-message-js.php 2 years ago auto-installation.php 2 years ago checkout.php 2 years ago clone-resolution-js.php 2 years ago connect.php 2 years ago contact.php 2 years ago debug.php 2 years ago email.php 2 years ago gdpr-optin-js.php 2 years ago index.php 2 years ago plugin-icon.php 2 years ago powered-by.php 2 years ago pricing.php 2 years ago secure-https-header.php 2 years ago sticky-admin-notice-js.php 2 years ago tabs-capture-js.php 2 years ago tabs.php 2 years ago
sticky-admin-notice-js.php
41 lines
1 <?php
2 /**
3 * Sticky admin notices JavaScript handler for dismissing notice messages
4 * by sending AJAX call to the server in order to remove the message from the Database.
5 *
6 * @package Freemius
7 * @copyright Copyright (c) 2015, Freemius, Inc.
8 * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
9 * @since 1.0.7
10 */
11
12 if ( ! defined( 'ABSPATH' ) ) {
13 exit;
14 }
15 ?>
16 <script type="text/javascript" >
17 jQuery( document ).ready(function( $ ) {
18 $( '.fs-notice.fs-sticky .fs-close' ).click(function() {
19 var
20 notice = $( this ).parents( '.fs-notice' ),
21 id = notice.attr( 'data-id' ),
22 ajaxActionSuffix = notice.attr( 'data-manager-id' ).replace( ':', '-' );
23
24 notice.fadeOut( 'fast', function() {
25 var data = {
26 action : 'fs_dismiss_notice_action_' + ajaxActionSuffix,
27 // As such we don't need to use `wp_json_encode` method but using it to follow wp.org guideline.
28 _wpnonce : <?php echo wp_json_encode( wp_create_nonce( 'fs_dismiss_notice_action' ) ); ?>,
29 message_id: id
30 };
31
32 $.post( <?php echo Freemius::ajax_url() ?>, data, function( response ) {
33
34 });
35
36 notice.remove();
37 });
38 });
39 });
40 </script>
41