PluginProbe
Float menu – awesome floating side menu / 3.3.1
Float menu – awesome floating side menu v3.3.1
7.2.5 trunk 2.1 2.2 3.0.1 3.1 3.2.2 3.3.1 3.5 3.5.1 3.5.2 3.5.3. 3.5.4 4.0 4.1 4.1.1 4.2 4.3 4.3.1 4.3.2 5.0 5.0.1 5.0.2 5.0.3 5.1 All 57 releases
float-menu / admin / partials / main.php

main.php in Float menu – awesome floating side menu 3.3.1, at admin/partials/main.php

76 lines 3.5 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 Dmytro Lobov <d@dayes.dev>
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 require_once 'tools-data-base.php';
18
19 $current_tab = ( isset( $_REQUEST["tab"] ) ) ? sanitize_text_field( $_REQUEST["tab"] ) : 'list';
20
21 $tabs = apply_filters( $this->plugin['slug'] . '_tab_menu', array(
22 'list' => esc_attr__( 'List', $this->plugin['text'] ),
23 'add-new' => esc_attr__( 'Add new', $this->plugin['text'] ),
24 'extension' => esc_attr__( 'Pro Features', $this->plugin['text'] ),
25 'support' => esc_attr__( 'Support', $this->plugin['text'] ),
26 'items' => esc_attr__( 'Plugins', $this->plugin['text'] ),
27 ) );
28
29 $rating = $this->rating['wp_url'];
30 ?>
31
32 <div class="wrap">
33 <h1 class="wp-heading-inline"><?php echo $this->plugin['name']; ?> v. <?php echo $this->plugin['version']; ?></h1>
34 <a href="?page=<?php echo $this->plugin['slug']; ?>&tab=add-new" class="page-title-action">
35 <?php esc_attr_e( 'Add New', $this->plugin['text'] ); ?></a>
36 <a href="<?php echo $this->url['facebook']; ?>" class="page-title-action" target="_blank">Stay in touch</a>
37 <hr class="wp-header-end">
38 <div class="notice notice-info">
39 <p class="ideas">
40 <i class="fas fa-bullhorn"></i>We are constantly trying to improve the plugin and add more useful features to it. Your support and your ideas for improving the plugin are very important to us. <br/>
41 <i class="fas fa-star"></i>If you like the plugin, please <a href="<?php echo esc_url($rating); ?>" target="_blank">leave a review</a> about it at WordPress.org.<br/>
42 <i class="fas fa-share-alt"></i>Help other users find this plugin and take advantage of it. <b>Share:</b> <span data-share="facebook">Facebook</span>, <span data-share="twitter">Twitter</span>, <span data-share="vk">VK</span>, <span data-share="linkedin">LinkedIn</span>, <span data-share="pinterest">Pinterest</span>, <span data-share="xing">XING</span>, <span data-share="reddit">Reddit</span>, <span data-share="blogger">Blogger</span>, <span data-share="telegram">Telegram</span>
43 </p>
44 <input type="hidden" id="wp-title" value="<?php echo esc_attr($this->rating['wp_title']);?>">
45 <input type="hidden" id="wp-url" value="<?php echo esc_url($this->rating['wp_home']);?>">
46 </div>
47
48 <div id="wow-message"></div>
49
50 <?php
51 echo '<h2 class="nav-tab-wrapper">';
52 foreach ( $tabs as $tab => $name ) {
53 $class = ( $tab === $current_tab ) ? ' nav-tab-active' : '';
54 if ( $tab == 'add-new' ) {
55 $action = ( isset( $_REQUEST["act"] ) ) ? sanitize_text_field( $_REQUEST["act"] ) : '';
56 if ( ! empty( $action ) && $action == 'update' ) {
57 echo '<a class="nav-tab' . esc_attr( $class ) . '" href="?page=' . $this->plugin['slug'] . '&tab='
58 . esc_attr( $tab ) . '">' . esc_attr__( 'Update', $this->plugin['prefix'] ) . ' #'
59 . absint( $_REQUEST["id"] ) . '</a>';
60 } else {
61 echo '<a class="nav-tab' . esc_attr( $class ) . '" href="?page=' . $this->plugin['slug'] . '&tab='
62 . esc_attr( $tab ) . '">' . esc_attr( $name ) . '</a>';
63 }
64 } else {
65 echo '<a class="nav-tab' . esc_attr( $class ) . '" href="?page=' . $this->plugin['slug'] . '&tab='
66 . esc_attr( $tab ) . '">' . esc_attr( $name ) . '</a>';
67 }
68
69 }
70 echo '</h2>';
71 $file = apply_filters( $this->plugin['slug'] . '_menu_file', $current_tab );
72 include_once( $file . '.php' );
73 ?>
74 </div>
75 <?php
76