PluginProbe
Ultimate Client Dash / trunk
Ultimate Client Dash vtrunk
trunk 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.7.5 1.8 1.8.5 1.9 2.0 2.1 2.2 3.0 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 All 35 releases
ulimate-client-dash / admin / settings / main.php

main.php in Ultimate Client Dash trunk, at admin/settings/main.php

174 lines 7.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3
4 // Get requried indiviual settings pages
5
6 require( plugin_dir_path( __FILE__ ) . 'create-tabs.php');
7 require( plugin_dir_path( __FILE__ ) . 'dashboard-settings.php');
8 require( plugin_dir_path( __FILE__ ) . 'login-settings.php');
9 require( plugin_dir_path( __FILE__ ) . 'client-access.php');
10 require( plugin_dir_path( __FILE__ ) . 'menu-items.php');
11 require( plugin_dir_path( __FILE__ ) . 'widget-settings.php');
12 require( plugin_dir_path( __FILE__ ) . 'welcome-message.php');
13 require( plugin_dir_path( __FILE__ ) . 'tracking-and-custom-code.php');
14 require( plugin_dir_path( __FILE__ ) . 'landing-page.php');
15 require( plugin_dir_path( __FILE__ ) . 'misc.php');
16 require( plugin_dir_path( __FILE__ ) . 'shortcodes.php');
17 require( plugin_dir_path( __FILE__ ) . 'upgrade.php');
18
19
20 // Client Dashboard settings page content
21
22 function ucd_client_dash_page() {
23 global $ucd_active_tab;
24 global $ucd_plugin_version;
25 global $ucd_pro_plugin_version;
26 $ucd_active_tab = isset( $_GET['tab'] ) ? $_GET['tab'] : 'dashboard-settings';
27
28 // Create UCD settings notice
29
30 if ( isset( $_GET['settings-updated'] )) {
31 add_settings_error( 'ucd-notices', 'ucd-settings-updated', __('Settings saved.', 'ultimate-client-dash'), 'updated' );
32 }
33
34 ?>
35
36 <div class="wrap ucd-client-settings-wrapper">
37 <div class="ultimate-header">
38 <img clas="client-logo" src="<?php echo plugins_url( 'assets/Ultimate-Client-Dash-Logo.png', __FILE__ ); ?>" alt="Ultimate Client Dash" height="50" width="62.5" />
39 <h1><?php _e( 'Ultimate Client Dash', 'ultimate-client-dash' ); ?><span class="ucd-brand-dash-developer">Version <?php echo $ucd_plugin_version; ?><?php if (is_plugin_active('ultimate-client-dash-pro/ultimate-client-dash-pro.php') ) { ?> | Pro Version <?php echo $ucd_pro_plugin_version ?><?php } ?></span></h1>
40 </div>
41
42 <div class="ucd-page-navigation vertical left clearfix">
43
44 <div class="ucd-tabs-navigation-wrapper">
45 <?php
46 do_action( 'ucd_settings_tab' );
47 ?>
48 </div>
49
50 </div>
51
52 <div class="ucd-tab-content">
53 <?php do_action( 'ucd_settings_content' ); ?>
54 </div>
55
56 <script type="text/javascript">
57 jQuery(document).ready(function($){
58 $('#upload-btn').click(function(e) {
59 e.preventDefault();
60 var image = wp.media({
61 title: 'Upload Image',
62 // mutiple: true if you want to upload multiple files at once
63 multiple: false
64 }).open()
65 .on('select', function(e){
66 // This will return the selected image from the Media Uploader, the result is an object
67 var uploaded_image = image.state().get('selection').first();
68 // We convert uploaded_image to a JSON object to make accessing it easier
69 // Output to the console uploaded_image
70 console.log(uploaded_image);
71 var image_url = uploaded_image.toJSON().url;
72 // Let's assign the url value to the input field
73 $('#image_url').val(image_url);
74 });
75 });
76 });
77 jQuery(document).ready(function($){
78 $('#upload-btn-two').click(function(e) {
79 e.preventDefault();
80 var image = wp.media({
81 title: 'Upload Image',
82 // mutiple: true if you want to upload multiple files at once
83 multiple: false
84 }).open()
85 .on('select', function(e){
86 // This will return the selected image from the Media Uploader, the result is an object
87 var uploaded_image = image.state().get('selection').first();
88 // We convert uploaded_image to a JSON object to make accessing it easier
89 // Output to the console uploaded_image
90 console.log(uploaded_image);
91 var image_url_two = uploaded_image.toJSON().url;
92 // Let's assign the url value to the input field
93 $('#image_url_two').val(image_url_two);
94 });
95 });
96 });
97 jQuery(document).ready(function($){
98 $('#upload-btn-three').click(function(e) {
99 e.preventDefault();
100 var image = wp.media({
101 title: 'Upload Image',
102 // mutiple: true if you want to upload multiple files at once
103 multiple: false
104 }).open()
105 .on('select', function(e){
106 // This will return the selected image from the Media Uploader, the result is an object
107 var uploaded_image = image.state().get('selection').first();
108 // We convert uploaded_image to a JSON object to make accessing it easier
109 // Output to the console uploaded_image
110 console.log(uploaded_image);
111 var image_url_three = uploaded_image.toJSON().url;
112 // Let's assign the url value to the input field
113 $('#image_url_three').val(image_url_three);
114 });
115 });
116 });
117 jQuery(document).ready(function($){
118 $('#upload-btn-four').click(function(e) {
119 e.preventDefault();
120 var image = wp.media({
121 title: 'Upload Image',
122 // mutiple: true if you want to upload multiple files at once
123 multiple: false
124 }).open()
125 .on('select', function(e){
126 // This will return the selected image from the Media Uploader, the result is an object
127 var uploaded_image = image.state().get('selection').first();
128 // We convert uploaded_image to a JSON object to make accessing it easier
129 // Output to the console uploaded_image
130 console.log(uploaded_image);
131 var image_url_four = uploaded_image.toJSON().url;
132 // Let's assign the url value to the input field
133 $('#image_url_four').val(image_url_four);
134 });
135 });
136 });
137 jQuery(document).ready(function($){
138 $('#upload-btn-admin-logo').click(function(e) {
139 e.preventDefault();
140 var image = wp.media({
141 title: 'Upload Image',
142 // mutiple: true if you want to upload multiple files at once
143 multiple: false
144 }).open()
145 .on('select', function(e){
146 // This will return the selected image from the Media Uploader, the result is an object
147 var uploaded_image = image.state().get('selection').first();
148 // We convert uploaded_image to a JSON object to make accessing it easier
149 // Output to the console uploaded_image
150 console.log(uploaded_image);
151 var admin_logo_image_url = uploaded_image.toJSON().url;
152 // Let's assign the url value to the input field
153 $('#admin_logo_image_url').val(admin_logo_image_url);
154 });
155 });
156 });
157
158 // Add color picker to input
159
160 (function( $ ) {
161 // Add Color Picker to all inputs that have 'color-field' class
162 $(function() {
163 $('.color-field').wpColorPicker();
164 });
165
166 })( jQuery );
167
168 </script>
169 </div>
170
171 <!-- Footer -->
172 <div class="ultimiate-client-footer">Proudly developed by <a href="https://wpcodeus.com/" target="_blank">WP Codeus</a>.</div>
173 <?php }
174