Plugin Directory

Changeset 686710


Ignore:
Timestamp:
03/24/2013 07:34:04 PM (13 years ago)
Author:
iambriansreed
Message:

1.5.6 Added menu options

Location:
reed-write/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • reed-write/trunk/readme.txt

    r673369 r686710  
    55Requires at least: 3.0.0
    66Tested up to: 3.5.1
    7 Stable tag: 1.5.5
     7Stable tag: 1.5.6
    88
    99Reed Write extends WordPress giving it the full capabilities of the most popular content management systems on the market.
     
    4444
    4545== Changelog ==
     46
     47= 1.5.6 =
     48* Added option to turn off admin menu.
    4649
    4750= 1.5.5 =
  • reed-write/trunk/reed-write.php

    r673351 r686710  
    22/**
    33 * @package reed-write
    4  * @version 1.5.5
     4 * @version 1.5.6
    55 */
    66/*
     
    99Description: Reed Write is a WordPress plugin that helps you create custom content types in WordPress. It allows for custom categories, custom tags, and custom input fields.
    1010Author: Brian S. Reed
    11 Version: 1.5.5
     11Version: 1.5.6
    1212Author URI: http://scottreeddesign.com/
    1313*/
    14 $_rw_version = '1.5.5';
     14$_rw_version = '1.5.6';
    1515
    1616# redirects {
     
    164164
    165165# init {
     166   
    166167    add_action('init', '_rw_init');
    167168    function _rw_init(){
     
    173174            if(current_user_can('activate_plugins'))
    174175                $_rw_content_types = array_merge(
     176                    !get_option( "_rw_option_admin_menu_on", true ) ? array() :
    175177                    array(
    176178                    'rw_content_type' => array(
     
    208210                            )
    209211                        ),
    210                         'rw_taxonomy' => array(
     212                    'rw_taxonomy' => array(
    211213                            'post_title' => 'Taxonomies',
    212214                            'arguments' => array(
     
    413415
    414416# admin_menu {
     417   
    415418    add_action('admin_menu', '_rw_admin_menu');
    416419    function _rw_admin_menu(){
     
    446449    }
    447450    function _rw_remove_menu($_rw_menu, $_rw_title){
    448         foreach($_rw_menu as $_rw_k=>$_rw_item){
    449             if($_rw_item[0] == $_rw_title)
    450                 unset($_rw_menu[$_rw_k]);
    451         }
    452     }
     451    foreach($_rw_menu as $_rw_k=>$_rw_item){
     452        if($_rw_item[0] == $_rw_title)
     453            unset($_rw_menu[$_rw_k]);
     454    }
     455}
     456
     457   
    453458#}
    454459
  • reed-write/trunk/settings.php

    r635718 r686710  
    22
    33
    4 $_rw_options = array( 'load_script' => true);
     4$_rw_options = array( 'load_script' => true, 'admin_menu_on' => true );
    55
    66foreach( $_rw_options as $option=>$default )
    77        $_rw_options[$option] = get_option( "_rw_option_$option", $default );
    88
     9$saving_settings = '';
     10
    911if($_POST && wp_verify_nonce($_POST['_reedwrite_settings_update_nonce'],'_reedwrite_settings_update') ){
    1012   
    1113    foreach( $_rw_options as $option=>$default ){
    12         update_option( "_rw_option_$option", $_POST[$option] );
    13         $_rw_options[$option] = $_POST[$option];
     14        update_option( "_rw_option_$option", !!$_POST[$option] );
     15        $_rw_options[$option] = !!$_POST[$option];
    1416    }
    15    
     17    $saving_settings = '<h3>Saving Settings</h3><script>window.location = window.location;</script>';
    1618}
    1719
     
    2224    </div>
    2325    <h2>ReedWrite Settings</h2>
     26    <?php echo $saving_settings; ?>
    2427    <form name="form" action="options-general.php?page=reedwrite-settings" method="post">
    2528        <?php wp_nonce_field('_reedwrite_settings_update','_reedwrite_settings_update_nonce'); ?>
     
    2831            <tbody>
    2932                <tr valign="top">
    30                     <th scope="row">Basic Settings </th>
     33                    <th scope="row">Basic Settings</th>
    3134                    <td><fieldset>
    3235                            <legend class="screen-reader-text"><span>Basic Settings </span></legend>
    33                             <input id="load_script" type="checkbox" <?php checked( $_rw_options[$option] ); ?> name="load_script" value="1">
     36                            <input id="load_script" type="checkbox" <?php checked( $_rw_options['load_script'] ); ?> name="load_script" value="1">
    3437                            <label for="load_script">Load JavaScript Helper</label>                         
    3538                            <p class="description">Note: The JavaScript Helper file makes WP_Query requests available through AJAX.</p>
    3639                        </fieldset></td>
    3740                </tr>
     41                <tr valign="top">
     42                    <th scope="row"></th>
     43                    <td><fieldset>
     44                            <legend class="screen-reader-text"><span>Admin Menu On</span></legend>
     45                            <input id="admin_menu_on" type="checkbox" <?php checked( $_rw_options['admin_menu_on'] ); ?> name="admin_menu_on" value="1">
     46                            <label for="admin_menu_on">Admin Menu On</label>                           
     47                            <p class="description">Note: Toggles the admin interface.</p>
     48                        </fieldset></td>
     49                </tr><?php /*?>
     50                <tr valign="top">
     51                    <th scope="row">Export Content Types &amp; Taxonomies</th>
     52                    <td><fieldset>
     53                            <legend class="screen-reader-text"><span>Export Content Types &amp; Taxonomies</span></legend>
     54                            <a href="<?php  ?>" target="_blank" class="button">Export</a>
     55                            <p class="description">Note: Creates a PHP file which builds the current Content Types and Taxonomies with the plugin deactivated.</p>
     56                        </fieldset></td>
     57                </tr><?php */?>
    3858            </tbody>
    3959        </table>
Note: See TracChangeset for help on using the changeset viewer.