Plugin Directory

Changeset 1552228


Ignore:
Timestamp:
12/12/2016 03:14:16 AM (9 years ago)
Author:
demoswebsites
Message:

update version, add more options

Location:
offline-box/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • offline-box/trunk/includes/setting.php

    r1431990 r1552228  
    5353                <p>
    5454                    <select name="offline_box_display[enable]" id="offline_box_display_enable">
    55                         <option value="yes" <?php echo $enable=='yes'?'selected':'';?>>Yes</option>
     55                        <option value="yesbutnotadmin" <?php echo $enable=='no'?'selected':'';?>>Yes for all but exclude Admin</option>
     56                        <option value="yesforguest" <?php echo $enable=='no'?'selected':'';?>>Yes for Guest</option>
     57                        <option value="yes" <?php echo $enable=='yes'?'selected':'';?>>Yes for All</option>
    5658                        <option value="no" <?php echo $enable=='no'?'selected':'';?>>No</option>
    57                     </select> 
     59                    </select>
    5860                </p>
    5961                <?php
  • offline-box/trunk/includes/site.php

    r1431990 r1552228  
    1717       
    1818        $current_user = wp_get_current_user();
     19        if( $enable == 'yesforguest' ){
     20            // Yes for Guest
     21            if( empty($current_user) || intval($current_user->ID) == 0 ){
     22                $enable = 'yes';
     23            }
     24        } else if( $enable == 'yesbutnotadmin' ){
     25            // Yes for all but exclude Admin
     26            if ( empty( $current_user->roles ) || !is_array( $current_user->roles ) || !in_array( 'administrator', $current_user->roles ) ) {
     27                $enable = 'yes';
     28            }
     29        }
    1930       
    2031       
    21         //if( empty($current_user) || intval($current_user->ID) == 0 ){
    2232        if( $enable == 'yes' ){
    2333           
     
    2535                include $file;             
    2636            } else {
    27                 echo 'Not Theme !!! Please choose a theme in The OfflineBox Plugin now.';
     37                echo 'Not Theme !!! Please choose a theme in The Offline Box Plugin now.';
    2838            }
    2939           
  • offline-box/trunk/index.php

    r1402696 r1552228  
    44Plugin URI: http://wordpress.org/plugins/offline-box/
    55Description: Site offline, coming soon, development site, security. Easily activate maintenance mode for your website.
    6 Version: 1.0.2
     6Version: 1.0.4
    77Author: PB One
    88Author URI: http://photoboxone.com/
  • offline-box/trunk/readme.txt

    r1491811 r1552228  
    66Tags: site offline, offline, offline box, coming soon, photos, photo, images, image, development, development site, security, plugin, plugins
    77Requires at least: 3.5
    8 Tested up to: 4.6
    9 Stable tag: 1.0.3
     8Tested up to: 4.7
     9Stable tag: 1.0.4
    1010
    1111Site offline, coming soon, development site, security. Easily activate maintenance mode for your website.
     
    5353== Changelog ==
    5454
     55= 1.0.4 =
     56* Add more options:
     57  - Yes for Guest.
     58  - Yes for all but exclude Admin.
     59
    5560= 1.0.3 =
    5661* Add more option.
  • offline-box/trunk/themes/default/setting.php

    r1431990 r1552228  
    1616</p>
    1717<h4>Title</h4>
    18 <p><input value="<?php echo $title;?>" name="offline_box_display[title]" /></p>
     18<p><input value="<?php echo $title;?>" name="offline_box_display[title]" style="width: 80%; max-width: 90%; " /></p>
    1919<h4>Description</h4>
    2020<p><textarea name="offline_box_display[description]" style="width: 80%; max-width: 90%; height: 70px;"><?php echo $description;?></textarea></p>
Note: See TracChangeset for help on using the changeset viewer.