Changeset 504345
- Timestamp:
- 02/13/2012 03:23:50 PM (14 years ago)
- Location:
- auto-more-tag
- Files:
-
- 5 added
- 3 edited
-
tags/3.1 (added)
-
tags/3.1/auto-more-options-page.php (added)
-
tags/3.1/auto-more.php (added)
-
tags/3.1/readme.txt (added)
-
tags/3.1/screenshot-1.png (added)
-
trunk/auto-more-options-page.php (modified) (1 diff)
-
trunk/auto-more.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
auto-more-tag/trunk/auto-more-options-page.php
r470073 r504345 112 112 </select> 113 113 </div> 114 <div> 115 <label for="tw_auto_more_tag[set_pages]">Set More Tag On Pages?</label> 116 <select id="tw_auto_more_tag[set_pages]" name="tw_auto_more_tag[set_pages]"> 117 <option value="0" <?php echo (!isset($options['set_pages']) || $options['set_pages'] == false) ? 'selected="SELECTED" ' : null;?>/>No 118 <option value="1" <?php echo (isset($options['set_pages']) && $options['set_pages'] == true) ? 'selected="SELECTED" ' : null;?>/>Yes 119 </select> 120 </div> 114 121 <p class="submit"> 115 122 <input type="submit" class="button-primary" value="<?php _e('Update Auto More Tag Settings'); ?>" /> -
auto-more-tag/trunk/auto-more.php
r495757 r504345 6 6 Author: Travis Weston 7 7 Author URI: http://travisweston.com/ 8 Version: 3. 08 Version: 3.1 9 9 */ 10 10 … … 44 44 45 45 public static function addTag($data, $arr = array()){ 46 46 global $post; 47 47 $options = get_option('tw_auto_more_tag'); 48 48 49 if($post->post_type != 'post' && $options['set_pages'] != true){ 50 $data = str_replace('<!--more-->', '', $data); 51 return $data; 52 } 49 53 $length = $options['quantity']; 50 54 $breakOn = $options['break']; … … 124 128 } 125 129 126 $start = trim(substr($data, 0, $insertSpot));127 $end = trim(substr($data, $insertSpot));128 129 if(strlen( $start) > 0 && strlen($end) > 0)130 $start = substr($data, 0, $insertSpot); 131 $end = substr($data, $insertSpot); 132 133 if(strlen(trim($start)) > 0 && strlen(trim($end)) > 0) 130 134 $data = $start.'<!--more-->'.$end; 131 135 … … 160 164 } 161 165 162 $start = trim(substr($data, 0, $insertSpot));163 $end = trim(substr($data, $insertSpot));164 165 if(strlen( $start) > 0 && strlen($end) > 0)166 $start = substr($data, 0, $insertSpot); 167 $end = substr($data, $insertSpot); 168 169 if(strlen(trim($start)) > 0 && strlen(trim($end)) > 0) 166 170 $data = $start.'<!--more-->'.$end; 167 171 … … 203 207 } 204 208 205 $start = trim(substr($data, 0, $insertSpot));206 $end = trim(substr($data, $insertSpot));207 208 if(strlen( $start) > 0 && strlen($end) > 0)209 $start = substr($data, 0, $insertSpot); 210 $end = substr($data, $insertSpot); 211 212 if(strlen(trim($start)) > 0 && strlen(trim($end)) > 0) 209 213 $data = $start.'<!--more-->'.$end; 210 214 -
auto-more-tag/trunk/readme.txt
r495759 r504345 5 5 Requires at least: 3.2.1 6 6 Tested up to: 3.4 7 Stable tag: 3. 07 Stable tag: 3.1 8 8 9 9 Allows you to add a More tag to your post automatically upon publication. … … 34 34 35 35 == Changelog == 36 = 3.1 = 37 Added functionality to allow you to forgo the auto more tag on Pages. 38 36 39 = 3.0 = 37 40 Improved intelligent placement, fixing glitch with HTML. Placement is now based on plaintext, and not HTML content. Added capabilities to place by word count.
Note: See TracChangeset
for help on using the changeset viewer.