Changeset 564151
- Timestamp:
- 06/26/2012 05:32:35 PM (14 years ago)
- Location:
- bootstrap-for-wordpress/trunk/bootstrapForWordpress
- Files:
-
- 2 added
- 2 edited
-
bootstrap.php (modified) (7 diffs)
-
js/bs.js (added)
-
js/bsjq.js (added)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
bootstrap-for-wordpress/trunk/bootstrapForWordpress/bootstrap.php
r563609 r564151 4 4 Plugin URI: http://www.kankod.com/bootstrapWP 5 5 Description: Bootstrap for wordpress plugin enables the Twitter bootstrap library for your wordpress site 6 Version: 0.1 6 Version: 0.11 7 7 Author: kankod.com 8 8 */ … … 14 14 15 15 function bootstrap_filter_footer() { 16 $bootstrapJS = get_option('bootstrapJS'); 17 $bootstrapJQ = get_option('bootstrapJQ'); 16 18 $bootstrapUrl = get_option('bootstrapURL'); 17 19 $bootstrap_enabled = get_option('bootstrapEN'); … … 25 27 wp_enqueue_style( 'bootstrap' ); 26 28 } 29 30 if ($bootstrapJQ) { 31 wp_enqueue_script('btJQ', plugins_url('js/bsjq.js', __FILE__), false, false, true ); 32 } 33 34 if ($bootstrapJS) { 35 wp_enqueue_script('btJS', plugins_url('js/bs.js', __FILE__), false, false, true ); 36 } 27 37 } 28 38 … … 34 44 $bootstrapCssUrl = get_option('bootstrapURL'); 35 45 $bootstrap_enabled = get_option('bootstrapEN'); 46 $bootstrapJQ = get_option('bootstrapJQ'); 47 $bootstrapJS = get_option('bootstrapJS'); 36 48 if ( isset($_POST['submit']) ) { 37 49 if (isset($_POST['bootstrap_enabled'])) … … 51 63 } 52 64 65 if (isset($_POST['bootstrapJQ'])) 66 { 67 if ($_POST['bootstrapJQ'] == 'on') 68 { 69 $bootstrapJQ = 1; 70 } 71 else 72 { 73 $bootstrapJQ = 0; 74 } 75 } 76 77 else 78 { 79 $bootstrapJQ = 0; 80 } 81 82 if (isset($_POST['bootstrapJS'])) 83 { 84 if ($_POST['bootstrapJS'] == 'on') 85 { 86 $bootstrapJS = 1; 87 } 88 else 89 { 90 $bootstrapJS = 0; 91 } 92 } 93 94 else 95 { 96 $bootstrapJS = 0; 97 } 98 53 99 $bootstrapCssUrl = $_POST['bootstrapCssUrl']; 100 101 update_option('bootstrapJS', $bootstrapJS); 102 update_option('bootstrapJQ', $bootstrapJQ); 54 103 update_option('bootstrapEN', $bootstrap_enabled); 55 104 update_option('bootstrapURL', $bootstrapCssUrl); … … 60 109 } 61 110 ?> 62 <div class="wrap" >111 <div class="wrap" style="width:99%;"> 63 112 <h2>Bootstrap for WordPress Configuration</h2> 64 <div class="postbox-container" >113 <div class="postbox-container" style="width:100%;"> 65 114 <div class="metabox-holder"> 66 115 <div class="meta-box-sortables"> … … 71 120 <div class="inside"> 72 121 <table class="form-table"> 73 <tr><th valign="top" scrope="row">Bootstrap On/Off:</th> 74 <td valign="top"><input type="checkbox" id="" name="bootstrap_enabled" <?php echo ($bootstrap_enabled ? 'checked="checked"' : ''); ?> /> <label for="enabled">Enable or disable Bootstrap</label><br/></td></tr> 75 <tr><th valign="top" scrope="row"><label for="toolbarpath">bootstrap Path:</label></th> 122 <tr><th valign="top" scrope="row">Bootstrap CSS On/Off:</th> 123 <td valign="top"><input type="checkbox" id="" name="bootstrap_enabled" <?php echo ($bootstrap_enabled ? 'checked="checked"' : ''); ?> /> <label for="enabled">Enable or disable Bootstrap CSS</label><br/></td></tr> 124 125 <tr><th valign="top" scrope="row"><label for="toolbarpath">Custom bootstrap CSS URL (optional):</label></th> 76 126 <td valign="top"><input id="bootstrapCssUrl" name="bootstrapCssUrl" type="text" size="20" value="<?php echo $bootstrapCssUrl; ?>"/></td></tr> 127 128 <tr><th valign="top" scrope="row">Bootstrap JS On/Off:</th> 129 <td valign="top"><input type="checkbox" id="" name="bootstrapJS" <?php echo ($bootstrapJS ? 'checked="checked"' : ''); ?> /> <label for="enabled">Enable or disable Bootstrap JS</label><br/></td></tr> 130 131 <tr><th valign="top" scrope="row">Include jQuery</th> 132 <td valign="top"><input type="checkbox" id="" name="bootstrapJQ" <?php echo ($bootstrapJQ ? 'checked="checked"' : ''); ?> /> <label for="enabled">Include jQuery</label><br/></td></tr> 77 133 78 134 </table> -
bootstrap-for-wordpress/trunk/bootstrapForWordpress/readme.txt
r563614 r564151 14 14 == Description == 15 15 16 Boost your site with the Twitter Bootstrap CSS library. 17 Use the latest stable version or set your own CSS version using a custom URL. 16 Boost your site with the Twitter Bootstrap Javascript and CSS library. 17 18 -- Use the latest stable version or set your own custom CSS. -- 19 -- Includes the Javascript bootstrap APIS -- 20 -- Includes the jQuery dependencies file (incase your site does not have jQuery installed) -- 18 21 19 22 20 What is Twitter bootstrap ?21 23 22 From Twitter Bootstrap: 24 ---------------------- What is Twitter bootstrap ? ---------------------- 25 26 27 28 29 ------- From Twitter Bootstrap: 23 30 24 31 "Bootstrap is a toolkit from Twitter designed to kickstart development of webapps and sites. … … 28 35 29 36 30 Why Bootstrap?37 ------- Why Bootstrap? 31 38 32 39 Designed for everyone, everywhere. … … 69 76 2. Activate the plugin through the 'Plugins' menu in WordPress 70 77 3. Under your 'Themes' Menu choose Bootstrap 71 4. Check the 'Enable Bootstrap' box 72 5. To load custom bootstrap theme using a different url Replace 'Bootstrap Path' with your Bootstrap css URL. 78 4. customize your bootstrap from the Bootstrap for wordpress admin interface.
Note: See TracChangeset
for help on using the changeset viewer.