Plugin Directory

Changeset 3158884


Ignore:
Timestamp:
09/27/2024 04:39:45 PM (18 months ago)
Author:
HappyKite
Message:

Version 1.9.5 release

Location:
ultimate-under-construction
Files:
29 added
5 edited

Legend:

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

    r3065415 r3158884  
    1313 */
    1414function uuc_enqueue_scripts() {
    15     wp_enqueue_script( 'uuc_base', UUC_PLUGIN_URL . 'js/base.js', array(), filemtime( UUC_PLUGIN_DIR . 'js/base.js' ), array( 'in_footer' => false ) );
    16     wp_enqueue_script( 'uuc_flipclock', UUC_PLUGIN_URL . 'js/flipclock.js', array(), filemtime( UUC_PLUGIN_DIR . 'js/flipclock.js' ), array( 'in_footer' => false ) );
    17     wp_enqueue_script( 'uuc_counter', UUC_PLUGIN_URL . 'js/dailycounter.js', array(), filemtime( UUC_PLUGIN_DIR . 'js/dailycounter.js' ), array( 'in_footer' => false ) );
    18 
    19     wp_enqueue_style( 'uuc_flipclock_styles', UUC_PLUGIN_URL . 'css/base.css', array(), filemtime( UUC_PLUGIN_DIR . 'css/base.css' ), array( 'in_footer' => false ) );
     15    wp_enqueue_script( 'uuc_base', UUC_PLUGIN_URL . 'js/base.js', array(), UUC_VERSION, false );
     16    wp_enqueue_script( 'uuc_flipclock', UUC_PLUGIN_URL . 'js/flipclock.js', array(), UUC_VERSION, false );
     17    wp_enqueue_script( 'uuc_counter', UUC_PLUGIN_URL . 'js/dailycounter.js', array(), UUC_VERSION, false );
     18
     19    wp_enqueue_style( 'uuc_flipclock_styles', UUC_PLUGIN_URL . 'css/base.css', array(), UUC_VERSION, false );
    2020}
    2121
    2222// Display functions for outputting data.
    23 add_filter( 'get_header', 'uuc_add_content' );
    24 
    25 /**
    26  * Add UUC Content.
    27  */
    28 function uuc_add_content() {
     23if ( ! wp_is_block_theme() ) {
     24    add_filter( 'get_header', 'uuc_add_content' );
     25} else {
     26    add_filter( 'template_include', 'uuc_add_content_checker' );
     27}
     28
     29function uuc_add_content_checker( $template ) {
    2930    global $uuc_options;
    3031
     
    3637        $uuc_options['enable'] = 1;
    3738    }
     39
     40    if ( ! $uuc_options['enable'] ) {
     41        return $template;
     42    }
     43
     44    uuc_add_content();
     45}
     46
     47/**
     48 * Add UUC Content.
     49 */
     50function uuc_add_content() {
     51    global $uuc_options;
     52
     53    // Current version of WP seems to fall over on unticked Checkboxes... This is to tidy it up and stop unwanted 'Notices'.
     54    // Enable Checkbox Sanitization.
     55    if ( ! isset( $uuc_options['enable'] ) || '1' != $uuc_options['enable'] ) {
     56        $uuc_options['enable'] = 0;
     57    } else {
     58        $uuc_options['enable'] = 1;
     59    }
     60
     61    nocache_headers();
    3862
    3963    // Countdown Checkbox Sanitization.
     
    140164            if ( isset( $uuc_options['background_style'] ) && 'solidcolor' == $uuc_options['background_style'] ) {
    141165                if ( isset( $uuc_options['background_color'] ) ) {
     166                    $fontcolour        = ! empty( $uuc_options['font_color'] ) ? esc_html( $uuc_options['font_color'] ) : '#fff';
     167                    $background_colour = ! empty( $uuc_options['background_color'] ) ? esc_html( $uuc_options['background_color'] ) : '#000';
    142168                    ?>
    143169                    <style type="text/css">
    144170                        body {
    145                             background-color: <?php echo esc_html( $uuc_options['background_color'] ); ?>
     171                            background-color: <?php echo $background_colour; ?>;
     172                            color: <?php echo $fontcolour; ?>;
    146173                        }
    147174
     
    155182            } elseif ( isset( $uuc_options['background_style'] ) && 'patterned' == $uuc_options['background_style'] ) {
    156183                if ( ! isset( $uuc_options['background_styling'] ) ) {
     184                    $fontcolour = ! empty( $uuc_options['font_color'] ) ? esc_html( $uuc_options['font_color'] ) : '#fff';
    157185                    ?>
    158186                    <style type="text/css">
    159187                        body {
    160188                            background: url(<?php echo esc_html( plugin_dir_url( __FILE__ ) . '/images/oldmaths.png' ); ?>);
     189                            color: <?php echo $fontcolour; ?>;
    161190                        }
    162191
     
    169198                } elseif ( isset( $uuc_options['background_styling'] ) ) {
    170199                    if ( 'darkbind' == $uuc_options['background_styling'] ) {
     200                        $fontcolour = ! empty( $uuc_options['font_color'] ) ? esc_html( $uuc_options['font_color'] ) : '#fff';
    171201                        ?>
    172202                        <style type="text/css">
    173203                            body {
    174204                                background: url(<?php echo esc_html( plugin_dir_url( __FILE__ ) . 'images/' . $uuc_options['background_styling'] . '.png' ); ?>);
     205                                color: <?php echo $fontcolour; ?>;
    175206                            }
    176207
     
    181212                            }
    182213                        </style>
    183                     <?php } else { ?>
     214                        <?php
     215                    } else {
     216                        $fontcolour = ! empty( $uuc_options['font_color'] ) ? esc_html( $uuc_options['font_color'] ) : '#fff';
     217                        ?>
    184218                        <style type="text/css">
    185219                            body {
    186220                                background: url(<?php echo esc_html( plugin_dir_url( __FILE__ ) . 'images/' . $uuc_options['background_styling'] . '.png' ); ?>);
     221                                color: <?php echo $fontcolour; ?>;
    187222                            }
    188223
  • ultimate-under-construction/trunk/includes/js/uuc-script.js

    r3065415 r3158884  
    2929        $('#background-color').click(toggle_text);
    3030
     31        var font_color = $('#font-color');
     32        font_color.wpColorPicker({
     33            change: function (event, ui) {
     34                pickColor(font_color.wpColorPicker('color'));
     35            },
     36            clear: function () {
     37                pickColor('');
     38            }
     39        });
     40        $('#font-color').click(toggle_text);
     41
    3142        toggle_text();
    3243
  • ultimate-under-construction/trunk/includes/uucadmin.php

    r3065415 r3158884  
    349349            </div>
    350350
     351            <?php if ( $wp_version >= 3.5 ) { ?>
     352                    <div id="fontcolor">
     353                        <h4 class="uuc-title"><?php esc_html_e( 'Font Colour', 'ultimate-under-construction' ); ?></h4>
     354                        <p>
     355                            <input name="uuc_settings[font_color]" id="font-color" type="text" value="
     356                            <?php
     357                            if ( isset( $uuc_options['font_color'] ) ) {
     358                                echo esc_attr( $uuc_options['font_color'] );
     359                            }
     360                            ?>
     361                            "/>
     362                            <label class="description" for="uuc_settings[font_color]"><?php esc_html_e( 'Select the Background Colour', 'ultimate-under-construction' ); ?></label>
     363                        </p>
     364                    </div>
     365                <?php } else { ?>
     366                    <div id="fontcolor" >
     367                        <h4 class="uuc-title"><?php esc_html_e( 'Font Colour', 'ultimate-under-construction' ); ?></h4>
     368                        <p>
     369                        <div class="color-picker" style="position: relative;">
     370                            <input type="text" name="uuc_settings[font_color]" id="color" value="
     371                            <?php
     372                            if ( isset( $uuc_options['font_color'] ) ) {
     373                                echo esc_attr( $uuc_options['font_color'] );
     374                            }
     375                            ?>
     376                            "/>
     377                            <div style="position: absolute;" id="colorpicker"></div>
     378                        </div>
     379                        </p>
     380                    </div>
     381                <?php } ?>
     382
    351383            <p class="submit">
    352384                <input type="submit" class="button-primary" value="<?php esc_attr_e( 'Save Options', 'ultimate-under-construction' ); ?>"/>
  • ultimate-under-construction/trunk/readme.txt

    r3065415 r3158884  
    33Tags: Under construction, holding page, construction, holding, page, private, preview, coming soon
    44Requires at least: 3.0.1
    5 Tested up to: 6.4.3
    6 Stable tag: 1.9.4
     5Tested up to: 6.6.2
     6Stable tag: 1.9.5
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    2626
    2727== Changelog ==
     28
     29= 1.9.5 - 27th September 2024 =
     30* UPDATE - Tested on WordPress 6.6.2
     31* FIX - Fixing JS load issues
     32* FIX - Fixes for Block theme loading
     33
    2834= 1.9.4 - 2nd April 2024 =
    2935* SECURITY FIX - Fixed XSS Vulnerability - Thanks to Cronus and PatchStack for discovering and reporting.
     
    8591
    8692
    87 == Upgrade Notice ==
     93== Upgrade Notice
    8894= 1.9.4 =
    8995Security Fix - Version 1.9.4 fixes a known XSS Vulnerability. Please Update immediately.
  • ultimate-under-construction/trunk/ultimate-under-construction.php

    r3065415 r3158884  
    66Author: HappyKite
    77Author URI: http://www.happykite.co.uk/
    8 Version: 1.9.4
     8Version: 1.9.5
    99Text Domain: ultimate-under-construction
    1010Domain Path: /languages
     
    2727define( 'UUC_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
    2828define( 'UUC_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
    29 define( 'UUC_VERSION', '1.9.4' );
    30 
     29if ( ! defined( 'UUC_VERSION' ) ) {
     30    define( 'UUC_VERSION', '1.9.5' );
     31}
    3132
    3233/***************************
Note: See TracChangeset for help on using the changeset viewer.