Changeset 529313
- Timestamp:
- 04/10/2012 01:35:04 AM (14 years ago)
- Location:
- rehabtabs
- Files:
-
- 60 added
- 3 edited
-
tags/1.1 (added)
-
tags/1.1/js (added)
-
tags/1.1/js/jquery.cookie.js (added)
-
tags/1.1/js/rehabtabs.js (added)
-
tags/1.1/js/rehabtabs.packed.js (added)
-
tags/1.1/options.php (added)
-
tags/1.1/readme.txt (added)
-
tags/1.1/rehabtabs.php (added)
-
tags/1.1/themes (added)
-
tags/1.1/themes/cupertino (added)
-
tags/1.1/themes/cupertino/images (added)
-
tags/1.1/themes/cupertino/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png (added)
-
tags/1.1/themes/cupertino/images/ui-bg_flat_15_cd0a0a_40x100.png (added)
-
tags/1.1/themes/cupertino/images/ui-bg_glass_100_e4f1fb_1x400.png (added)
-
tags/1.1/themes/cupertino/images/ui-bg_glass_50_3baae3_1x400.png (added)
-
tags/1.1/themes/cupertino/images/ui-bg_glass_80_d7ebf9_1x400.png (added)
-
tags/1.1/themes/cupertino/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png (added)
-
tags/1.1/themes/cupertino/images/ui-bg_highlight-hard_70_000000_1x100.png (added)
-
tags/1.1/themes/cupertino/images/ui-bg_highlight-soft_100_deedf7_1x100.png (added)
-
tags/1.1/themes/cupertino/images/ui-bg_highlight-soft_25_ffef8f_1x100.png (added)
-
tags/1.1/themes/cupertino/images/ui-icons_2694e8_256x240.png (added)
-
tags/1.1/themes/cupertino/images/ui-icons_2e83ff_256x240.png (added)
-
tags/1.1/themes/cupertino/images/ui-icons_3d80b3_256x240.png (added)
-
tags/1.1/themes/cupertino/images/ui-icons_72a7cf_256x240.png (added)
-
tags/1.1/themes/cupertino/images/ui-icons_ffffff_256x240.png (added)
-
tags/1.1/themes/cupertino/jquery-ui-1.8.16.custom.css (added)
-
tags/1.1/themes/overcast (added)
-
tags/1.1/themes/overcast/images (added)
-
tags/1.1/themes/overcast/images/ui-bg_flat_0_aaaaaa_40x100.png (added)
-
tags/1.1/themes/overcast/images/ui-bg_flat_0_eeeeee_40x100.png (added)
-
tags/1.1/themes/overcast/images/ui-bg_flat_55_c0402a_40x100.png (added)
-
tags/1.1/themes/overcast/images/ui-bg_flat_55_eeeeee_40x100.png (added)
-
tags/1.1/themes/overcast/images/ui-bg_glass_100_f8f8f8_1x400.png (added)
-
tags/1.1/themes/overcast/images/ui-bg_glass_35_dddddd_1x400.png (added)
-
tags/1.1/themes/overcast/images/ui-bg_glass_60_eeeeee_1x400.png (added)
-
tags/1.1/themes/overcast/images/ui-bg_inset-hard_75_999999_1x100.png (added)
-
tags/1.1/themes/overcast/images/ui-bg_inset-soft_50_c9c9c9_1x100.png (added)
-
tags/1.1/themes/overcast/images/ui-icons_3383bb_256x240.png (added)
-
tags/1.1/themes/overcast/images/ui-icons_454545_256x240.png (added)
-
tags/1.1/themes/overcast/images/ui-icons_70b2e1_256x240.png (added)
-
tags/1.1/themes/overcast/images/ui-icons_999999_256x240.png (added)
-
tags/1.1/themes/overcast/images/ui-icons_fbc856_256x240.png (added)
-
tags/1.1/themes/overcast/jquery-ui-1.8.14.custom.css (added)
-
tags/1.1/themes/smoothness (added)
-
tags/1.1/themes/smoothness/images (added)
-
tags/1.1/themes/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png (added)
-
tags/1.1/themes/smoothness/images/ui-bg_flat_75_ffffff_40x100.png (added)
-
tags/1.1/themes/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png (added)
-
tags/1.1/themes/smoothness/images/ui-bg_glass_65_ffffff_1x400.png (added)
-
tags/1.1/themes/smoothness/images/ui-bg_glass_75_dadada_1x400.png (added)
-
tags/1.1/themes/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png (added)
-
tags/1.1/themes/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png (added)
-
tags/1.1/themes/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png (added)
-
tags/1.1/themes/smoothness/images/ui-icons_222222_256x240.png (added)
-
tags/1.1/themes/smoothness/images/ui-icons_2e83ff_256x240.png (added)
-
tags/1.1/themes/smoothness/images/ui-icons_454545_256x240.png (added)
-
tags/1.1/themes/smoothness/images/ui-icons_888888_256x240.png (added)
-
tags/1.1/themes/smoothness/images/ui-icons_cd0a0a_256x240.png (added)
-
tags/1.1/themes/smoothness/jquery-ui-1.8.16.custom.css (added)
-
tags/1.1/uninstall.php (added)
-
trunk/options.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/rehabtabs.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
rehabtabs/trunk/options.php
r460035 r529313 14 14 add_settings_field( 'rehabtabs_collapsible', 'Make tabs collapsible', 'rehabtabs_collapsible_callback', 'plugin', 'rehabtabs_section' ); 15 15 add_settings_field( 'rehabtabs_cookie', 'Use cookie to remember tab state', 'rehabtabs_cookie_callback', 'plugin', 'rehabtabs_section' ); 16 add_settings_field( 'rehabtabs_spinner', 'Ajax loading message', 'rehabtabs_spinner_callback', 'plugin', 'rehabtabs_section' ); 16 17 } 17 18 … … 33 34 $options = get_option( 'rehabtabs_options' ); 34 35 $themes_directory = plugin_dir_path( __FILE__ ) . 'themes'; 35 if ( class_exists( FilesystemIterator) ) {36 if ( class_exists( 'FilesystemIterator' ) ) { 36 37 $themes = new DirectoryIterator( $themes_directory ); 37 38 foreach ( $themes as $theme ) { … … 63 64 } 64 65 } 65 66 66 } 67 67 68 68 function rehabtabs_fx_callback() { 69 69 $options = get_option( 'rehabtabs_options' ); 70 echo '<label for="fx">< p class="description"></p><input type="checkbox" name="rehabtabs_options[fx]" id="fx" value="1" ' . checked( $options['fx'], 1, false ) . ' /></label>';70 echo '<label for="fx"><input type="checkbox" name="rehabtabs_options[fx]" id="fx" value="1" ' . checked( isset( $options['fx'] ) ? $options['fx'] : 0, 1, false ) . ' /></label>'; 71 71 } 72 72 73 73 function rehabtabs_collapsible_callback() { 74 74 $options = get_option( 'rehabtabs_options' ); 75 echo '<label for="collapsible"><input type="checkbox" name="rehabtabs_options[collapsible]" id="collapsible" value="1" ' . checked( $options['collapsible'], 1, false ) . ' /></label>';75 echo '<label for="collapsible"><input type="checkbox" name="rehabtabs_options[collapsible]" id="collapsible" value="1" ' . checked( isset( $options['collapsible'] ) ? $options['collapsible'] : 0, 1, false ) . ' /></label>'; 76 76 } 77 77 78 78 function rehabtabs_cookie_callback() { 79 79 $options = get_option( 'rehabtabs_options' ); 80 echo '<label for="cookie"><input type="checkbox" name="rehabtabs_options[cookie]" id="cookie" value="1" ' . checked( $options['cookie'], 1, false ) . ' /></label>'; 80 echo '<label for="cookie"><input type="checkbox" name="rehabtabs_options[cookie]" id="cookie" value="1" ' . checked( isset( $options['cookie'] ) ? $options['cookie'] : 0, 1, false ) . ' /></label>'; 81 } 82 83 function rehabtabs_spinner_callback() { 84 $options = get_option( 'rehabtabs_options' ); 85 echo '<input type="text" name="rehabtabs_options[spinner]" id="spinner" value="' . (isset( $options['spinner'] ) ? $options['spinner'] : '') . '" />'; 81 86 } 82 87 … … 85 90 wp_die( __( 'You do not have sufficient permissions to access this page.' ) ); 86 91 } 92 $tabs = array( 'options' => 'Rehabtabs Options', 'usage' => 'Rehabtabs Usage' ); 93 $current = isset( $_GET['tab'] ) ? $_GET['tab'] : 'options'; 87 94 echo '<div class="wrap">'; 88 95 screen_icon(); 89 echo '<h2>Rehabtabs</h2>'; 90 echo '<form method="post" action="options.php">'; 91 settings_fields( 'rehabtabs_settings_group' ); 92 do_settings_sections( 'plugin' ); 93 echo '<p class="submit"><input name="Submit" type="submit" class="button-primary" value="Save Changes" /></p>'; 94 echo '</form>'; 96 echo '<h2 class="nav-tab-wrapper">'; 97 foreach ( $tabs as $tab => $name ) { 98 $class = ( $tab == $current ) ? ' nav-tab-active' : ''; 99 echo "<a class='nav-tab$class' href='?page=rehabtabs&tab=$tab'>$name</a>"; 100 } 101 echo '</h2>'; 102 103 switch ( $current ) { 104 case 'options' : 105 echo '<form method="post" action="options.php">'; 106 settings_fields( 'rehabtabs_settings_group' ); 107 do_settings_sections( 'plugin' ); 108 echo '<p class="submit"><input name="Submit" type="submit" class="button-primary" value="Save Changes" /></p>'; 109 echo '</form>'; 110 break; 111 case 'usage' : 112 ?> 113 <h3>Basic usage</h3> 114 <pre> 115 [rehabtabs] 116 [rehabtab title="Tab 1"]Content of tab 1[/rehabtab] 117 [rehabtab title="Tab 2"]Content of tab 2[/rehabtab] 118 [rehabtab title="Tab 3"]Content of tab 3[/rehabtab] 119 [/rehabtabs] 120 </pre> 121 122 <h3>Ajax usage</h3> 123 <p>To load tab contents via ajax, set the shortcode's <em>ajax</em> attribute to <em>true</em>. Then, between the tags, enter the URL to.....</p> 124 <pre> 125 [rehabtab title="Ajax tab" ajax="true"]plugins/rehabtabs/demo[/rehabtab] 126 </pre> 127 128 <h3>Themes</h3> 129 <p>Rehabtabs comes loaded with a few themes, but here’s how to install more.</p> 130 <ol> 131 <li>Go to the jQuery ThemeRoller</li> 132 <li>Choose your theme and click the download button</li> 133 <li>Deselect all components, then reselect Tabs (under Widgets)</li> 134 <li>Download, giving you a directory called jquery-ui-x.x.xx.custom</li> 135 <li>Open the subdirectory called css, and copy your chosen theme folder</li> 136 <li>Paste this folder into plugins/rehabtabs/themes</li> 137 <li>Your theme should now be available on the Settings page</li> 138 </ol> 139 <?php 140 break; 141 } 95 142 echo '</div>'; 96 143 } 97 98 144 ?> -
rehabtabs/trunk/readme.txt
r528690 r529313 46 46 == Changelog == 47 47 48 = 1.1 = 49 * Added usage section to settings. 50 * Added jQuery UI spinner option to settings. 51 * Fixed some notices. 52 48 53 = 1.0 = 49 54 * Modified to accommodate older PHP versions. 50 55 51 56 = 0.1 = 52 * Initial Release.57 * Initial release. -
rehabtabs/trunk/rehabtabs.php
r460035 r529313 80 80 $data['collapsible'] = isset( $options['collapsible'] ); 81 81 $data['cookie'] = isset( $options['cookie'] ); 82 $data['spinner'] = $options['spinner']; 82 83 wp_enqueue_script( 'jquery-ui-tabs' ); 83 84 if ( $data['cookie'] ) {
Note: See TracChangeset
for help on using the changeset viewer.