PluginProbe
WP Coder – Insert & Manage Code Snippets / 3.2
WP Coder – Insert & Manage Code Snippets v3.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 / includes / settings / 3.js-code.php

3.js-code.php in WP Coder – Insert & Manage Code Snippets 3.2, at includes/settings/3.js-code.php

61 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 * Page Name: JS
4 */
5
6 use WPCoder\Dashboard\Field;
7 use WPCoder\Dashboard\FolderManager;
8 use WPCoder\Dashboard\Option;
9
10 defined( 'ABSPATH' ) || exit;
11
12 $default = Field::getDefault();
13 $opt = include( 'options/js-code.php' );
14
15 $js_link = '';
16 if ( ! empty( $default['js_code'] ) ) {
17 $js_link = FolderManager::path_upload_url() . 'script-' . $default['id'] . '.js';
18 }
19
20 ?>
21 <h4>
22 <span class="codericon codericon-filetype-js"></span>
23 <?php esc_html_e( 'JavaScript Code', 'wpcoder' ); ?>
24 </h4>
25
26 <fieldset>
27 <legend><?php esc_html_e( 'Settings', 'wpcoder' ); ?></legend>
28
29 <?php Option::init( [
30 $opt['jquery'],
31 $opt['inline'],
32 $opt['minified'],
33 $opt['attributes'],
34 ] ); ?>
35
36 </fieldset>
37
38 <div class="wowp-field is-full wowp-code-nav ">
39 <ol id="jsNavigationMenu" class="wowp-php-nav-menu"></ol>
40 <span class="button-editor" id="jsnav">Add NAV Comment</span>
41 </div>
42
43 <?php Option::init( [ $opt['js_code'] ] ); ?>
44
45 <div class="wowp-notification -warning">
46 Please input only the JavaScript content, omitting the <code>script</code> tag
47 </div>
48
49 <?php if ( ! empty( $js_link ) ): ?>
50 <div class="wowp-fields-group has-mt">
51 <div class="wowp-field is-full has-addon border-default">
52 <label for="url-css-file" class="is-addon">
53 <span class="dashicons dashicons-admin-links"></span>
54 </label>
55 <input type="url" id="url-css-file" readonly="readonly" value="<?php echo esc_url( $js_link ); ?>">
56 <span class="label"><?php esc_html_e( 'URL to the JS file', 'wpcoder' ); ?></span>
57 </div>
58 </div>
59 <?php endif;
60
61