Plugin Directory

Changeset 2478250


Ignore:
Timestamp:
02/21/2021 04:04:12 AM (5 years ago)
Author:
sleekchib
Message:

This update was facilitated to fix the need for users to enable public alerts before seeing a live preview in the backend. The "Enable Preview button can now be used to toggle the live preview feature.

Location:
simple-alert-system/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • simple-alert-system/trunk/alert.php

    r2443304 r2478250  
    22
    33// Define varibale
    4 $bgcolor = $simple_alert_system_options = $setColor = $ftColor = $alert_link = $sas_schedule_start_date = $sas_schedule_end_date = $today = $run_sas_alert = $ctaBg = $ctaftColor = $post_slug = $scopeArray = $selected = $scopeRange = $pageInclusive = $sas_active_theme = $ctaValue = "";
     4$bgcolor = $simple_alert_system_options = $setColor = $ftColor = $alert_link = $sas_schedule_start_date = $sas_schedule_end_date = $today = $run_sas_alert = $ctaBg = $ctaftColor = $post_slug = $scopeArray = $selected = $scopeRange = $pageInclusive = $sas_active_theme = $ctaValue = $publicDisplay = "";
    55
    66$simple_alert_system_options = get_option( 'simple_alert_system_option_name' );
     
    5858  $run_sas_alert === "yes" &&
    5959  $pageInclusive === "YES" ) {
     60  $publicDisplay = "YES";
     61   
     62  }
     63
     64 if(($publicDisplay === "YES") || is_admin())  {
    6065
    6166  $bgcolor = $simple_alert_system_options[ 'background_0' ];
  • simple-alert-system/trunk/controls/sas-settings.php

    r2443304 r2478250  
    5656    </style>
    5757  <h1 class="sas_title">Simple Alert System</h1>
     58  <script>
     59
     60  // Wait for document to be ready
     61  jQuery(function(){
     62    jQuery(".switch.livePreview [type='checkbox']").on("change", function() {
     63        var showPreview = "showPreview";
     64          jQuery(".button.button-primary").trigger("click");
     65});     
     66
     67  });
     68
     69
     70
     71</script>
    5872  <?php
    5973  // Show alert Preview if the setting is enabled
    6074  $simple_alert_system_options = get_option( 'simple_alert_system_option_name' );
    61   if ( !empty( $simple_alert_system_options[ 'enable_preview' ] ) ) {
     75  if ( !empty( $simple_alert_system_options[ 'enable_preview' ] ) || isset( $_COOKIE[ "sas_preview_alert" ] ) ) {
    6276    ?>
    6377  <div>
     
    7589
    7690    ?>
    77    </form>
    78    <?php $seo_pyramid_ready_message = 'Note: If you enable the customization section, its settings will override all default settings.'; ?>
    79    <div class="sas_notice">
     91  </form>
     92  <?php $seo_pyramid_ready_message = 'Note: If you enable the customization section, its settings will override all default settings.'; ?>
     93  <div class="sas_notice">
    8094    <?php  printf( __( '%s', 'seo-pyramid' ), $seo_pyramid_ready_message ); ?>
    81    </div>
    82    <script>
     95  </div>
     96  <script>
    8397  // Instantenious Preview script   
    8498   jQuery(function () {
     
    483497
    484498
    485     '<label class="switch"><input type="checkbox" name="simple_alert_system_option_name[enable_alert]" id="tenable_alert" value="enable_alert" %s><span class="slider round"></span></label>',
     499    '<label class="switch "><input type="checkbox" name="simple_alert_system_option_name[enable_alert]" id="tenable_alert" value="enable_alert" %s><span class="slider round"></span></label>',
    486500
    487501
     
    501515
    502516
    503     '<label class="switch"><input type="checkbox" name="simple_alert_system_option_name[enable_preview]" id="tenable_alert" value="enable_preview" %s><span class="slider round"></span></label>',
     517    '<label class="switch livePreview"><input type="checkbox" name="simple_alert_system_option_name[enable_preview]" id="tenable_alert" value="enable_preview" %s><span class="slider round"></span></label>',
    504518
    505519
  • simple-alert-system/trunk/index.php

    r2443304 r2478250  
    88 * Description: Simplified website alert system for WordPress.
    99
    10  * Version: 1.1.9
     10 * Version: 1.2.0
    1111
    1212 * Author: Chibueze Okechukwu
  • simple-alert-system/trunk/readme.txt

    r2443304 r2478250  
    66Tested up to: 5.6
    77Requires PHP: 5.0
    8 Stable tag: 1.1.9
     8Stable tag: 1.2.0
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    9292
    9393### 1.1.9
     94This update was facilitated to fix the need for users to enable public alerts before seeing a live preview in the backend. The "Enable Preview button can now be used to toggle the live preview feature.
     95
     96### 1.1.9
    9497This update includes but is not limited to code enhancements, U.I enhancements, and the introduction of a live preview feature to enable users to see a replica of the alert within the settings window.
    9598
Note: See TracChangeset for help on using the changeset viewer.