Plugin Directory

Changeset 1850249


Ignore:
Timestamp:
03/30/2018 07:50:21 PM (8 years ago)
Author:
WPBrigade
Message:

1.0.4 release and tagging

Location:
under-construction-maintenance-mode
Files:
20 added
7 edited
6 copied

Legend:

Unmodified
Added
Removed
  • under-construction-maintenance-mode/tags/1.0.4/assets/js/customize-controls.js

    r1764507 r1850249  
    4949    wp.customize( 'ucmm_wpbrigade_customization[ucmm_display_footer_text]', function( value ) {
    5050        value.bind( function( newval ) {
    51       console.log(newval);
    5251      if ( false == newval) {
    5352        $('#customize-preview iframe').contents().find( '.footer-love' ).hide();
     
    5756
    5857        } );
    59     } );
     58  } );
     59// change background image
     60wp.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} );
    6069
     70// change  logo image
     71wp.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
     82wp.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
     88wp.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} );
    6193
     94//style apply
     95wp.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} );
    62100
    63101
    64102
    65103} )( jQuery );
     104
     105
  • under-construction-maintenance-mode/tags/1.0.4/classes/customizer.php

    r1764507 r1850249  
    4949      'type'                    => 'option',
    5050      'capability'      => 'manage_options',
    51       // 'transport'      => 'postMessage'
     51      'transport'      => 'postMessage'
    5252    ) );
    5353
     
    7676        'type'                      => 'option',
    7777        'capability'            => 'manage_options',
    78         // 'transport'       => 'postMessage'
     78        'transport'       => 'postMessage'
    7979      ));
    8080
     
    9898      'panel'                => 'ucmm_wpbrigade_panel',
    9999    ) );
    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',
    103103      'type'                     => 'option',
    104104      'capability'       => 'manage_options',
    105       // 'transport'      => 'postMessage'
     105      'transport'      => 'postMessage'
    106106    ) );
    107107
     
    260260
    261261    $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. */",
    263263      'type'                        => 'option',
    264264      'capability'          => 'manage_options',
     
    270270      'type'                         => 'textarea',
    271271      'section'                  => 'ucmm_section_css',
     272      'input_attrs' => array(
     273      'placeholder' => __( 'You can add your custom CSS here.', 'ucmm-wpbrigade' ) ),
    272274      'priority'                 => 5,
    273275      'settings'                 => 'ucmm_wpbrigade_customization[ucmm_custom_css]'
     
    331333
    332334    $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. */",
    334336      'type'                        => 'option',
    335337      'capability'          => 'manage_options',
     
    342344      'section'                  => 'ucmm_ga_tracking_section',
    343345      'priority'                 => 5,
     346      'input_attrs' => array(
     347        'placeholder' => __( 'Google Analytics Tracking Code here.', 'ucmm-wpbrigade' ) ),
    344348      'settings'                 => 'ucmm_wpbrigade_customization[ucmm_ga_tracking_code]'
    345349    ) );
  • under-construction-maintenance-mode/tags/1.0.4/classes/ucmm-wpbrigade-settings-api.php

    r1605890 r1850249  
    103103        if ( isset($section['desc']) && !empty($section['desc']) ) {
    104104          $section['desc'] = '<div class="inside">' . $section['desc'] . '</div>';
    105           $callback = create_function('', 'echo "' . str_replace( '"', '\"', $section['desc'] ) . '";');
     105          $callback = call_user_func( array( $this, 'get_description' ), $section['desc']  );
    106106        } else if ( isset( $section['callback'] ) ) {
    107107          $callback = $section['callback'];
     
    149149      }
    150150    }
    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     
    152185    /**
    153186    * Get field description for display
     
    510543              do_action( 'wsa_form_top_' . $form['id'], $form );
    511544              settings_fields( $form['id'] );
    512               do_settings_sections( $form['id'] );
     545              $this->do_settings_sections( $form['id'] );
    513546              do_action( 'wsa_form_bottom_' . $form['id'], $form );
    514547              if ( isset( $this->settings_fields[ $form['id'] ] ) ):
     
    621654        endif;
    622655      }
    623 
     656     
    624657    }
    625658
  • under-construction-maintenance-mode/tags/1.0.4/readme.txt

    r1764507 r1850249  
    55Requires at least: 3.0
    66Tested up to: 4.9
    7 Stable tag: 1.0.3
     7Stable tag: 1.0.4
    88License: GPLv3 or later
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    4646== Changelog ==
    4747
     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
    4858= 1.0.3 =
    4959* New Feature: Custimize all the layout with WordPress Customizer and see it live preview along with changes live.
     
    6878== Upgrade Notice ==
    6979
    70 = 1.0.3 =
     80= 1.0.4 =
    7181Upgrade 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  
    55*/
    66$ucmm_wpbrigade_array = (array) get_option( 'ucmm_wpbrigade_customization' );
     7
    78
    89function ucmm_wpbrigade_option_key( $ucmm_key, $ucmm_wpbrigade_array ) {
     
    2122* @since 1.0.2
    2223*/
    23 function ucmm_wpbrigade_default_option_key( $ucmm_key, $ucmm_wpbrigade_array ) {
     24function ucmm_wpbrigade_default_option_key( $ucmm_key, $ucmm_wpbrigade_array , $default = true ) {
    2425
    2526    if ( array_key_exists( $ucmm_key, $ucmm_wpbrigade_array ) ) {
     
    2930    }
    3031    else {
    31         return true;
     32        return $default;
    3233    }
    3334}
     
    4950$ucmm_footer_love = ucmm_wpbrigade_default_option_key( 'ucmm_display_footer_text', $ucmm_wpbrigade_array);
    5051
    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
     59for( $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
    5364}
    54 else {
    55     $_ucmm_logo = '';//get_bloginfo('name');
    56 }
     65
    5766?>
    5867<html xmlns="http://www.w3.org/1999/xhtml">
     
    6776    <meta name="keywords" content="<?php echo $ucmm_seo_keywords;?>">
    6877    <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
    6987    <style media="screen">
    7088    html{
     
    7795        text-align: center;
    7896        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__ ); ?>);
    8098        background-size: cover;
    81         <?php if ( '' == $ucmm_logo ): ?>
    8299        background-position: center;
    83         <?php endif; ?>
     100       
    84101    }
    85102    h1{
     
    96113        <?php endif; ?>
    97114        vertical-align: middle;
    98         text-align: center;
     115        text-align: center; 
    99116        width: 100%;
    100117        font-size: 50px;
     
    103120    }
    104121    .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; ?>;
    107124    }
    108125    h2{
     
    127144        color: #3BB9FF;
    128145    }
     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 */
    129192
    130193    <?php if ( ! empty( $ucmm_custom_css ) ) : ?>
     
    132195    <?php endif; ?>
    133196    </style>
    134 <?php if ( ! empty( $ucmm_ga_tracking_code ) ) : ?>
    135 <?php echo $ucmm_ga_tracking_code; ?>
    136 <?php endif; ?>
     197
    137198</head>
    138199<body>
    139200    <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
    141204        <h1><?php if ( $ucmm_header ) {
    142205            echo $ucmm_header;
     
    151214
    152215    </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>
    153270    <?php if ( $ucmm_footer_love ) : ?>
    154271        <div class="footer-love">
  • under-construction-maintenance-mode/tags/1.0.4/under-construction-maintenance-mode.php

    r1764507 r1850249  
    44* Plugin URI: https://wpbrigade.com/wordpress/plugins/under-construction-maintenance-mode/
    55* 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.3
     6* Version: 1.0.4
    77* Author: WPBrigade
    88* Author URI: https://www.WPBrigade.com/
     
    2828    * @var string
    2929    */
    30     public $version = '1.0.3';
     30    public $version = '1.0.4';
    3131
    3232    function __construct() {
     
    153153  function loginpress_customizer_js() {
    154154    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__ ) ) );
    156157  }
    157158    /**
  • under-construction-maintenance-mode/trunk/assets/js/customize-controls.js

    r1764507 r1850249  
    4949    wp.customize( 'ucmm_wpbrigade_customization[ucmm_display_footer_text]', function( value ) {
    5050        value.bind( function( newval ) {
    51       console.log(newval);
    5251      if ( false == newval) {
    5352        $('#customize-preview iframe').contents().find( '.footer-love' ).hide();
     
    5756
    5857        } );
    59     } );
     58  } );
     59// change background image
     60wp.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} );
    6069
     70// change  logo image
     71wp.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
     82wp.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
     88wp.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} );
    6193
     94//style apply
     95wp.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} );
    62100
    63101
    64102
    65103} )( jQuery );
     104
     105
  • under-construction-maintenance-mode/trunk/classes/customizer.php

    r1764507 r1850249  
    4949      'type'                    => 'option',
    5050      'capability'      => 'manage_options',
    51       // 'transport'      => 'postMessage'
     51      'transport'      => 'postMessage'
    5252    ) );
    5353
     
    7676        'type'                      => 'option',
    7777        'capability'            => 'manage_options',
    78         // 'transport'       => 'postMessage'
     78        'transport'       => 'postMessage'
    7979      ));
    8080
     
    9898      'panel'                => 'ucmm_wpbrigade_panel',
    9999    ) );
    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',
    103103      'type'                     => 'option',
    104104      'capability'       => 'manage_options',
    105       // 'transport'      => 'postMessage'
     105      'transport'      => 'postMessage'
    106106    ) );
    107107
     
    260260
    261261    $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. */",
    263263      'type'                        => 'option',
    264264      'capability'          => 'manage_options',
     
    270270      'type'                         => 'textarea',
    271271      'section'                  => 'ucmm_section_css',
     272      'input_attrs' => array(
     273      'placeholder' => __( 'You can add your custom CSS here.', 'ucmm-wpbrigade' ) ),
    272274      'priority'                 => 5,
    273275      'settings'                 => 'ucmm_wpbrigade_customization[ucmm_custom_css]'
     
    331333
    332334    $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. */",
    334336      'type'                        => 'option',
    335337      'capability'          => 'manage_options',
     
    342344      'section'                  => 'ucmm_ga_tracking_section',
    343345      'priority'                 => 5,
     346      'input_attrs' => array(
     347        'placeholder' => __( 'Google Analytics Tracking Code here.', 'ucmm-wpbrigade' ) ),
    344348      'settings'                 => 'ucmm_wpbrigade_customization[ucmm_ga_tracking_code]'
    345349    ) );
  • under-construction-maintenance-mode/trunk/classes/ucmm-wpbrigade-settings-api.php

    r1605890 r1850249  
    103103        if ( isset($section['desc']) && !empty($section['desc']) ) {
    104104          $section['desc'] = '<div class="inside">' . $section['desc'] . '</div>';
    105           $callback = create_function('', 'echo "' . str_replace( '"', '\"', $section['desc'] ) . '";');
     105          $callback = call_user_func( array( $this, 'get_description' ), $section['desc']  );
    106106        } else if ( isset( $section['callback'] ) ) {
    107107          $callback = $section['callback'];
     
    149149      }
    150150    }
    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     
    152185    /**
    153186    * Get field description for display
     
    510543              do_action( 'wsa_form_top_' . $form['id'], $form );
    511544              settings_fields( $form['id'] );
    512               do_settings_sections( $form['id'] );
     545              $this->do_settings_sections( $form['id'] );
    513546              do_action( 'wsa_form_bottom_' . $form['id'], $form );
    514547              if ( isset( $this->settings_fields[ $form['id'] ] ) ):
     
    621654        endif;
    622655      }
    623 
     656     
    624657    }
    625658
  • under-construction-maintenance-mode/trunk/readme.txt

    r1764507 r1850249  
    55Requires at least: 3.0
    66Tested up to: 4.9
    7 Stable tag: 1.0.3
     7Stable tag: 1.0.4
    88License: GPLv3 or later
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    4646== Changelog ==
    4747
     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
    4858= 1.0.3 =
    4959* New Feature: Custimize all the layout with WordPress Customizer and see it live preview along with changes live.
     
    6878== Upgrade Notice ==
    6979
    70 = 1.0.3 =
     80= 1.0.4 =
    7181Upgrade Immediately - 4.9 Compatible and A whole set of NEW FEATURES for FREE :)
  • under-construction-maintenance-mode/trunk/ucmm-customize.php

    r1764507 r1850249  
    55*/
    66$ucmm_wpbrigade_array = (array) get_option( 'ucmm_wpbrigade_customization' );
     7
    78
    89function ucmm_wpbrigade_option_key( $ucmm_key, $ucmm_wpbrigade_array ) {
     
    2122* @since 1.0.2
    2223*/
    23 function ucmm_wpbrigade_default_option_key( $ucmm_key, $ucmm_wpbrigade_array ) {
     24function ucmm_wpbrigade_default_option_key( $ucmm_key, $ucmm_wpbrigade_array , $default = true ) {
    2425
    2526    if ( array_key_exists( $ucmm_key, $ucmm_wpbrigade_array ) ) {
     
    2930    }
    3031    else {
    31         return true;
     32        return $default;
    3233    }
    3334}
     
    4950$ucmm_footer_love = ucmm_wpbrigade_default_option_key( 'ucmm_display_footer_text', $ucmm_wpbrigade_array);
    5051
    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
     59for( $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
    5364}
    54 else {
    55     $_ucmm_logo = '';//get_bloginfo('name');
    56 }
     65
    5766?>
    5867<html xmlns="http://www.w3.org/1999/xhtml">
     
    6776    <meta name="keywords" content="<?php echo $ucmm_seo_keywords;?>">
    6877    <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
    6987    <style media="screen">
    7088    html{
     
    7795        text-align: center;
    7896        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__ ); ?>);
    8098        background-size: cover;
    81         <?php if ( '' == $ucmm_logo ): ?>
    8299        background-position: center;
    83         <?php endif; ?>
     100       
    84101    }
    85102    h1{
     
    96113        <?php endif; ?>
    97114        vertical-align: middle;
    98         text-align: center;
     115        text-align: center; 
    99116        width: 100%;
    100117        font-size: 50px;
     
    103120    }
    104121    .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; ?>;
    107124    }
    108125    h2{
     
    127144        color: #3BB9FF;
    128145    }
     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 */
    129192
    130193    <?php if ( ! empty( $ucmm_custom_css ) ) : ?>
     
    132195    <?php endif; ?>
    133196    </style>
    134 <?php if ( ! empty( $ucmm_ga_tracking_code ) ) : ?>
    135 <?php echo $ucmm_ga_tracking_code; ?>
    136 <?php endif; ?>
     197
    137198</head>
    138199<body>
    139200    <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
    141204        <h1><?php if ( $ucmm_header ) {
    142205            echo $ucmm_header;
     
    151214
    152215    </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>
    153270    <?php if ( $ucmm_footer_love ) : ?>
    154271        <div class="footer-love">
  • under-construction-maintenance-mode/trunk/under-construction-maintenance-mode.php

    r1764507 r1850249  
    44* Plugin URI: https://wpbrigade.com/wordpress/plugins/under-construction-maintenance-mode/
    55* 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.3
     6* Version: 1.0.4
    77* Author: WPBrigade
    88* Author URI: https://www.WPBrigade.com/
     
    2828    * @var string
    2929    */
    30     public $version = '1.0.3';
     30    public $version = '1.0.4';
    3131
    3232    function __construct() {
     
    153153  function loginpress_customizer_js() {
    154154    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__ ) ) );
    156157  }
    157158    /**
Note: See TracChangeset for help on using the changeset viewer.