PluginProbe
Auto Post Cleaner / 3.3.10
Auto Post Cleaner v3.3.10
3.14.0 3.12.0 3.13.1 3.2.4 3.2.5 3.3.0 3.3.10 3.3.11 3.3.8 3.4.2 3.5.3 3.6.0 3.7.0 3.7.1 3.7.2 3.7.3 3.7.5 3.7.6 3.8.0 3.9.0 3.9.4 3.9.6 3.9.7 trunk 3.0.0 All 29 releases
delete-old-posts-programmatically / freemius / templates / tabs-capture-js.php
tabs-capture-js.php
63 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @package Freemius
4 * @copyright Copyright (c) 2015, Freemius, Inc.
5 * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6 * @since 1.2.2.7
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit;
11 }
12
13 /**
14 * @var array $VARS
15 * @var Freemius $fs
16 */
17 $fs = freemius( $VARS['id'] );
18 $slug = $fs->get_slug();
19 ?>
20 <script type="text/javascript">
21 (function ($) {
22 $(document).ready(function () {
23 var $wrap = $( '.wrap' );
24 if ( 0 === $wrap.length ) {
25 $wrap = $( '<div class="wrap">' );
26 $wrap.insertBefore( $( '#wpbody-content .clear' ) );
27 }
28
29 $wrap = $wrap.clone().wrap( '<div>' ).parent();
30
31 var
32 settingHtml = $wrap.html(),
33 tabsPosition = settingHtml.indexOf('nav-tab-wrapper'),
34 aboveTabsHtml = '';
35
36 if (-1 < tabsPosition) {
37 // Find the tabs HTML beginning exact position.
38 while ('<' !== settingHtml[tabsPosition] && 0 < tabsPosition) {
39 tabsPosition--;
40 }
41
42 if (-1 < tabsPosition) {
43 aboveTabsHtml = settingHtml.substr(0, tabsPosition);
44
45 var tabsHtml = $('.wrap .nav-tab-wrapper').clone().wrap('<div>').parent().html();
46
47 $.ajax({
48 url : <?php echo Freemius::ajax_url() ?> + '?' + $.param({
49 action : '<?php echo $fs->get_ajax_action( 'store_tabs' ) ?>',
50 security : '<?php echo $fs->get_ajax_security( 'store_tabs' ) ?>',
51 module_id: '<?php echo $fs->get_id() ?>'
52 }),
53 method : 'POST',
54 data : aboveTabsHtml + "\n" + tabsHtml + '</div>',
55 dataType : 'html',
56 // Avoid escaping the HTML.
57 processData: false
58 });
59 }
60 }
61 });
62 })(jQuery);
63 </script>