Changeset 1850249
- Timestamp:
- 03/30/2018 07:50:21 PM (8 years ago)
- Location:
- under-construction-maintenance-mode
- Files:
-
- 20 added
- 7 edited
- 6 copied
-
tags/1.0.4 (copied) (copied from under-construction-maintenance-mode/trunk)
-
tags/1.0.4/assets/css/fa-brands.css (added)
-
tags/1.0.4/assets/css/fa-brands.min.css (added)
-
tags/1.0.4/assets/css/fontawesome.css (added)
-
tags/1.0.4/assets/css/fontawesome.min.css (added)
-
tags/1.0.4/assets/js/customize-controls.js (copied) (copied from under-construction-maintenance-mode/trunk/assets/js/customize-controls.js) (2 diffs)
-
tags/1.0.4/assets/webfonts (added)
-
tags/1.0.4/assets/webfonts/fa-brands-400.eot (added)
-
tags/1.0.4/assets/webfonts/fa-brands-400.svg (added)
-
tags/1.0.4/assets/webfonts/fa-brands-400.ttf (added)
-
tags/1.0.4/assets/webfonts/fa-brands-400.woff (added)
-
tags/1.0.4/assets/webfonts/fa-brands-400.woff2 (added)
-
tags/1.0.4/classes/customizer.php (copied) (copied from under-construction-maintenance-mode/trunk/classes/customizer.php) (7 diffs)
-
tags/1.0.4/classes/ucmm-wpbrigade-settings-api.php (modified) (4 diffs)
-
tags/1.0.4/readme.txt (copied) (copied from under-construction-maintenance-mode/trunk/readme.txt) (3 diffs)
-
tags/1.0.4/ucmm-customize.php (copied) (copied from under-construction-maintenance-mode/trunk/ucmm-customize.php) (11 diffs)
-
tags/1.0.4/under-construction-maintenance-mode.php (copied) (copied from under-construction-maintenance-mode/trunk/under-construction-maintenance-mode.php) (3 diffs)
-
trunk/assets/css/fa-brands.css (added)
-
trunk/assets/css/fa-brands.min.css (added)
-
trunk/assets/css/fontawesome.css (added)
-
trunk/assets/css/fontawesome.min.css (added)
-
trunk/assets/js/customize-controls.js (modified) (2 diffs)
-
trunk/assets/webfonts (added)
-
trunk/assets/webfonts/fa-brands-400.eot (added)
-
trunk/assets/webfonts/fa-brands-400.svg (added)
-
trunk/assets/webfonts/fa-brands-400.ttf (added)
-
trunk/assets/webfonts/fa-brands-400.woff (added)
-
trunk/assets/webfonts/fa-brands-400.woff2 (added)
-
trunk/classes/customizer.php (modified) (7 diffs)
-
trunk/classes/ucmm-wpbrigade-settings-api.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/ucmm-customize.php (modified) (11 diffs)
-
trunk/under-construction-maintenance-mode.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
under-construction-maintenance-mode/tags/1.0.4/assets/js/customize-controls.js
r1764507 r1850249 49 49 wp.customize( 'ucmm_wpbrigade_customization[ucmm_display_footer_text]', function( value ) { 50 50 value.bind( function( newval ) { 51 console.log(newval);52 51 if ( false == newval) { 53 52 $('#customize-preview iframe').contents().find( '.footer-love' ).hide(); … … 57 56 58 57 } ); 59 } ); 58 } ); 59 // change background image 60 wp.customize( 'ucmm_wpbrigade_customization[setting_background]', function( value ) { 61 value.bind( function( newval ) { 62 if ( '' !== newval) { 63 $('#customize-preview iframe').contents().find( 'body' ).css( { 'background-image': 'url('+ newval.toString() +')'} ); 64 } else{ 65 $('#customize-preview iframe').contents().find( 'body' ).css( { 'background-image': 'url("")'} ); 66 } 67 } ); 68 } ); 60 69 70 // change logo image 71 wp.customize( 'ucmm_wpbrigade_customization[ucmm_logo]', function( value ) { 72 value.bind( function( newval ) { 73 if ( '' !== newval) { 74 $('#customize-preview iframe').contents().find( '.ucmm-logo img' ).show(); 75 $('#customize-preview iframe').contents().find( '.ucmm-logo img' ).attr( 'src', newval) ; 76 } else{ 77 $('#customize-preview iframe').contents().find( '.ucmm-logo img' ).hide(); 78 } 79 } ); 80 } ); 81 // width change logo 82 wp.customize( 'ucmm_wpbrigade_customization[ucmm_logo_width]', function( value ) { 83 value.bind( function( newval ) { 84 $('#customize-preview iframe').contents().find( '.ucmm-logo img' ).css( {'width': newval }) ; 85 } ); 86 } ); 87 // height logo change 88 wp.customize( 'ucmm_wpbrigade_customization[ucmm_logo_height]', function( value ) { 89 value.bind( function( newval ) { 90 $('#customize-preview iframe').contents().find( '.ucmm-logo img' ).css( {'height': newval }) ; 91 } ); 92 } ); 61 93 94 //style apply 95 wp.customize( 'ucmm_wpbrigade_customization[ucmm_custom_css]', function( value ) { 96 value.bind( function( newval ) { 97 $('#customize-preview iframe').contents().find( 'style' ).append( newval) ; 98 } ); 99 } ); 62 100 63 101 64 102 65 103 } )( jQuery ); 104 105 -
under-construction-maintenance-mode/tags/1.0.4/classes/customizer.php
r1764507 r1850249 49 49 'type' => 'option', 50 50 'capability' => 'manage_options', 51 //'transport' => 'postMessage'51 'transport' => 'postMessage' 52 52 ) ); 53 53 … … 76 76 'type' => 'option', 77 77 'capability' => 'manage_options', 78 //'transport' => 'postMessage'78 'transport' => 'postMessage' 79 79 )); 80 80 … … 98 98 'panel' => 'ucmm_wpbrigade_panel', 99 99 ) ); 100 101 $wp_customize->add_setting( 'ucmm_wpbrigade_customization[setting_background]', array(102 // 'default' => plugins_url( 'img/bg.jpg', __FILE__ ),100 101 $wp_customize->add_setting( 'ucmm_wpbrigade_customization[setting_background]', array( 102 'default' => UCMM_WPBRIGADE_DIR_URL . 'img/coming-soon.png', 103 103 'type' => 'option', 104 104 'capability' => 'manage_options', 105 //'transport' => 'postMessage'105 'transport' => 'postMessage' 106 106 ) ); 107 107 … … 260 260 261 261 $wp_customize->add_setting( 'ucmm_wpbrigade_customization[ucmm_custom_css]', array( 262 'default' => "/* You can add your custom CSS here. */",262 //'default' => "/* You can add your custom CSS here. */", 263 263 'type' => 'option', 264 264 'capability' => 'manage_options', … … 270 270 'type' => 'textarea', 271 271 'section' => 'ucmm_section_css', 272 'input_attrs' => array( 273 'placeholder' => __( 'You can add your custom CSS here.', 'ucmm-wpbrigade' ) ), 272 274 'priority' => 5, 273 275 'settings' => 'ucmm_wpbrigade_customization[ucmm_custom_css]' … … 331 333 332 334 $wp_customize->add_setting( 'ucmm_wpbrigade_customization[ucmm_ga_tracking_code]', array( 333 'default' => "/* Google Analytics Tracking Code here. */",335 //'default' => "/* Google Analytics Tracking Code here. */", 334 336 'type' => 'option', 335 337 'capability' => 'manage_options', … … 342 344 'section' => 'ucmm_ga_tracking_section', 343 345 'priority' => 5, 346 'input_attrs' => array( 347 'placeholder' => __( 'Google Analytics Tracking Code here.', 'ucmm-wpbrigade' ) ), 344 348 'settings' => 'ucmm_wpbrigade_customization[ucmm_ga_tracking_code]' 345 349 ) ); -
under-construction-maintenance-mode/tags/1.0.4/classes/ucmm-wpbrigade-settings-api.php
r1605890 r1850249 103 103 if ( isset($section['desc']) && !empty($section['desc']) ) { 104 104 $section['desc'] = '<div class="inside">' . $section['desc'] . '</div>'; 105 $callback = c reate_function('', 'echo "' . str_replace( '"', '\"', $section['desc'] ) . '";');105 $callback = call_user_func( array( $this, 'get_description' ), $section['desc'] ); 106 106 } else if ( isset( $section['callback'] ) ) { 107 107 $callback = $section['callback']; … … 149 149 } 150 150 } 151 151 152 /** 153 * Get Section description. 154 * 155 * @param string $desc description. 156 * @since 1.0.4 157 * @return string $desc description of control. 158 */ 159 function get_description( $desc ) { 160 return $desc; 161 } 162 163 /** 164 * Prints out all settings sections added to a particular settings page 165 * 166 * @since 1.0.4 167 */ 168 function do_settings_sections( $page ) { 169 global $wp_settings_sections, $wp_settings_fields; 170 171 if ( !isset($wp_settings_sections) || !isset($wp_settings_sections[$page]) ) 172 return; 173 174 foreach ( (array) $wp_settings_sections[$page] as $section ) { 175 echo "<h3>{$section['title']}</h3>\n"; 176 echo $section['callback'] ; 177 if ( !isset($wp_settings_fields) || !isset($wp_settings_fields[$page]) || !isset($wp_settings_fields[$page][$section['id']]) ) 178 continue; 179 echo '<table class="form-table">'; 180 do_settings_fields($page, $section['id']); 181 echo '</table>'; 182 } 183 } 184 152 185 /** 153 186 * Get field description for display … … 510 543 do_action( 'wsa_form_top_' . $form['id'], $form ); 511 544 settings_fields( $form['id'] ); 512 do_settings_sections( $form['id'] );545 $this->do_settings_sections( $form['id'] ); 513 546 do_action( 'wsa_form_bottom_' . $form['id'], $form ); 514 547 if ( isset( $this->settings_fields[ $form['id'] ] ) ): … … 621 654 endif; 622 655 } 623 656 624 657 } 625 658 -
under-construction-maintenance-mode/tags/1.0.4/readme.txt
r1764507 r1850249 5 5 Requires at least: 3.0 6 6 Tested up to: 4.9 7 Stable tag: 1.0. 37 Stable tag: 1.0.4 8 8 License: GPLv3 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 46 46 == Changelog == 47 47 48 = 1.0.4 - 2018-03-31 = 49 50 * New Feature: Social Icons. 51 * Enhancement: Logo Live Change in Customizer. 52 * Enhancement: Background Image Live Change in Customizer. 53 * Enhancement: Custom css Live Change in Customizer. 54 * Enhancement: Placeholder added for Google Analytics and Custom CSS control. 55 * Bug Fix: Deprecated function call on line number 105. 56 57 48 58 = 1.0.3 = 49 59 * New Feature: Custimize all the layout with WordPress Customizer and see it live preview along with changes live. … … 68 78 == Upgrade Notice == 69 79 70 = 1.0. 3=80 = 1.0.4 = 71 81 Upgrade Immediately - 4.9 Compatible and A whole set of NEW FEATURES for FREE :) -
under-construction-maintenance-mode/tags/1.0.4/ucmm-customize.php
r1764507 r1850249 5 5 */ 6 6 $ucmm_wpbrigade_array = (array) get_option( 'ucmm_wpbrigade_customization' ); 7 7 8 8 9 function ucmm_wpbrigade_option_key( $ucmm_key, $ucmm_wpbrigade_array ) { … … 21 22 * @since 1.0.2 22 23 */ 23 function ucmm_wpbrigade_default_option_key( $ucmm_key, $ucmm_wpbrigade_array ) {24 function ucmm_wpbrigade_default_option_key( $ucmm_key, $ucmm_wpbrigade_array , $default = true ) { 24 25 25 26 if ( array_key_exists( $ucmm_key, $ucmm_wpbrigade_array ) ) { … … 29 30 } 30 31 else { 31 return true;32 return $default; 32 33 } 33 34 } … … 49 50 $ucmm_footer_love = ucmm_wpbrigade_default_option_key( 'ucmm_display_footer_text', $ucmm_wpbrigade_array); 50 51 51 if ( $ucmm_logo ) { 52 $_ucmm_logo = '<img src="'.$ucmm_logo.'" alt="">'; 52 53 $social_icons =array( 'ucmm_facebook_c', 'ucmm_twitter_c', 'ucmm_linkedin_c', 'ucmm_google_c', 'ucmm_youtube_c', 'ucmm_instagram_c', 'ucmm_pinterest_c', 'ucmm_codepen_c' ); 54 $social_links = array( 'ucmm_facebook', 'ucmm_twitter', 'ucmm_linkedin', 'ucmm_google', 'ucmm_youtube', 'ucmm_instagram', 'ucmm_pinterest', 'ucmm_codepen' ); 55 56 $ucmm_social_icons = array(); 57 $ucmm_social_links = array(); 58 59 for( $i = 0; $i < count( $social_icons ) ; $i++ ){ 60 61 $ucmm_social_icons[ $social_icons[$i]] = ucmm_wpbrigade_default_option_key( $social_icons[$i], $ucmm_wpbrigade_array, ''); 62 $ucmm_social_links[ $social_links[$i]] = ucmm_wpbrigade_default_option_key( $social_links[$i], $ucmm_wpbrigade_array, ''); 63 53 64 } 54 else { 55 $_ucmm_logo = '';//get_bloginfo('name'); 56 } 65 57 66 ?> 58 67 <html xmlns="http://www.w3.org/1999/xhtml"> … … 67 76 <meta name="keywords" content="<?php echo $ucmm_seo_keywords;?>"> 68 77 <title><?php echo get_bloginfo('name'); ?></title> 78 79 <link href="<?php echo plugins_url( 'assets/css/fa-brands.min.css', __FILE__ ) ?>" rel="stylesheet"> 80 <link href="<?php echo plugins_url( 'assets/css/fontawesome.min.css', __FILE__ ) ?>" rel="stylesheet"> 81 82 <!--Adding Google analytics code--> 83 <?php if ( ! empty( $ucmm_ga_tracking_code ) ) : ?> 84 <?php echo $ucmm_ga_tracking_code; ?> 85 <?php endif; ?> 86 69 87 <style media="screen"> 70 88 html{ … … 77 95 text-align: center; 78 96 width: 100%; 79 background : url(<?php echo null != $ucmm_bg ? $ucmm_bg : plugins_url( 'img/coming-soon.png', __FILE__ ); ?>);97 background-image: url(<?php echo null != $ucmm_bg ? $ucmm_bg : plugins_url( 'img/coming-soon.png', __FILE__ ); ?>); 80 98 background-size: cover; 81 <?php if ( '' == $ucmm_logo ): ?>82 99 background-position: center; 83 <?php endif; ?>100 84 101 } 85 102 h1{ … … 96 113 <?php endif; ?> 97 114 vertical-align: middle; 98 text-align: center; 115 text-align: center; 99 116 width: 100%; 100 117 font-size: 50px; … … 103 120 } 104 121 .ucmm-logo img{ 105 width: <?php echo $ucmm_logo_width; ?>;106 height: <?php echo $ucmm_logo_height; ?>;122 width: <?php echo empty( $ucmm_logo_width )? '100px' : $ucmm_logo_width ; ?>; 123 height: <?php echo empty( $ucmm_logo_height )? '100px' : $ucmm_logo_height; ?>; 107 124 } 108 125 h2{ … … 127 144 color: #3BB9FF; 128 145 } 146 /* Icons style start here */ 147 .ucmm-social-icons{ 148 position: absolute; 149 bottom: 30px; 150 width: 100%; 151 left: 0; 152 } 153 .ucmm-icon{ 154 width: 40px; 155 height: 40px; 156 display: inline-block; 157 line-height: 40px; 158 border-radius: 50%; 159 margin: 5px; 160 } 161 .ucmm-icon .fab{ 162 color: #fff; 163 vertical-align: middle; 164 font-size: 18px; 165 line-height: 40px; 166 } 167 .ucmm-facebook-icon{ 168 background: #3b5998; 169 } 170 .ucmm-twitter-icon{ 171 background: #0084b4; 172 } 173 .ucmm-linkedin-icon{ 174 background: #0077B5; 175 } 176 .ucmm-google-icon{ 177 background: #d34836; 178 } 179 .ucmm-youtube-icon{ 180 background: #FF0000; 181 } 182 .ucmm-instagram-icon{ 183 background: #3f729b; 184 } 185 .ucmm-pinterest-icon{ 186 background: #C92228; 187 } 188 .ucmm-codepen-icon{ 189 background: #000; 190 } 191 /* Icons style end here */ 129 192 130 193 <?php if ( ! empty( $ucmm_custom_css ) ) : ?> … … 132 195 <?php endif; ?> 133 196 </style> 134 <?php if ( ! empty( $ucmm_ga_tracking_code ) ) : ?> 135 <?php echo $ucmm_ga_tracking_code; ?> 136 <?php endif; ?> 197 137 198 </head> 138 199 <body> 139 200 <div class="ucmm-logo"> 140 <?php echo $_ucmm_logo;?> 201 202 <img src="<?php echo $ucmm_logo?>" style="<?php echo ( '' == $ucmm_logo )? 'display:none' : '';?>" > 203 141 204 <h1><?php if ( $ucmm_header ) { 142 205 echo $ucmm_header; … … 151 214 152 215 </div> 216 217 <div class="ucmm-social-icons"> 218 <?php 219 /* 220 $social_icons =array( 'ucmm_facebook_c', 'ucmm_twitter_c', 'ucmm_linkedin_c', 'ucmm_google_c', 'ucmm_youtube_c', 'ucmm_instagram_c', 'ucmm_pinterest_c', 'ucmm_codepen_c' ); 221 $social_links = array( 'ucmm_facebook', 'ucmm_twitter', 'ucmm_linkedin', 'ucmm_google', 'ucmm_youtube', 'ucmm_instagram', 'ucmm_pinterest', 'ucmm_codepen' ); 222 */ 223 224 225 if ( true == $ucmm_social_icons['ucmm_facebook_c'] ) { 226 227 echo '<a class="ucmm-facebook-icon ucmm-icon" href="'. $ucmm_social_links['ucmm_facebook'] . '"><i class="fab fa-facebook-f"></i></a>'; 228 229 } 230 if ( true == $ucmm_social_icons['ucmm_twitter_c'] ) { 231 232 echo '<a class="ucmm-twitter-icon ucmm-icon" href="' . $ucmm_social_links['ucmm_twitter'] . '"><i class="fab fa-twitter"></i></a>'; 233 234 } 235 if ( true == $ucmm_social_icons['ucmm_linkedin_c'] ) { 236 237 echo '<a class="ucmm-linkedin-icon ucmm-icon" href="' . $ucmm_social_links['ucmm_linkedin'] . '"><i class="fab fa-linkedin"></i></a>'; 238 239 } 240 if ( true == $ucmm_social_icons['ucmm_google_c'] ) { 241 242 echo '<a class="ucmm-google-icon ucmm-icon" href="' .$ucmm_social_links['ucmm_google']. '"><i class="fab fa-google-plus-g"></i></a>'; 243 244 } 245 if( true == $ucmm_social_icons['ucmm_youtube_c'] ) { 246 247 echo '<a class="ucmm-youtube-icon ucmm-icon" href="' . $ucmm_social_links['ucmm_youtube'] . '"><i class="fab fa-youtube"></i></a>'; 248 249 } 250 if( true == $ucmm_social_icons['ucmm_instagram_c'] ) { 251 252 echo '<a class="ucmm-instagram-icon ucmm-icon" href="' . $ucmm_social_links['ucmm_instagram'] . '"><i class="fab fa-instagram"></i></a>'; 253 254 } 255 if( true == $ucmm_social_icons['ucmm_pinterest_c'] ) { 256 257 echo '<a class="ucmm-pinterest-icon ucmm-icon" href="'. $ucmm_social_links['ucmm_pinterest'] .'"><i class="fab fa-pinterest"></i></a>'; 258 259 } 260 if( true == $ucmm_social_icons['ucmm_codepen_c'] ) { 261 262 echo '<a class="ucmm-codepen-icon ucmm-icon" href="' . $ucmm_social_links['ucmm_codepen'] . '"><i class="fab fa-codepen"></i></a>'; 263 264 } 265 266 267 ?> 268 269 </div> 153 270 <?php if ( $ucmm_footer_love ) : ?> 154 271 <div class="footer-love"> -
under-construction-maintenance-mode/tags/1.0.4/under-construction-maintenance-mode.php
r1764507 r1850249 4 4 * Plugin URI: https://wpbrigade.com/wordpress/plugins/under-construction-maintenance-mode/ 5 5 * Description: This plugin will Display an Under Construction, Maintenance Mode or Coming Soon landing Page that takes 5 seconds to setup, while you're doing maintenance work on your site. 6 * Version: 1.0. 36 * Version: 1.0.4 7 7 * Author: WPBrigade 8 8 * Author URI: https://www.WPBrigade.com/ … … 28 28 * @var string 29 29 */ 30 public $version = '1.0. 3';30 public $version = '1.0.4'; 31 31 32 32 function __construct() { … … 153 153 function loginpress_customizer_js() { 154 154 wp_enqueue_script('jquery'); 155 wp_enqueue_script( 'ucmm-customize-control', plugins_url( 'assets/js/customize-controls.js' , __FILE__ ), array( 'jquery', 'customize-preview' ), UCMM_WPBRIGADE_VERSION, true ); 155 wp_enqueue_script( 'ucmm-customize-control', plugins_url( 'assets/js/customize-controls.js' , __FILE__ ), array( 'jquery', 'customize-preview' ), UCMM_WPBRIGADE_VERSION, true ); 156 wp_localize_script( 'ucmm-customize-control', 'UCMM', array( 'url_path'=> plugin_dir_url( __FILE__ ) ) ); 156 157 } 157 158 /** -
under-construction-maintenance-mode/trunk/assets/js/customize-controls.js
r1764507 r1850249 49 49 wp.customize( 'ucmm_wpbrigade_customization[ucmm_display_footer_text]', function( value ) { 50 50 value.bind( function( newval ) { 51 console.log(newval);52 51 if ( false == newval) { 53 52 $('#customize-preview iframe').contents().find( '.footer-love' ).hide(); … … 57 56 58 57 } ); 59 } ); 58 } ); 59 // change background image 60 wp.customize( 'ucmm_wpbrigade_customization[setting_background]', function( value ) { 61 value.bind( function( newval ) { 62 if ( '' !== newval) { 63 $('#customize-preview iframe').contents().find( 'body' ).css( { 'background-image': 'url('+ newval.toString() +')'} ); 64 } else{ 65 $('#customize-preview iframe').contents().find( 'body' ).css( { 'background-image': 'url("")'} ); 66 } 67 } ); 68 } ); 60 69 70 // change logo image 71 wp.customize( 'ucmm_wpbrigade_customization[ucmm_logo]', function( value ) { 72 value.bind( function( newval ) { 73 if ( '' !== newval) { 74 $('#customize-preview iframe').contents().find( '.ucmm-logo img' ).show(); 75 $('#customize-preview iframe').contents().find( '.ucmm-logo img' ).attr( 'src', newval) ; 76 } else{ 77 $('#customize-preview iframe').contents().find( '.ucmm-logo img' ).hide(); 78 } 79 } ); 80 } ); 81 // width change logo 82 wp.customize( 'ucmm_wpbrigade_customization[ucmm_logo_width]', function( value ) { 83 value.bind( function( newval ) { 84 $('#customize-preview iframe').contents().find( '.ucmm-logo img' ).css( {'width': newval }) ; 85 } ); 86 } ); 87 // height logo change 88 wp.customize( 'ucmm_wpbrigade_customization[ucmm_logo_height]', function( value ) { 89 value.bind( function( newval ) { 90 $('#customize-preview iframe').contents().find( '.ucmm-logo img' ).css( {'height': newval }) ; 91 } ); 92 } ); 61 93 94 //style apply 95 wp.customize( 'ucmm_wpbrigade_customization[ucmm_custom_css]', function( value ) { 96 value.bind( function( newval ) { 97 $('#customize-preview iframe').contents().find( 'style' ).append( newval) ; 98 } ); 99 } ); 62 100 63 101 64 102 65 103 } )( jQuery ); 104 105 -
under-construction-maintenance-mode/trunk/classes/customizer.php
r1764507 r1850249 49 49 'type' => 'option', 50 50 'capability' => 'manage_options', 51 //'transport' => 'postMessage'51 'transport' => 'postMessage' 52 52 ) ); 53 53 … … 76 76 'type' => 'option', 77 77 'capability' => 'manage_options', 78 //'transport' => 'postMessage'78 'transport' => 'postMessage' 79 79 )); 80 80 … … 98 98 'panel' => 'ucmm_wpbrigade_panel', 99 99 ) ); 100 101 $wp_customize->add_setting( 'ucmm_wpbrigade_customization[setting_background]', array(102 // 'default' => plugins_url( 'img/bg.jpg', __FILE__ ),100 101 $wp_customize->add_setting( 'ucmm_wpbrigade_customization[setting_background]', array( 102 'default' => UCMM_WPBRIGADE_DIR_URL . 'img/coming-soon.png', 103 103 'type' => 'option', 104 104 'capability' => 'manage_options', 105 //'transport' => 'postMessage'105 'transport' => 'postMessage' 106 106 ) ); 107 107 … … 260 260 261 261 $wp_customize->add_setting( 'ucmm_wpbrigade_customization[ucmm_custom_css]', array( 262 'default' => "/* You can add your custom CSS here. */",262 //'default' => "/* You can add your custom CSS here. */", 263 263 'type' => 'option', 264 264 'capability' => 'manage_options', … … 270 270 'type' => 'textarea', 271 271 'section' => 'ucmm_section_css', 272 'input_attrs' => array( 273 'placeholder' => __( 'You can add your custom CSS here.', 'ucmm-wpbrigade' ) ), 272 274 'priority' => 5, 273 275 'settings' => 'ucmm_wpbrigade_customization[ucmm_custom_css]' … … 331 333 332 334 $wp_customize->add_setting( 'ucmm_wpbrigade_customization[ucmm_ga_tracking_code]', array( 333 'default' => "/* Google Analytics Tracking Code here. */",335 //'default' => "/* Google Analytics Tracking Code here. */", 334 336 'type' => 'option', 335 337 'capability' => 'manage_options', … … 342 344 'section' => 'ucmm_ga_tracking_section', 343 345 'priority' => 5, 346 'input_attrs' => array( 347 'placeholder' => __( 'Google Analytics Tracking Code here.', 'ucmm-wpbrigade' ) ), 344 348 'settings' => 'ucmm_wpbrigade_customization[ucmm_ga_tracking_code]' 345 349 ) ); -
under-construction-maintenance-mode/trunk/classes/ucmm-wpbrigade-settings-api.php
r1605890 r1850249 103 103 if ( isset($section['desc']) && !empty($section['desc']) ) { 104 104 $section['desc'] = '<div class="inside">' . $section['desc'] . '</div>'; 105 $callback = c reate_function('', 'echo "' . str_replace( '"', '\"', $section['desc'] ) . '";');105 $callback = call_user_func( array( $this, 'get_description' ), $section['desc'] ); 106 106 } else if ( isset( $section['callback'] ) ) { 107 107 $callback = $section['callback']; … … 149 149 } 150 150 } 151 151 152 /** 153 * Get Section description. 154 * 155 * @param string $desc description. 156 * @since 1.0.4 157 * @return string $desc description of control. 158 */ 159 function get_description( $desc ) { 160 return $desc; 161 } 162 163 /** 164 * Prints out all settings sections added to a particular settings page 165 * 166 * @since 1.0.4 167 */ 168 function do_settings_sections( $page ) { 169 global $wp_settings_sections, $wp_settings_fields; 170 171 if ( !isset($wp_settings_sections) || !isset($wp_settings_sections[$page]) ) 172 return; 173 174 foreach ( (array) $wp_settings_sections[$page] as $section ) { 175 echo "<h3>{$section['title']}</h3>\n"; 176 echo $section['callback'] ; 177 if ( !isset($wp_settings_fields) || !isset($wp_settings_fields[$page]) || !isset($wp_settings_fields[$page][$section['id']]) ) 178 continue; 179 echo '<table class="form-table">'; 180 do_settings_fields($page, $section['id']); 181 echo '</table>'; 182 } 183 } 184 152 185 /** 153 186 * Get field description for display … … 510 543 do_action( 'wsa_form_top_' . $form['id'], $form ); 511 544 settings_fields( $form['id'] ); 512 do_settings_sections( $form['id'] );545 $this->do_settings_sections( $form['id'] ); 513 546 do_action( 'wsa_form_bottom_' . $form['id'], $form ); 514 547 if ( isset( $this->settings_fields[ $form['id'] ] ) ): … … 621 654 endif; 622 655 } 623 656 624 657 } 625 658 -
under-construction-maintenance-mode/trunk/readme.txt
r1764507 r1850249 5 5 Requires at least: 3.0 6 6 Tested up to: 4.9 7 Stable tag: 1.0. 37 Stable tag: 1.0.4 8 8 License: GPLv3 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 46 46 == Changelog == 47 47 48 = 1.0.4 - 2018-03-31 = 49 50 * New Feature: Social Icons. 51 * Enhancement: Logo Live Change in Customizer. 52 * Enhancement: Background Image Live Change in Customizer. 53 * Enhancement: Custom css Live Change in Customizer. 54 * Enhancement: Placeholder added for Google Analytics and Custom CSS control. 55 * Bug Fix: Deprecated function call on line number 105. 56 57 48 58 = 1.0.3 = 49 59 * New Feature: Custimize all the layout with WordPress Customizer and see it live preview along with changes live. … … 68 78 == Upgrade Notice == 69 79 70 = 1.0. 3=80 = 1.0.4 = 71 81 Upgrade Immediately - 4.9 Compatible and A whole set of NEW FEATURES for FREE :) -
under-construction-maintenance-mode/trunk/ucmm-customize.php
r1764507 r1850249 5 5 */ 6 6 $ucmm_wpbrigade_array = (array) get_option( 'ucmm_wpbrigade_customization' ); 7 7 8 8 9 function ucmm_wpbrigade_option_key( $ucmm_key, $ucmm_wpbrigade_array ) { … … 21 22 * @since 1.0.2 22 23 */ 23 function ucmm_wpbrigade_default_option_key( $ucmm_key, $ucmm_wpbrigade_array ) {24 function ucmm_wpbrigade_default_option_key( $ucmm_key, $ucmm_wpbrigade_array , $default = true ) { 24 25 25 26 if ( array_key_exists( $ucmm_key, $ucmm_wpbrigade_array ) ) { … … 29 30 } 30 31 else { 31 return true;32 return $default; 32 33 } 33 34 } … … 49 50 $ucmm_footer_love = ucmm_wpbrigade_default_option_key( 'ucmm_display_footer_text', $ucmm_wpbrigade_array); 50 51 51 if ( $ucmm_logo ) { 52 $_ucmm_logo = '<img src="'.$ucmm_logo.'" alt="">'; 52 53 $social_icons =array( 'ucmm_facebook_c', 'ucmm_twitter_c', 'ucmm_linkedin_c', 'ucmm_google_c', 'ucmm_youtube_c', 'ucmm_instagram_c', 'ucmm_pinterest_c', 'ucmm_codepen_c' ); 54 $social_links = array( 'ucmm_facebook', 'ucmm_twitter', 'ucmm_linkedin', 'ucmm_google', 'ucmm_youtube', 'ucmm_instagram', 'ucmm_pinterest', 'ucmm_codepen' ); 55 56 $ucmm_social_icons = array(); 57 $ucmm_social_links = array(); 58 59 for( $i = 0; $i < count( $social_icons ) ; $i++ ){ 60 61 $ucmm_social_icons[ $social_icons[$i]] = ucmm_wpbrigade_default_option_key( $social_icons[$i], $ucmm_wpbrigade_array, ''); 62 $ucmm_social_links[ $social_links[$i]] = ucmm_wpbrigade_default_option_key( $social_links[$i], $ucmm_wpbrigade_array, ''); 63 53 64 } 54 else { 55 $_ucmm_logo = '';//get_bloginfo('name'); 56 } 65 57 66 ?> 58 67 <html xmlns="http://www.w3.org/1999/xhtml"> … … 67 76 <meta name="keywords" content="<?php echo $ucmm_seo_keywords;?>"> 68 77 <title><?php echo get_bloginfo('name'); ?></title> 78 79 <link href="<?php echo plugins_url( 'assets/css/fa-brands.min.css', __FILE__ ) ?>" rel="stylesheet"> 80 <link href="<?php echo plugins_url( 'assets/css/fontawesome.min.css', __FILE__ ) ?>" rel="stylesheet"> 81 82 <!--Adding Google analytics code--> 83 <?php if ( ! empty( $ucmm_ga_tracking_code ) ) : ?> 84 <?php echo $ucmm_ga_tracking_code; ?> 85 <?php endif; ?> 86 69 87 <style media="screen"> 70 88 html{ … … 77 95 text-align: center; 78 96 width: 100%; 79 background : url(<?php echo null != $ucmm_bg ? $ucmm_bg : plugins_url( 'img/coming-soon.png', __FILE__ ); ?>);97 background-image: url(<?php echo null != $ucmm_bg ? $ucmm_bg : plugins_url( 'img/coming-soon.png', __FILE__ ); ?>); 80 98 background-size: cover; 81 <?php if ( '' == $ucmm_logo ): ?>82 99 background-position: center; 83 <?php endif; ?>100 84 101 } 85 102 h1{ … … 96 113 <?php endif; ?> 97 114 vertical-align: middle; 98 text-align: center; 115 text-align: center; 99 116 width: 100%; 100 117 font-size: 50px; … … 103 120 } 104 121 .ucmm-logo img{ 105 width: <?php echo $ucmm_logo_width; ?>;106 height: <?php echo $ucmm_logo_height; ?>;122 width: <?php echo empty( $ucmm_logo_width )? '100px' : $ucmm_logo_width ; ?>; 123 height: <?php echo empty( $ucmm_logo_height )? '100px' : $ucmm_logo_height; ?>; 107 124 } 108 125 h2{ … … 127 144 color: #3BB9FF; 128 145 } 146 /* Icons style start here */ 147 .ucmm-social-icons{ 148 position: absolute; 149 bottom: 30px; 150 width: 100%; 151 left: 0; 152 } 153 .ucmm-icon{ 154 width: 40px; 155 height: 40px; 156 display: inline-block; 157 line-height: 40px; 158 border-radius: 50%; 159 margin: 5px; 160 } 161 .ucmm-icon .fab{ 162 color: #fff; 163 vertical-align: middle; 164 font-size: 18px; 165 line-height: 40px; 166 } 167 .ucmm-facebook-icon{ 168 background: #3b5998; 169 } 170 .ucmm-twitter-icon{ 171 background: #0084b4; 172 } 173 .ucmm-linkedin-icon{ 174 background: #0077B5; 175 } 176 .ucmm-google-icon{ 177 background: #d34836; 178 } 179 .ucmm-youtube-icon{ 180 background: #FF0000; 181 } 182 .ucmm-instagram-icon{ 183 background: #3f729b; 184 } 185 .ucmm-pinterest-icon{ 186 background: #C92228; 187 } 188 .ucmm-codepen-icon{ 189 background: #000; 190 } 191 /* Icons style end here */ 129 192 130 193 <?php if ( ! empty( $ucmm_custom_css ) ) : ?> … … 132 195 <?php endif; ?> 133 196 </style> 134 <?php if ( ! empty( $ucmm_ga_tracking_code ) ) : ?> 135 <?php echo $ucmm_ga_tracking_code; ?> 136 <?php endif; ?> 197 137 198 </head> 138 199 <body> 139 200 <div class="ucmm-logo"> 140 <?php echo $_ucmm_logo;?> 201 202 <img src="<?php echo $ucmm_logo?>" style="<?php echo ( '' == $ucmm_logo )? 'display:none' : '';?>" > 203 141 204 <h1><?php if ( $ucmm_header ) { 142 205 echo $ucmm_header; … … 151 214 152 215 </div> 216 217 <div class="ucmm-social-icons"> 218 <?php 219 /* 220 $social_icons =array( 'ucmm_facebook_c', 'ucmm_twitter_c', 'ucmm_linkedin_c', 'ucmm_google_c', 'ucmm_youtube_c', 'ucmm_instagram_c', 'ucmm_pinterest_c', 'ucmm_codepen_c' ); 221 $social_links = array( 'ucmm_facebook', 'ucmm_twitter', 'ucmm_linkedin', 'ucmm_google', 'ucmm_youtube', 'ucmm_instagram', 'ucmm_pinterest', 'ucmm_codepen' ); 222 */ 223 224 225 if ( true == $ucmm_social_icons['ucmm_facebook_c'] ) { 226 227 echo '<a class="ucmm-facebook-icon ucmm-icon" href="'. $ucmm_social_links['ucmm_facebook'] . '"><i class="fab fa-facebook-f"></i></a>'; 228 229 } 230 if ( true == $ucmm_social_icons['ucmm_twitter_c'] ) { 231 232 echo '<a class="ucmm-twitter-icon ucmm-icon" href="' . $ucmm_social_links['ucmm_twitter'] . '"><i class="fab fa-twitter"></i></a>'; 233 234 } 235 if ( true == $ucmm_social_icons['ucmm_linkedin_c'] ) { 236 237 echo '<a class="ucmm-linkedin-icon ucmm-icon" href="' . $ucmm_social_links['ucmm_linkedin'] . '"><i class="fab fa-linkedin"></i></a>'; 238 239 } 240 if ( true == $ucmm_social_icons['ucmm_google_c'] ) { 241 242 echo '<a class="ucmm-google-icon ucmm-icon" href="' .$ucmm_social_links['ucmm_google']. '"><i class="fab fa-google-plus-g"></i></a>'; 243 244 } 245 if( true == $ucmm_social_icons['ucmm_youtube_c'] ) { 246 247 echo '<a class="ucmm-youtube-icon ucmm-icon" href="' . $ucmm_social_links['ucmm_youtube'] . '"><i class="fab fa-youtube"></i></a>'; 248 249 } 250 if( true == $ucmm_social_icons['ucmm_instagram_c'] ) { 251 252 echo '<a class="ucmm-instagram-icon ucmm-icon" href="' . $ucmm_social_links['ucmm_instagram'] . '"><i class="fab fa-instagram"></i></a>'; 253 254 } 255 if( true == $ucmm_social_icons['ucmm_pinterest_c'] ) { 256 257 echo '<a class="ucmm-pinterest-icon ucmm-icon" href="'. $ucmm_social_links['ucmm_pinterest'] .'"><i class="fab fa-pinterest"></i></a>'; 258 259 } 260 if( true == $ucmm_social_icons['ucmm_codepen_c'] ) { 261 262 echo '<a class="ucmm-codepen-icon ucmm-icon" href="' . $ucmm_social_links['ucmm_codepen'] . '"><i class="fab fa-codepen"></i></a>'; 263 264 } 265 266 267 ?> 268 269 </div> 153 270 <?php if ( $ucmm_footer_love ) : ?> 154 271 <div class="footer-love"> -
under-construction-maintenance-mode/trunk/under-construction-maintenance-mode.php
r1764507 r1850249 4 4 * Plugin URI: https://wpbrigade.com/wordpress/plugins/under-construction-maintenance-mode/ 5 5 * Description: This plugin will Display an Under Construction, Maintenance Mode or Coming Soon landing Page that takes 5 seconds to setup, while you're doing maintenance work on your site. 6 * Version: 1.0. 36 * Version: 1.0.4 7 7 * Author: WPBrigade 8 8 * Author URI: https://www.WPBrigade.com/ … … 28 28 * @var string 29 29 */ 30 public $version = '1.0. 3';30 public $version = '1.0.4'; 31 31 32 32 function __construct() { … … 153 153 function loginpress_customizer_js() { 154 154 wp_enqueue_script('jquery'); 155 wp_enqueue_script( 'ucmm-customize-control', plugins_url( 'assets/js/customize-controls.js' , __FILE__ ), array( 'jquery', 'customize-preview' ), UCMM_WPBRIGADE_VERSION, true ); 155 wp_enqueue_script( 'ucmm-customize-control', plugins_url( 'assets/js/customize-controls.js' , __FILE__ ), array( 'jquery', 'customize-preview' ), UCMM_WPBRIGADE_VERSION, true ); 156 wp_localize_script( 'ucmm-customize-control', 'UCMM', array( 'url_path'=> plugin_dir_url( __FILE__ ) ) ); 156 157 } 157 158 /**
Note: See TracChangeset
for help on using the changeset viewer.