Changeset 714378
- Timestamp:
- 05/17/2013 01:37:16 PM (13 years ago)
- Location:
- section-page
- Files:
-
- 18 added
- 1 deleted
- 5 edited
-
assets/screenshot-1.jpg (modified) (previous)
-
tags/1.0.2 (added)
-
tags/1.0.2/assets (added)
-
tags/1.0.2/assets/actions.js (added)
-
tags/1.0.2/assets/base.css (added)
-
tags/1.0.2/assets/codemirror.css (added)
-
tags/1.0.2/assets/codemirror.js (added)
-
tags/1.0.2/assets/codemirror_use.js (added)
-
tags/1.0.2/assets/css.js (added)
-
tags/1.0.2/assets/dynamic.js.php (added)
-
tags/1.0.2/assets/icon.png (added)
-
tags/1.0.2/owc-section-page-admin.php (added)
-
tags/1.0.2/owc-section-page.php (added)
-
tags/1.0.2/readme.txt (added)
-
trunk/assets/actions.js (added)
-
trunk/assets/actions.js.php (deleted)
-
trunk/assets/base.css (modified) (1 diff)
-
trunk/assets/codemirror.css (added)
-
trunk/assets/codemirror.js (added)
-
trunk/assets/codemirror_use.js (added)
-
trunk/assets/css.js (added)
-
trunk/owc-section-page-admin.php (modified) (3 diffs)
-
trunk/owc-section-page.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
section-page/trunk/assets/base.css
r709968 r714378 1 1 .owc-section-page { 2 overflow: hidden;3 border-bottom: 1px solid #ccc;2 overflow: hidden; 3 border-bottom: 1px solid #ccc; 4 4 } 5 5 .owc-section-page .owc-sp-open { 6 overflow: hidden;7 cursor: pointer;6 overflow: hidden; 7 cursor: pointer; 8 8 } 9 9 .owc-section-page .owc-sp-open .owc-sp-toggle-arrow { 10 vertical-align: bottom;10 vertical-align: bottom; 11 11 } 12 12 .owc-section-page .owc-sp-content { 13 display: none;13 display: none; 14 14 } -
section-page/trunk/owc-section-page-admin.php
r709968 r714378 31 31 <th><?php _e( 'HTML classes for section title', 'owc_sp' ); ?></th> 32 32 <td> 33 <input type="text" name="owc_sp_class_title_elm" id="owc_sp_class_title_elm" value="<?php echo $options['owc_sp_class_title_elm']; ?>" /> 34 </td> 35 </tr> 36 <tr valign="top"> 37 <th><?php _e( 'HTML classes for section title wrapper', 'owc_sp' ); ?></th> 38 <td> 33 39 <input type="text" name="owc_sp_class_title" id="owc_sp_class_title" value="<?php echo $options['owc_sp_class_title']; ?>" /> 34 40 </td> … … 41 47 </tr> 42 48 <tr valign="top"> 43 <th><?php _e( 'Use a char before section title', 'owc ' ); ?></th>49 <th><?php _e( 'Use a char before section title', 'owc_sp' ); ?></th> 44 50 <td> 45 51 <input type="checkbox" name="owc_sp_use_char"<?php echo $options['owc_sp_use_char']?' checked="checked"':''; ?> /> … … 58 64 </td> 59 65 </tr> 66 <tr valign="top"> 67 <th><?php _e( 'Use animation', 'owc_sp' ); ?></th> 68 <td> 69 <input type="checkbox" name="owc_sp_use_animation"<?php echo $options['owc_sp_use_animation']?' checked="checked"':''; ?> /> 70 </td> 71 </tr> 72 <tr valign="top"> 73 <th><?php _e( 'Custom CSS', 'owc_sp' ); ?></th> 74 <td> 75 <textarea rows="6" cols="80" id="owc_sp_css" name="owc_sp_css"><?php echo $options['owc_sp_css']; ?></textarea> 76 </td> 77 </tr> 60 78 </table> 61 <p class="submit"><input type="submit" name="owc_section_page_submit" id="owc_section_page_submit" class="button button-primary" value="<?php _e( 'Save Changes', 'owc ' ); ?>"></p>79 <p class="submit"><input type="submit" name="owc_section_page_submit" id="owc_section_page_submit" class="button button-primary" value="<?php _e( 'Save Changes', 'owc_sp' ); ?>"></p> 62 80 </form> 63 81 </div> -
section-page/trunk/owc-section-page.php
r710788 r714378 3 3 Plugin Name: Section Page 4 4 Plugin URI: http://wordpress.org/extend/plugins/section-page/ 5 Description: Section Page is a simple wordpress plugin allowing you to divide a page into sliding sections6 Version: 1.0. 15 Description: Section Page is a simple plugin allowing you to insert dropdown sections in your wordpress pages and posts. 6 Version: 1.0.2 7 7 Author: <a href="https://github.com/Skyree">Loïc B. Florin</a> 8 8 Author URI: Loïc B. Florin … … 40 40 // Admin menu 41 41 function adminMenu() { 42 add_options_page( __( 'Section Page', 'owc_sp' ), __( 'Section Page', 'owc_sp' ), 'manage_options', 'section-page', array(&$this, 'adminPage') ); 42 $plugin_page = add_options_page( __( 'Section Page', 'owc_sp' ), __( 'Section Page', 'owc_sp' ), 'manage_options', 'section-page', array(&$this, 'adminPage') ); 43 add_action( 'admin_head-'. $plugin_page, array( &$this, 'adminEnqueues' ) ); 43 44 } 44 45 … … 46 47 function frontEnqueues() { 47 48 $options = $this->getAdminOptions(); 48 echo '<script type="text/javascript"> 49 '; 50 echo 'var owc_sp_use_char = '.($options['owc_sp_use_char']?'true':'false').'; 51 '; 52 echo '</script>'; 49 50 ?> 51 <script type="text/javascript"> 52 var owc_sp_use_char = <?php echo ($options['owc_sp_use_char']?'true':'false'); ?>; 53 var owc_sp_use_animation = <?php echo ($options['owc_sp_use_animation']?'true':'false'); ?>; 54 </script> 55 <?php 53 56 wp_enqueue_script( 'jquery' ); 54 wp_enqueue_script( 'owc_section_page', plugins_url( 'assets/actions.js .php', __FILE__ ), array( 'jquery' ) );57 wp_enqueue_script( 'owc_section_page', plugins_url( 'assets/actions.js', __FILE__ ), array( 'jquery' ) ); 55 58 echo '<link type="text/css" rel="stylesheet" href="' . plugins_url( 'assets/base.css', __FILE__ ) . '" />'; 59 if($options['owc_sp_css']) { 60 ?> 61 <style type="text/css"> 62 <?php echo $options['owc_sp_css']; ?> 63 </style> 64 <?php 65 } 66 } 67 68 // Scripts and styles loading in admin head 69 function adminEnqueues() { 70 wp_enqueue_script( 'codemirrorjs', plugins_url( 'assets/codemirror.js', __FILE__ ), array() ); 71 wp_enqueue_style( 'codemirrorcss', plugins_url( 'assets/codemirror.css', __FILE__ ), array() ); 72 wp_enqueue_script( 'codemirrorcssjs', plugins_url( 'assets/css.js', __FILE__ ), array() ); 73 wp_enqueue_script( 'codemirroruse', plugins_url( 'assets/codemirror_use.js', __FILE__ ), array('codemirrorjs', 'codemirrorcssjs') ); 74 ?> 75 <style type="text/css"> 76 .CodeMirror { 77 width: 500px; 78 border: 1px solid #ddd; 79 -webkit-border-radius: 5px; 80 -moz-border-radius: 5px; 81 border-radius: 5px; 82 } 83 </style> 84 <?php 56 85 } 57 86 … … 60 89 61 90 $options = $this->getAdminOptions(); 62 $content = preg_replace( '#(\[section\=)(.*?)(\])(.*?)(\[endsection\])#si', '<div class="owc-section-page '.$options['owc_sp_class'].'" data-up="'.$options['owc_sp_close_char'].'" data-down="'.$options['owc_sp_open_char'].'"><div class="owc-sp-open '.$options['owc_sp_class_title'].'"><'.$options['owc_sp_title'].'>'.($options['owc_sp_use_char']?'<span class="owc-sp-toggle-arrow">'.$options['owc_sp_close_char'].'</span> ':'').'$2</'.$options['owc_sp_title'].'></div><div class="owc-sp-content '.$options['owc_sp_class_content'].'">$4</div></div>', $content ); 91 $owc_sp = '<div class="owc-section-page '.$options['owc_sp_class'].'" data-up="'.$options['owc_sp_close_char'].'" data-down="'.$options['owc_sp_open_char'].'">'; 92 $owc_sp_open = '<div class="owc-sp-open '.$options['owc_sp_class_title'].'">'; 93 $owc_sp_elm = '<'.$options['owc_sp_title'].($options['owc_sp_class_title_elm']?' class="'.$options['owc_sp_class_title_elm'].'"':'').'>'.($options['owc_sp_use_char']?'<span class="owc-sp-toggle-arrow">'.$options['owc_sp_close_char'].'</span> ':'').'$2</'.$options['owc_sp_title'].'></div>'; 94 $owc_sp_content = '<div class="owc-sp-content '.$options['owc_sp_class_content'].'">$4</div>'; 95 96 $content = preg_replace( '#(\[section\=)(.*?)(\])(.*?)(\[endsection\])#si', $owc_sp.$owc_sp_open.$owc_sp_elm.$owc_sp_content.'</div>', $content ); 63 97 return $content; 64 98 } … … 69 103 'owc_sp_title' => 'h2', 70 104 'owc_sp_class' => '', 105 'owc_sp_class_title_elm' => '', 71 106 'owc_sp_class_title' => '', 72 107 'owc_sp_class_content' => '', 73 108 'owc_sp_use_char' => true, 74 109 'owc_sp_close_char' => '►', 75 'owc_sp_open_char' => '▼' 110 'owc_sp_open_char' => '▼', 111 'owc_sp_use_animation' => true, 112 'owc_sp_css' => '' 76 113 ); 77 114 $owc_section_pageCurrentAdminOptions = get_option($this->adminOptionsName); -
section-page/trunk/readme.txt
r710788 r714378 2 2 Contributors: Skyree 3 3 Donate link: 4 Tags: content, shortcode, section, dropdown 4 Tags: content, shortcode, section, dropdown, post, posts, page, pages 5 5 Requires at least: 3.0 6 6 Tested up to: 3.5.1 7 Stable tag: 1.0. 17 Stable tag: 1.0.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 60 60 == Changelog == 61 61 62 = 1.0.2 = 63 * New option `Use animation` *Smooth or instant dropdown* 64 * Modified option : `HTML classes for section title` *Now targets the title tag* 65 * New option `HTML classes for section title wrapper` *Previously "Html classes for section title"* 66 * New option `Custom css` *Enter your custom css here* 67 62 68 = 1.0.1 = 63 69 * Bug fix on `HTML classes for section title` and `HTML classes for section content`. Please upgrade if you want to use your own classes on these elements. Else you can use `owc-sp-open` and `owc-sp-content` which are the default classes.
Note: See TracChangeset
for help on using the changeset viewer.