PluginProbe ʕ •ᴥ•ʔ
Custom Sidebars – Dynamic Sidebar Classic Widget Area Manager / 3.2.4
Custom Sidebars – Dynamic Sidebar Classic Widget Area Manager v3.2.4
trunk 2.1.2.0 3.0.0.0 3.0.0.1 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.7.1 3.0.8 3.0.8.1 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.3 3.31 3.32 3.35 3.36 3.37 3.38
custom-sidebars / views / widgets.php
custom-sidebars / views Last commit date
bulk-edit.php 7 years ago col-sidebars.php 7 years ago import.php 7 years ago metabox.php 5 years ago quick-edit.php 9 years ago widgets-delete.php 8 years ago widgets-editor.php 8 years ago widgets-export.php 8 years ago widgets-location.php 7 years ago widgets.php 7 years ago
widgets.php
160 lines
1 <?php
2 /**
3 * Updates the default widgets page of the admin area.
4 * There are some HTML to be added for having all the functionality, so we
5 * include it at the begining of the page, and it's placed later via js.
6 */
7 ?>
8
9 <div id="cs-widgets-extra">
10
11 <?php /*
12 ============================================================================
13 ===== WIDGET head
14 ============================================================================
15 */ ?>
16 <div id="cs-title-options">
17 <h2><?php _e( 'Sidebars', 'custom-sidebars' ); ?></h2>
18 <div id="cs-options" class="csb cs-options">
19 <button type="button" class="button button-primary cs-action btn-create-sidebar">
20 <i class="dashicons dashicons-plus-alt"></i>
21 <?php _e( 'Create a new sidebar', 'custom-sidebars' ); ?>
22 </button>
23 <?php
24 /**
25 * Show additional functions in the widget header.
26 */
27 do_action( 'cs_widget_header' );
28 ?>
29 </div>
30 </div>
31
32
33 <?php /*
34 ============================================================================
35 ===== LANGUAGE
36 ============================================================================
37 */ ?>
38 <script>
39 csSidebarsData = {
40 'title_edit': "<?php _e( 'Edit [Sidebar]', 'custom-sidebars' ); ?>",
41 'title_new': "<?php _e( 'New Custom Sidebar', 'custom-sidebars' ); ?>",
42 'btn_edit': "<?php _e( 'Save Changes', 'custom-sidebars' ); ?>",
43 'btn_new': "<?php _e( 'Create Sidebar', 'custom-sidebars' ); ?>",
44 'title_delete': "<?php _e( 'Delete Sidebar', 'custom-sidebars' ); ?>",
45 'title_location': "<?php _e( 'Define where you want this sidebar to appear.', 'custom-sidebars' ); ?>",
46 'title_export': "<?php _e( 'Import / Export Sidebars', 'custom-sidebars' ); ?>",
47 'custom_sidebars': "<?php _e( 'Custom Sidebars', 'custom-sidebars' ); ?>",
48 'theme_sidebars': "<?php _e( 'Theme Sidebars', 'custom-sidebars' ); ?>",
49 'ajax_error': "<?php _e( 'Couldn\'t load data from WordPress...', 'custom-sidebars' ); ?>",
50 'lbl_replaceable': "<?php _e( 'This sidebar can be replaced on certain pages', 'custom-sidebars' ); ?>",
51 'replace_tip': "<?php _e( 'Activate this option to replace the sidebar with one of your custom sidebars.', 'custom-sidebars' ); ?>",
52 'filter': "<?php _e( 'Filter...', 'custom-sidebars' ); ?>",
53 'replaceable': <?php echo json_encode( (object) CustomSidebars::get_options( 'modifiable' ) ); ?>,
54 '_wpnonce_get': "<?php echo esc_attr( wp_create_nonce( 'custom-sidebars-get' ) ); ?>"
55 };
56 </script>
57
58
59 <?php /*
60 ============================================================================
61 ===== TOOLBAR for custom sidebars
62 ============================================================================
63 */ ?>
64 <div class="cs-custom-sidebar cs-toolbar">
65 <a
66 class="cs-tool delete-sidebar"
67 data-action="delete"
68 href="#"
69 title="<?php _e( 'Delete this sidebar.', 'custom-sidebars' ); ?>"
70 >
71 <i class="dashicons dashicons-trash"></i>
72 </a>
73 <span class="cs-separator">|</span>
74 <a
75 class="cs-tool"
76 data-action="edit"
77 href="#"
78 title="<?php _e( 'Edit this sidebar.', 'custom-sidebars' ); ?>"
79 >
80 <?php _e( 'Edit', 'custom-sidebars' ); ?>
81 </a>
82 <span class="cs-separator">|</span>
83 <a
84 class="cs-tool"
85 data-action="location"
86 href="#"
87 title="<?php _e( 'Where do you want to show the sidebar?', 'custom-sidebars' ); ?>"
88 >
89 <?php _e( 'Sidebar Location', 'custom-sidebars' ); ?>
90 </a>
91 <span class="cs-separator">|</span>
92 </div>
93
94
95 <?php /*
96 ============================================================================
97 ===== TOOLBAR for theme sidebars
98 ============================================================================
99 */ ?>
100 <div class="cs-theme-sidebar cs-toolbar">
101 <label
102 for="cs-replaceable"
103 class="cs-tool btn-replaceable"
104 data-action="replaceable"
105 data-on="<?php _e( 'This sidebar can be replaced on certain pages', 'custom-sidebars' ); ?>"
106 data-off="<?php _e( 'This sidebar will always be same on all pages', 'custom-sidebars' ); ?>"
107 >
108 <span class="icon"></span>
109 <input
110 type="checkbox"
111 id=""
112 class="has-label chk-replaceable"
113 />
114 <span class="is-label">
115 <?php _e( 'Allow this sidebar to be replaced', 'custom-sidebars' ); ?>
116 </span>
117 </label>
118 </div>
119
120
121 <?php /*
122 ============================================================================
123 ===== DELETE SIDEBAR confirmation
124 ============================================================================
125 */ ?>
126 <div class="cs-delete">
127 <?php include CSB_VIEWS_DIR . 'widgets-delete.php'; ?>
128 </div>
129
130
131 <?php /*
132 ============================================================================
133 ===== ADD/EDIT SIDEBAR
134 ============================================================================
135 */ ?>
136 <div class="cs-editor">
137 <?php include CSB_VIEWS_DIR . 'widgets-editor.php'; ?>
138 </div>
139
140
141 <?php /*
142 ============================================================================
143 ===== EXPORT
144 ============================================================================
145 */ ?>
146 <div class="cs-export">
147 <?php include CSB_VIEWS_DIR . 'widgets-export.php'; ?>
148 </div>
149
150 <?php /*
151 ============================================================================
152 ===== LOCATION popup.
153 ============================================================================
154 */ ?>
155 <div class="cs-location">
156 <?php include CSB_VIEWS_DIR . 'widgets-location.php'; ?>
157 </div>
158
159 </div>
160