PluginProbe
WP Coder – Insert & Manage Code Snippets / 2.3.2
WP Coder – Insert & Manage Code Snippets v2.3.2
4.5.1 1.1 2.3.1 2.3.2 2.4.1 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1 3.1.1 3.2 3.2.1 3.3 3.4 3.5 3.5.1 All 39 releases
wp-coder / admin / partials / main.php

main.php in WP Coder – Insert & Manage Code Snippets 2.3.2, at admin/partials/main.php

83 lines 2.8 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 * @copyright Copyright (c) 2018, Dmytro Lobov
7 * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
8 * @since 1.0
9 */
10
11 if ( ! defined( 'ABSPATH' ) ) exit;
12
13 require_once plugin_dir_path( __FILE__ ) . 'tools-data-base.php';
14
15 $current_tab = ( isset( $_REQUEST["tab"] ) ) ? sanitize_text_field( $_REQUEST["tab"] ) : 'list';
16
17 $tabs = apply_filters( 'wp_coder_menu', array(
18 'list' => __( 'List', 'wpcoder' ),
19 'add_new' => __( 'Add new', 'wpcoder' ),
20 'items' => __( 'Items', 'wpcoder' ),
21 'extension' => __( 'Extension', 'wpcoder' ),
22 'support' => __( 'Support', 'wpcoder' ),
23 ) );
24 ?>
25
26 <style>
27 .nav-tab-wrapper {
28 margin-bottom: 20px;
29 }
30 .wrap .nav-tab-wrapper .page-title-action {
31 top: 4px;
32 margin-left: 5px;
33 }
34 .wow-facebook::after {
35 font-family: dashicons;
36 content: "\f305";
37 margin-left: 5px;
38 }
39 .dashicons {
40 color: #e95645;
41 margin-right: 10px;
42 }
43 .ideas {
44 font-size: 14px;
45 font-weight: 600;
46 }
47 </style>
48
49 <div class="wrap">
50 <h1 class="wp-heading-inline"><?php echo $this->plugin_name; ?> v. <?php echo $this->plugin_version; ?></h1>
51 <a href="?page=<?php echo $this->plugin_slug; ?>&tab=add_new" class="page-title-action"><?php _e( 'Add New', 'wpcoder' ); ?></a> <a href="https://www.facebook.com/wowaffect/" class="page-title-action wow-facebook" target="_blank">Stay in touch</a>
52 <hr class="wp-header-end">
53 <p class="ideas">
54 <span class="dashicons dashicons-megaphone"></span> <?php printf( __( 'We want to hear your Ideas about improving the plugin. <a href="%1$s" target="_blank">Send Message</a>!', $this->plugin_pref ), 'https://wow-estore.com/item/wp-coder-extension/' ); ?>
55 </p>
56 <?php
57 echo '<h2 class="nav-tab-wrapper">';
58 foreach ( $tabs as $tab => $name ) {
59 $class = ( $tab === $current_tab ) ? ' nav-tab-active' : '';
60 if ( $tab == 'add_new' ) {
61 $action = ( isset( $_REQUEST["act"] ) ) ? sanitize_text_field( $_REQUEST["act"] ) : '';
62 if ( !empty( $action ) && $action == 'update' ) {
63 echo '<a class="nav-tab' .esc_attr( $class ) . '" href="?page=' . $this->plugin_slug . '&tab=' . esc_attr( $tab ) . '">' . __( 'Update', 'leadgeneration' ) . ' #' . absint( $_REQUEST["id"] ) . '</a>';
64 }
65 else {
66 echo '<a class="nav-tab' .esc_attr( $class ) . '" href="?page=' . $this->plugin_slug . '&tab=' . esc_attr( $tab ) . '">' . esc_attr( $name ) . '</a>';
67 }
68 }
69 else {
70 echo '<a class="nav-tab' .esc_attr( $class ) . '" href="?page=' . $this->plugin_slug . '&tab=' . esc_attr( $tab ) . '">' . esc_attr( $name ) . '</a>';
71 }
72
73 }
74 echo '</h2>';
75
76 $file = apply_filters( 'wp_coder_file', $current_tab );
77 include_once ( $file . '.php' );
78
79 ?>
80 </div>
81
82
83