PluginProbe
Bubble Menu – Floating Button Menu with Sticky Navigation / 3.1.1
Bubble Menu – Floating Button Menu with Sticky Navigation v3.1.1
trunk 1.3 2.0 2.2 2.2.1 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1 3.1.1 4.0 4.0.1 4.0.2 4.0.3 4.0.4 4.0.5 4.0.6 4.0.7 4.1 4.1.1
bubble-menu / admin / page-main.php

page-main.php in Bubble Menu – Floating Button Menu with Sticky Navigation 3.1.1, at admin/page-main.php

118 lines 5.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Plugin main page
4 *
5 * @package Wow_Plugin
6 * @subpackage Admin/Main_page
7 * @author Wow-Company <yoda@wow-company.com>
8 * @copyright 2019 Wow-Company
9 * @license GNU Public License
10 * @version 1.0
11 */
12
13 if ( ! defined( 'ABSPATH' ) ) {
14 exit;
15 }
16
17 global $wpdb;
18 $data = $wpdb->prefix . 'wow_' . $this->plugin['prefix'];
19 $info = ( isset( $_REQUEST['info'] ) ) ? sanitize_text_field( $_REQUEST['info'] ) : '';
20 if ( $info == 'saved' ) {
21 echo '<div class="updated" id="message"><p><strong>' . esc_attr__( 'Item Added', 'bubble-menu' ) . '</strong>.</p></div>';
22 } elseif ( $info == 'update' ) {
23 echo '<div class="updated" id="message"><p><strong>' . esc_attr__( 'Item Updated', 'bubble-menu' ) . '</strong>.</p></div>';
24 } elseif ( $info == 'delete' ) {
25 $delid = absint( $_GET['did'] );
26 if ( ! empty( $_GET['_wpnonce'] ) && wp_verify_nonce( $_GET['_wpnonce'], $this->plugin['slug'] . '_nonce' ) ) {
27 $wpdb->delete( $data, [ 'id' => $delid ], [ '%d' ] );
28 echo '<div class="updated" id="message"><p><strong>' . esc_attr__( 'Item Deleted', 'bubble-menu' ) . '</strong>.</p></div>';
29 }
30 }
31
32 $current_tab = ( isset( $_REQUEST["tab"] ) ) ? sanitize_text_field( $_REQUEST["tab"] ) : 'list';
33
34 $tabs = apply_filters( $this->plugin['slug'] . '_tab_menu', array(
35 'list' => esc_attr__( 'List', 'bubble-menu' ),
36 'settings' => esc_attr__( 'Add new', 'bubble-menu' ),
37 'generator' => esc_attr__( 'Icon for menu', 'bubble-menu' ),
38 'extension' => esc_attr__( 'Pro Features', 'bubble-menu' ),
39 'support' => esc_attr__( 'Support', 'bubble-menu' ),
40 ) );
41
42 $rating = 'https://wordpress.org/support/plugin/bubble-menu/reviews/#new-post';
43 ?>
44
45 <div class="wowp-header">
46 <div class="wowp-header-wrapper">
47 <h1 class="wowp-heading-inline">
48 <img src="<?php echo esc_url( $this->plugin['url'] ); ?>admin/assets/img/logo.png" alt="">
49 <span><?php echo esc_attr( $this->plugin['name'] ); ?>
50 <sup> <?php echo esc_attr( $this->plugin['version'] ); ?></sup></span>
51 </h1>
52 <a href="?page=<?php echo esc_attr( $this->plugin['slug'] ); ?>&tab=settings" class="page-title-action button ">
53 <?php esc_attr_e( 'Add New', 'side-menu' ); ?></a>
54 </div>
55 <div class="wowp-links">
56 <a href="https://wow-estore.com/item/category/wordpress/?term_type=download_category&term_id=502&filter=8f619fb7c0"
57 class="wowp-link" target="_blank">
58 <span class="dashicons dashicons-admin-appearance"></span><span>Themes</span></a>
59 <a href="https://wow-estore.com/item/category/wordpress/" class="wowp-link" target="_blank">
60 <span class="dashicons dashicons-admin-plugins"></span><span>Plugins</span></a>
61 <a href="https://wordpress.org/support/plugin/bubble-menu/reviews/#new-post" class="wowp-link"
62 target="_blank">
63 <span class="dashicons dashicons-star-filled"></span><span>Rate</span></a>
64
65 </div>
66 </div>
67
68 <div class="wrap">
69 <hr class="wp-header-end">
70 <?php if ( get_option( 'wow_' . $this->plugin['prefix'] . '_message' ) != 'read' ) : ?>
71 <div class="notice notice-info is-dismissible wow-plugin-message">
72 <p class="ideas">
73 <i class="fas fa-bullhorn"></i>We are constantly trying to improve the plugin and add more useful
74 features to it. Your support and your ideas for improving the plugin are very important to us. <br/>
75 <i class="fas fa-star"></i>If you like the plugin, please <a
76 href="<?php echo esc_url( $rating ); ?>" target="_blank">leave a review</a> about it at
77 WordPress.org.
78
79 </p>
80 </div>
81 <?php endif; ?>
82
83 <div id="wow-message"></div>
84
85 <?php
86 echo '<h2 class="nav-tab-wrapper">';
87 foreach ( $tabs as $tab => $name ) {
88 $class = ( $tab === $current_tab ) ? ' nav-tab-active' : '';
89 if ( $tab === 'options' ) {
90 $action = ( isset( $_REQUEST["act"] ) ) ? sanitize_text_field( $_REQUEST["act"] ) : '';
91 if ( ! empty( $action ) && $action == 'update' ) {
92 echo '<a class="nav-tab' . esc_attr( $class ) . '" href="?page=' . esc_attr( $this->plugin['slug'] ) . '&tab=' .
93 esc_attr( $tab ) . '">' . esc_attr__( 'Update', $this->plugin['prefix'] ) . ' #' .
94 absint( $_REQUEST["id"] ) . '</a>';
95 } else {
96 echo '<a class="nav-tab' . esc_attr( $class ) . '" href="?page=' . esc_attr( $this->plugin['slug'] ) . '&tab=' .
97 esc_attr( $tab ) . '">' . esc_attr( $name ) . '</a>';
98 }
99 } elseif ( $tab === 'extension' ) {
100 echo '<a class="nav-tab' . esc_attr( $class ) . '" href="?page=' . esc_attr( $this->plugin['slug'] ) . '&tab='
101 . esc_attr( $tab ) . '"><span class="dashicons dashicons-yes" style="color:#00d1b2;"></span> ' . esc_attr( $name ) . '</a>';
102 }
103 elseif ( $tab === 'rate' ) {
104 echo '<a class="nav-tab' . esc_attr( $class ) . '" href="' . esc_url( $rating ) . '" target="_blank"><span class="dashicons dashicons-star-filled" style="color:#ffcc01;"></span> ' . esc_attr( $name ) . '</a>';
105
106 } else {
107 echo '<a class="nav-tab' . esc_attr( $class ) . '" href="?page=' . esc_attr( $this->plugin['slug'] ) . '&tab=' .
108 esc_attr( $tab ) . '">' . esc_attr( $name ) . '</a>';
109 }
110
111 }
112 echo '</h2>';
113 $current_tab = array_key_exists( $current_tab, $tabs ) ? 'page-' . $current_tab : 'page-list';
114 include_once( $current_tab . '.php' );
115 ?>
116 </div>
117 <?php
118