PluginProbe
WP Coder – Insert & Manage Code Snippets / 2.5.6
WP Coder – Insert & Manage Code Snippets v2.5.6
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 / add_new.php

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

130 lines 5.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if ( ! defined( 'ABSPATH' ) ) {
2 exit;
3 }
4 /**
5 * Add new Element
6 *
7 * @package Wow_Plugin
8 * @copyright Copyright (c) 2018, Dmytro Lobov
9 * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
10 * @since 1.0
11 */
12 include_once( 'include-data.php' );
13
14 $show_option = apply_filters( 'wpcoder_pro_show', array(
15 'shortecode' => __( 'Where shortcode is inserted', 'wpcoder' ),
16 ) );
17
18 $show = array(
19 'id' => 'show',
20 'name' => 'show',
21 'type' => 'select',
22 'val' => isset( $param['show'] ) ? $param['show'] : 'shortecode',
23 'option' => $show_option,
24 'func' => 'showchange',
25 'sep' => '<p/>',
26 );
27
28 ?>
29
30 <form action="admin.php?page=<?php echo esc_attr( $this->plugin_slug ); ?>" method="post" name="post"
31 class="wow-plugin">
32 <div id="poststuff">
33 <div id="post-body" class="metabox-holder columns-2">
34 <div id="post-body-content" style="position: relative;">
35 <div id="titlediv">
36 <div id="titlewrap">
37 <label class="screen-reader-text" id="title-prompt-text" for="title">Enter title here</label>
38 <input type="text" name="title" size="30" value="<?php echo esc_attr( $title ); ?>" id="title"
39 placeholder="<?php esc_attr_e( 'Register an item name', 'wpcoder' ); ?>">
40
41 </div>
42 </div>
43 </div>
44 <div id="postbox-container-1" class="postbox-container">
45 <?php do_action( 'wp_coder_pro_targeting', $param ); ?>
46 <div id="submitdiv" class="postbox ">
47 <h2 class="hndle ui-sortable-handle"><span>Publish</span></h2>
48
49 <div class="inside">
50 <div class="wow-container">
51 <div class="wow-element">
52 <?php echo self::option( $show ); ?>
53 <span id="wow-shortcode"><code>[<?php echo esc_attr( $this->shortcode ); ?> id="<?php echo absint( $tool_id ); ?>"]</code></span>
54 <p/>
55 <?php if ( ! class_exists( 'wpcoder\Wow_Admin_Class' ) ) {
56 echo '<span class="dashicons dashicons-migrate" style="color:#37c781;"></span> ';
57 printf( __( '<a href="%s" target="_blank">More advanced targeting</a>', 'leadgeneration' ), esc_url( $this->pro_url ) );
58 } else {
59 do_action( 'wpcoder_pro_show_fields', $param );
60 }
61 ?>
62 </div>
63 </div>
64 <div class="submitbox" id="submitpost">
65 <div id="major-publishing-actions">
66 <div id="delete-action">
67 <?php if ( ! empty( $id ) ) {
68 echo '<a class="submitdelete deletion" href="admin.php?page=' . esc_attr( $this->plugin_slug ) . '&info=delete&did=' . $id . '">' . esc_html__( 'Delete', 'wpcoder' ) . '</a>';
69 }; ?>
70 </div>
71
72 <div id="publishing-action">
73 <span class="spinner"></span>
74 <input name="submit" id="submit" class="button button-primary button-large"
75 value="<?php echo esc_attr( $btn ); ?>" type="submit">
76 </div>
77 <div class="clear"></div>
78 </div>
79 </div>
80 </div>
81 </div>
82
83 </div>
84
85 <div id="postbox-container-2" class="postbox-container">
86 <div id="postoptions" class="postbox ">
87 <div class="inside">
88 <div class="tab-box">
89 <ul class="tab-nav">
90 <?php
91 $tab_menu = array(
92 'html_code' => __( 'HTML Code', 'wpcoder' ),
93 'css_code' => __( 'CSS Code', 'wpcoder' ),
94 'js_code' => __( 'JS Code', 'wpcoder' ),
95 'include' => __( 'Include files', 'wpcoder' ),
96 );
97 $i = 1;
98 foreach ( $tab_menu as $menu => $val ) {
99 echo '<li><a href="#t' . absint( $i ) . '">' . esc_html( $val ) . '</a></li>';
100 $i ++;
101 }
102 ?>
103 </ul>
104 <div class="tab-panels">
105 <?php
106 $t = 1;
107 foreach ( $tab_menu as $menu => $val ) {
108 echo '<div id="t' . absint( $t ) . '">';
109 include_once( 'add-new/' . $menu . '.php' );
110 echo '</div>';
111 $t ++;
112 }
113 ?>
114 </div>
115 </div>
116 </div>
117 </div>
118 </div>
119 </div>
120 </div>
121 <input type="hidden" name="tool_id" value="<?php echo absint( $tool_id ); ?>" id="tool_id"/>
122 <input type="hidden" name="param[time]" value="<?php echo esc_attr( time() ); ?>"/>
123 <input type="hidden" name="add" value="<?php echo absint( $hidval ); ?>"/>
124 <input type="hidden" name="id" value="<?php echo absint( $id ); ?>"/>
125 <input type="hidden" name="data" value="<?php echo esc_attr( $data ); ?>"/>
126 <input type="hidden" name="page" value="<?php echo esc_attr( $this->plugin_slug ); ?>"/>
127 <input type="hidden" name="plugdir" value="<?php echo esc_attr( $this->plugin_slug ); ?>"/>
128 <?php wp_nonce_field( $this->plugin_slug . '_action', $this->plugin_slug . '_nonce' ); ?>
129 </form>
130