Plugin Directory

Changeset 2985037


Ignore:
Timestamp:
10/27/2023 03:12:04 PM (2 years ago)
Author:
HappyKite
Message:

Version 1.9.3 Released

  • UPDATE - Tested on WordPress 6.3.2.
  • UPDATE - Working for PHP 8+.
Location:
ultimate-under-construction
Files:
27 added
3 edited

Legend:

Unmodified
Added
Removed
  • ultimate-under-construction/trunk/includes/uucadmin.php

    r2750860 r2985037  
    1414            <?php
    1515            //Current version of WP seems to fall over on unticked Checkboxes... This is to tidy it up and stop unwanted 'Notices'
    16             //Enable Checkbox Sanitization
    17             if ( ! isset( $uuc_options['enable'] ) || $uuc_options['enable'] != '1' )
    18               $uuc_options['enable'] = 0;
    19             else
    20               $uuc_options['enable'] = 1;
     16            if ( !empty( $uuc_options ) ) {
     17                //Enable Checkbox Sanitization
     18                if ( ! isset( $uuc_options['enable'] ) || $uuc_options['enable'] != '1' ) {
     19                    $uuc_options['enable'] = 0;
     20                } else {
     21                    $uuc_options['enable'] = 1;
     22                }
    2123
    22             //Countdown Checkbox Sanitization
    23             if ( ! isset( $uuc_options['cdenable'] ) || $uuc_options['cdenable'] != '1' )
    24               $uuc_options['cdenable'] = 0;
    25             else
    26               $uuc_options['cdenable'] = 1;
     24                //Countdown Checkbox Sanitization
     25                if ( ! isset( $uuc_options['cdenable'] ) || $uuc_options['cdenable'] != '1' ) {
     26                    $uuc_options['cdenable'] = 0;
     27                } else {
     28                    $uuc_options['cdenable'] = 1;
     29                }
     30            }
    2731
    2832            settings_fields('uuc_settings_group'); ?>
     
    3034            <h4 class="uuc-title"><?php _e('Enable', 'ultimate-under-construction'); ?></h4>
    3135            <p>             
    32                 <input id="uuc_settings[enable]" name="uuc_settings[enable]" type="checkbox" value="1" <?php checked($uuc_options['enable'], '1'); ?>/>
     36                <input id="uuc_settings[enable]" name="uuc_settings[enable]" type="checkbox" value="1" <?php checked( ( !empty($uuc_options) ) ? $uuc_options['enable'] : '0', '1'); ?>/>
    3337                <label class="description" for="uuc_settings[enable]"><?php _e('Enable the Under Construction Page','ultimate-under-construction'); ?></label>
    3438
     
    3640            <p>
    3741                <label><input onclick="checkPage()" type="radio" name="uuc_settings[holdingpage_type]" id="htmlblock" value="htmlblock"<?php if(!isset($uuc_options['holdingpage_type'])){ ?> checked <?php } else { checked( 'htmlblock' == $uuc_options['holdingpage_type'] ); } ?> /> HTML Block</label><br />
    38                 <label><input onclick="checkPage()" type="radio" name="uuc_settings[holdingpage_type]" id="custom" value="custom"<?php checked( 'custom' == $uuc_options['holdingpage_type'] ); ?> /> Custom Build</label><br />
     42                <label><input onclick="checkPage()" type="radio" name="uuc_settings[holdingpage_type]" id="custom" value="custom"<?php checked( ( !empty($uuc_options) ) ? 'custom' == $uuc_options['holdingpage_type'] : '' ); ?> /> Custom Build</label><br />
    3943            </p>
    4044
    41             <div id="htmlblockbg" <?php if ($uuc_options['holdingpage_type'] == "custom"){ ?> style="visibiliy: hidden; display: none;"<?php }; ?>>
     45            <div id="htmlblockbg" <?php if ( !empty($uuc_options) && $uuc_options['holdingpage_type'] == "custom" ){ ?> style="visibiliy: hidden; display: none;"<?php }; ?>>
    4246                <h4 class="uuc-title"><?php _e('HTML Block', 'ultimate-under-construction'); ?></h4>
    4347                <p>
     
    4751            </div>
    4852
    49             <div id="custombg" <?php if ($uuc_options['holdingpage_type'] == "htmlblock"){ ?> style="visibility: hidden; display: none;"<?php }; ?>>
     53            <div id="custombg" <?php if ( ( !empty($uuc_options) ) ? $uuc_options['holdingpage_type'] == "htmlblock" : ''){ ?> style="visibility: hidden; display: none;"<?php }; ?>>
    5054                <h4 class="uuc-title"><?php _e('Website Title', 'ultimate-under-construction'); ?></h4>
    5155                <p>
    52                     <input id="uuc_settings[website_name]" name="uuc_settings[website_name]" type="text" value="<?php echo $uuc_options['website_name']; ?>"/>
     56                    <input id="uuc_settings[website_name]" name="uuc_settings[website_name]" type="text" value="<?php echo ( !empty($uuc_options) ) ? $uuc_options['website_name'] : ''; ?>"/>
    5357                    <label class="description" for="uuc_settings[website_name]"><?php _e('Enter the Title of your website', 'ultimate-under-construction'); ?></label>
    5458                </p>
     
    5660                <h4 class="uuc-title"><?php _e('Holding Message', 'ultimate-under-construction'); ?></h4>
    5761                <p>
    58                     <textarea id="uuc_settings[holding_message]" name="uuc_settings[holding_message]" rows="5" cols="50"><?php echo $uuc_options['holding_message'] ?></textarea>
     62                    <textarea id="uuc_settings[holding_message]" name="uuc_settings[holding_message]" rows="5" cols="50"><?php echo ( !empty($uuc_options) ) ? $uuc_options['holding_message'] : ''; ?></textarea><br />
    5963                    <label class="description" for="uuc_settings[holding_message]"><?php _e('Enter a message to appear below the Website Title', 'ultimate-under-construction'); ?></label>
    6064                </p>
     
    6266                <h4 class="uuc-title"><?php _e('Countdown Timer', 'ultimate-under-construction'); ?></h4>
    6367                <p>
    64                     <input id="uuc_settings[cdenable]" name="uuc_settings[cdenable]" type="checkbox" value="1" <?php checked($uuc_options['cdenable'], '1'); ?>/>
     68                    <input id="uuc_settings[cdenable]" name="uuc_settings[cdenable]" type="checkbox" value="1" <?php checked( ( !empty($uuc_options) ) ? $uuc_options['cdenable'] : '0', '1'); ?>/>
    6569                    <label class="description" for="uuc_settings[cdenable]"><?php _e('Enable the Countdown Timer?','ultimate-under-construction'); ?></label>
    6670                    <br />
    6771                    <br />
    6872                    <label><input type="radio" name="uuc_settings[cd_style]" id="flipclock" value="flipclock"<?php if(!isset($uuc_options['cd_style'])){ ?> checked <?php } else { checked( 'flipclock' == $uuc_options['cd_style'] ); } ?> /> Flip Clock / </label>
    69                     <label><input type="radio" name="uuc_settings[cd_style]" id="textclock" value="textclock"<?php checked( 'textclock' == $uuc_options['cd_style'] ); ?> /> Text only.</label>
     73                    <label><input type="radio" name="uuc_settings[cd_style]" id="textclock" value="textclock"<?php checked( ( !empty($uuc_options) ) ? 'textclock' == $uuc_options['cd_style'] : '' ); ?> /> Text only.</label>
    7074                    <br />
    7175                    <br />
    72                     <input id="uuc_settings[cdday]" name="uuc_settings[cdday]" type="text" value="<?php echo $uuc_options['cdday']; ?>"/>
     76                    <input id="uuc_settings[cdday]" name="uuc_settings[cdday]" type="text" value="<?php echo ( !empty($uuc_options) ) ? $uuc_options['cdday'] : ''; ?>"/>
    7377                    <label class="description" for="uuc_settings[cdday]"><?php _e('Enter the Date - e.g. 14', 'ultimate-under-construction'); ?></label>
    7478                    <br />
    75                     <input id="uuc_settings[cdmonth]" name="uuc_settings[cdmonth]" type="text" value="<?php echo $uuc_options['cdmonth']; ?>"/>
     79                    <input id="uuc_settings[cdmonth]" name="uuc_settings[cdmonth]" type="text" value="<?php echo ( !empty($uuc_options) ) ? $uuc_options['cdmonth'] : ''; ?>"/>
    7680                    <label class="description" for="uuc_settings[cdmonth]"><?php _e('Enter the Month - e.g. 2', 'ultimate-under-construction'); ?></label>
    7781                    <br />
    78                     <input id="uuc_settings[cdyear]" name="uuc_settings[cdyear]" type="text" value="<?php echo $uuc_options['cdyear']; ?>"/>
     82                    <input id="uuc_settings[cdyear]" name="uuc_settings[cdyear]" type="text" value="<?php echo ( !empty($uuc_options) ) ? $uuc_options['cdyear'] : ''; ?>"/>
    7983                    <label class="description" for="uuc_settings[cdyear]"><?php _e('Enter the Year -  e.g. 2014', 'ultimate-under-construction'); ?></label>
    8084                    <br />
    81                     <input id="uuc_settings[cdtext]" name="uuc_settings[cdtext]" type="text" value="<?php echo $uuc_options['cdtext']; ?>"/>
     85                    <input id="uuc_settings[cdtext]" name="uuc_settings[cdtext]" type="text" value="<?php echo ( !empty($uuc_options) ) ? $uuc_options['cdtext'] : ''; ?>"/>
    8286                    <label class="description" for="uuc_settings[cdtext]"><?php _e('Enter the Countdown text - e.g. Till the site goes live!', 'ultimate-under-construction'); ?></label>
    8387                </p>
     
    8690                <p>
    8791                    <label><input onclick="checkEm()" type="radio" name="uuc_settings[background_style]" id="solidcolor" value="solidcolor"<?php if(!isset($uuc_options['background_style'])){ ?> checked <?php } else { checked( 'solidcolor' == $uuc_options['background_style'] ); } ?> /> Solid Colour</label><br />
    88                     <label><input onclick="checkEm()" type="radio" name="uuc_settings[background_style]" id="patterned" value="patterned"<?php checked( 'patterned' == $uuc_options['background_style'] ); ?> /> Patterned Background</label>
     92                    <label><input onclick="checkEm()" type="radio" name="uuc_settings[background_style]" id="patterned" value="patterned"<?php checked( ( !empty($uuc_options) ) ? 'patterned' == $uuc_options['background_style'] : '' ); ?> /> Patterned Background</label>
    8993                </p>
    9094
    9195                <?php if ( $wp_version >= 3.5 ){ ?>
    92                 <div id="solidcolorbg" <?php if($uuc_options['background_style'] == "patterned"){ ?>style="visibility: hidden; display: none;"<?php }; ?>>
     96                <div id="solidcolorbg" <?php if( !empty( $uuc_options ) && $uuc_options['background_style'] == "patterned"){ ?>style="visibility: hidden; display: none;"<?php }; ?>>
    9397                    <h4 class="uuc-title"><?php _e('Background Colour', 'ultimate-under-construction'); ?></h4>
    9498                    <p>
     
    98102                </div>
    99103                <?php } else { ?>
    100                 <div id="solidcolorbg" <?php if($uuc_options['background_style'] == "patterned"){ ?>style="visibility: hidden; display: none;"<?php }; ?>>
     104                <div id="solidcolorbg" <?php if( !empty( $uuc_options ) && $uuc_options['background_style'] == "patterned"){ ?>style="visibility: hidden; display: none;"<?php }; ?>>
    101105                    <h4 class="uuc-title"><?php _e('Background Colour', 'ultimate-under-construction'); ?></h4>
    102106                    <p>
     
    109113                <?php } ?>
    110114
    111                 <div id="patternedbg" <?php if($uuc_options['background_style'] == "solidcolor"){ ?>style="visibility: hidden; display: none;"<?php }; ?>>
     115                <div id="patternedbg" <?php if(!empty( $uuc_options ) && $uuc_options['background_style'] == "solidcolor"){ ?>style="visibility: hidden; display: none;"<?php }; ?>>
    112116                    <h4 class="uuc-title"><?php _e('Background Choice', 'ultimate-under-construction'); ?></h4>
    113117                    <label><input type="radio" name="uuc_settings[background_styling]" id="background_choice_one" value="squairylight"<?php checked( 'squairylight' == isset($uuc_options['background_styling']) ); ?> /> Squairy</label><br />
  • ultimate-under-construction/trunk/readme.txt

    r2750860 r2985037  
    33Tags: Under construction, holding page, construction, holding, page, private, preview, coming soon
    44Requires at least: 3.0.1
    5 Tested up to: 6.0
    6 Stable tag: 1.9.2
     5Tested up to: 6.3.2
     6Stable tag: 1.9.3
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2626
    2727== Changelog ==
     28= 1.9.3 - 27th October 2023 =
     29* UPDATE - Tested on WordPress 6.3.2.
     30* UPDATE - Working for PHP 8+.
     31
    2832= 1.9.2 - 1st July 2022 =
    2933* NEW - Adding i18n Text Domain.
  • ultimate-under-construction/trunk/ultimate-under-construction.php

    r2750860 r2985037  
    33Plugin Name: Ultimate Under Construction page
    44Plugin URI: http://www.happykite.co.uk
    5 Description: Once Active this will replace your Wordpress site with a customizable Under Construction holding page. Admins will still be able to log in and see the original site.
    6 Author: HappyKite, Morrowmedia
     5Description: Once Active this will replace your WordPress site with a customizable Under Construction holding page. Admins will still be able to log in and see the original site.
     6Author: HappyKite
    77Author URI: http://www.happykite.co.uk/
    8 Version: 1.9.2
     8Version: 1.9.3
    99Text Domain: ultimate-under-construction
    1010Domain Path: /languages
Note: See TracChangeset for help on using the changeset viewer.