PluginProbe
Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder / 1.4.2
Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder v1.4.2
3.6.0 3.5.0 trunk 1.0.10 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.6.1 1.0.7 1.0.8 1.0.9 1.1 1.1.1 1.2 1.3 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.5 1.5.1 All 110 releases
buttonizer-multifunctional-button / freemius / templates / sticky-admin-notice-js.php

sticky-admin-notice-js.php in Buttonizer – Floating Menus, Sticky Buttons, & Popup Builder 1.4.2, at freemius/templates/sticky-admin-notice-js.php

39 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 message_id: id
28 };
29
30 // since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
31 $.post( ajaxurl, data, function( response ) {
32
33 });
34
35 notice.remove();
36 });
37 });
38 });
39 </script>