Changeset 686710
- Timestamp:
- 03/24/2013 07:34:04 PM (13 years ago)
- Location:
- reed-write/trunk
- Files:
-
- 3 edited
-
readme.txt (modified) (2 diffs)
-
reed-write.php (modified) (7 diffs)
-
settings.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
reed-write/trunk/readme.txt
r673369 r686710 5 5 Requires at least: 3.0.0 6 6 Tested up to: 3.5.1 7 Stable tag: 1.5. 57 Stable tag: 1.5.6 8 8 9 9 Reed Write extends WordPress giving it the full capabilities of the most popular content management systems on the market. … … 44 44 45 45 == Changelog == 46 47 = 1.5.6 = 48 * Added option to turn off admin menu. 46 49 47 50 = 1.5.5 = -
reed-write/trunk/reed-write.php
r673351 r686710 2 2 /** 3 3 * @package reed-write 4 * @version 1.5. 54 * @version 1.5.6 5 5 */ 6 6 /* … … 9 9 Description: 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. 10 10 Author: Brian S. Reed 11 Version: 1.5. 511 Version: 1.5.6 12 12 Author URI: http://scottreeddesign.com/ 13 13 */ 14 $_rw_version = '1.5. 5';14 $_rw_version = '1.5.6'; 15 15 16 16 # redirects { … … 164 164 165 165 # init { 166 166 167 add_action('init', '_rw_init'); 167 168 function _rw_init(){ … … 173 174 if(current_user_can('activate_plugins')) 174 175 $_rw_content_types = array_merge( 176 !get_option( "_rw_option_admin_menu_on", true ) ? array() : 175 177 array( 176 178 'rw_content_type' => array( … … 208 210 ) 209 211 ), 210 'rw_taxonomy' => array(212 'rw_taxonomy' => array( 211 213 'post_title' => 'Taxonomies', 212 214 'arguments' => array( … … 413 415 414 416 # admin_menu { 417 415 418 add_action('admin_menu', '_rw_admin_menu'); 416 419 function _rw_admin_menu(){ … … 446 449 } 447 450 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 453 458 #} 454 459 -
reed-write/trunk/settings.php
r635718 r686710 2 2 3 3 4 $_rw_options = array( 'load_script' => true );4 $_rw_options = array( 'load_script' => true, 'admin_menu_on' => true ); 5 5 6 6 foreach( $_rw_options as $option=>$default ) 7 7 $_rw_options[$option] = get_option( "_rw_option_$option", $default ); 8 8 9 $saving_settings = ''; 10 9 11 if($_POST && wp_verify_nonce($_POST['_reedwrite_settings_update_nonce'],'_reedwrite_settings_update') ){ 10 12 11 13 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]; 14 16 } 15 17 $saving_settings = '<h3>Saving Settings</h3><script>window.location = window.location;</script>'; 16 18 } 17 19 … … 22 24 </div> 23 25 <h2>ReedWrite Settings</h2> 26 <?php echo $saving_settings; ?> 24 27 <form name="form" action="options-general.php?page=reedwrite-settings" method="post"> 25 28 <?php wp_nonce_field('_reedwrite_settings_update','_reedwrite_settings_update_nonce'); ?> … … 28 31 <tbody> 29 32 <tr valign="top"> 30 <th scope="row">Basic Settings </th>33 <th scope="row">Basic Settings</th> 31 34 <td><fieldset> 32 35 <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"> 34 37 <label for="load_script">Load JavaScript Helper</label> 35 38 <p class="description">Note: The JavaScript Helper file makes WP_Query requests available through AJAX.</p> 36 39 </fieldset></td> 37 40 </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 & Taxonomies</th> 52 <td><fieldset> 53 <legend class="screen-reader-text"><span>Export Content Types & 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 */?> 38 58 </tbody> 39 59 </table>
Note: See TracChangeset
for help on using the changeset viewer.