PluginProbe
WP Coder – Insert & Manage Code Snippets / 4.1
WP Coder – Insert & Manage Code Snippets v4.1
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 / 7.include.php

7.include.php in WP Coder – Insert & Manage Code Snippets 4.1, at includes/settings/7.include.php

67 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 * Page Name: Scripts & Styles
4 */
5
6 use WPCoder\Dashboard\Field;
7 use WPCoder\Dashboard\Option;
8
9 defined( 'ABSPATH' ) || exit;
10
11 $default = Field::getDefault();
12 $opt = include( 'options/includes.php' );
13 $count = ! empty( $default['param']['include'] ) ? count( $default['param']['include'] ) : 0;
14 ?>
15
16 <fieldset id="includes-files" class="wowp-fieldset">
17 <div class="wowp-fieldset__header">
18 <div class="wowp-fieldset__header-title">
19 <?php esc_html_e( 'Add External Scripts & Styles', 'wp-coder' ); ?>
20 <p>Add custom styles or scripts to your site by entering the URL. These files will be loaded on the front end.</p>
21 </div>
22
23 <div class="wowp-fieldset__header-button">
24 <a class="button button-secondary" id="add-include"><?php esc_html_e( 'Add New', 'wp-coder' ); ?></a>
25 </div>
26 </div>
27
28 <?php if ( $count > 0 ) :
29 for ( $i = 0; $i < $count; $i ++ ):
30 ?>
31
32 <div class="wowp-fields__group">
33 <button class="wowp-button__icon is-remove dashicons dashicons-trash"></button>
34 <?php Option::init( [
35 $opt['include'],
36 $opt['include_file'],
37 $opt['js_attr'],
38 $opt['css_only_preview'],
39 ], $i ); ?>
40
41 </div>
42 <?php
43 endfor;
44 endif; ?>
45
46 <div class="btn-add-display"></div>
47 </fieldset>
48
49
50 <template id="clone-includes">
51
52 <div class="wowp-fields__group">
53 <button class="wowp-button__icon is-remove dashicons dashicons-trash"></button>
54 <?php Option::init( [
55 $opt['include'],
56 $opt['include_file'],
57 $opt['js_attr'],
58 $opt['css_only_preview'],
59 ], - 1 ); ?>
60
61 </div>
62
63 </template>
64
65
66 <?php
67