Changeset 740505
- Timestamp:
- 07/14/2013 09:09:43 AM (12 years ago)
- Location:
- bp-limit-activity-length
- Files:
-
- 1 added
- 2 edited
- 10 copied
Legend:
- Unmodified
- Added
- Removed
-
bp-limit-activity-length/tags/0.3.5/bp-limit-activity-length.php
r697791 r740505 4 4 Plugin URI: http://trenvo.com 5 5 Description: Limit the maximum length of activities like Twitter 6 Version: 0.3. 46 Version: 0.3.5 7 7 Author: Mike Martel 8 8 Author URI: http://trenvo.com … … 18 18 * @since 0.1 19 19 */ 20 define('BP_LAL_VERSION', '0.3. 4');20 define('BP_LAL_VERSION', '0.3.5'); 21 21 22 22 /** … … 145 145 $words = str_word_count( $stripped_content, 2 ); 146 146 if ( count ( $words ) > $this->limit ) { 147 $word_positions = array_keys 147 $word_positions = array_keys( $words ); 148 148 $last_word_position = $word_positions[$this->limit]; 149 $content = substr($stripped_content,0,$last_word_position);149 $content = mb_substr( $stripped_content, 0, $last_word_position ); 150 150 } 151 151 } else { 152 $chars = strlen( $stripped_content );152 $chars = mb_strlen( $stripped_content ); 153 153 $diff = $this->limit - $chars; 154 154 155 155 if ( $diff < 0 ) { 156 $content = substr( $stripped_content, 0, $this->limit );156 $content = mb_substr( $stripped_content, 0, $this->limit ); 157 157 } 158 158 } -
bp-limit-activity-length/tags/0.3.5/readme.txt
r706820 r740505 5 5 Requires at least: WP3.5, BP1.6 6 6 Tested up to: WP3.5.1, BP1.6.3 7 Stable tag: 0.3. 47 Stable tag: 0.3.5 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 34 34 == Changelog == 35 35 36 =0.3.5= 37 38 * Made the truncation count characters not bytes, so multibyte characters are counted as 1 (thanks to Jonas Knupp!) 39 36 40 =0.3.4= 37 41 -
bp-limit-activity-length/trunk/bp-limit-activity-length.php
r697791 r740505 4 4 Plugin URI: http://trenvo.com 5 5 Description: Limit the maximum length of activities like Twitter 6 Version: 0.3. 46 Version: 0.3.5 7 7 Author: Mike Martel 8 8 Author URI: http://trenvo.com … … 18 18 * @since 0.1 19 19 */ 20 define('BP_LAL_VERSION', '0.3. 4');20 define('BP_LAL_VERSION', '0.3.5'); 21 21 22 22 /** … … 145 145 $words = str_word_count( $stripped_content, 2 ); 146 146 if ( count ( $words ) > $this->limit ) { 147 $word_positions = array_keys 147 $word_positions = array_keys( $words ); 148 148 $last_word_position = $word_positions[$this->limit]; 149 $content = substr($stripped_content,0,$last_word_position);149 $content = mb_substr( $stripped_content, 0, $last_word_position ); 150 150 } 151 151 } else { 152 $chars = strlen( $stripped_content );152 $chars = mb_strlen( $stripped_content ); 153 153 $diff = $this->limit - $chars; 154 154 155 155 if ( $diff < 0 ) { 156 $content = substr( $stripped_content, 0, $this->limit );156 $content = mb_substr( $stripped_content, 0, $this->limit ); 157 157 } 158 158 } -
bp-limit-activity-length/trunk/readme.txt
r706820 r740505 5 5 Requires at least: WP3.5, BP1.6 6 6 Tested up to: WP3.5.1, BP1.6.3 7 Stable tag: 0.3. 47 Stable tag: 0.3.5 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 34 34 == Changelog == 35 35 36 =0.3.5= 37 38 * Made the truncation count characters not bytes, so multibyte characters are counted as 1 (thanks to Jonas Knupp!) 39 36 40 =0.3.4= 37 41
Note: See TracChangeset
for help on using the changeset viewer.