Changeset 1200394
- Timestamp:
- 07/16/2015 07:20:00 PM (11 years ago)
- Location:
- dobsondev-shortcodes
- Files:
-
- 3 edited
- 7 copied
-
tags/1.1.6 (copied) (copied from dobsondev-shortcodes/trunk)
-
tags/1.1.6/changelog.txt (copied) (copied from dobsondev-shortcodes/trunk/changelog.txt) (1 diff)
-
tags/1.1.6/css (copied) (copied from dobsondev-shortcodes/trunk/css)
-
tags/1.1.6/dobsondev-shortcodes.php (copied) (copied from dobsondev-shortcodes/trunk/dobsondev-shortcodes.php) (2 diffs)
-
tags/1.1.6/js (copied) (copied from dobsondev-shortcodes/trunk/js)
-
tags/1.1.6/libs (copied) (copied from dobsondev-shortcodes/trunk/libs)
-
tags/1.1.6/readme.txt (copied) (copied from dobsondev-shortcodes/trunk/readme.txt) (2 diffs)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/dobsondev-shortcodes.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dobsondev-shortcodes/tags/1.1.6/changelog.txt
r1182701 r1200394 15 15 * Minified the CSS and JS scripts (1.1.3) 16 16 * Fixed a bug where GitHub file contents wouldn't display line breaks properly if they were not a markdown file - thanks to [Stephanie Locke](https://github.com/stephlocke) for catching this and letting me know (1.1.5) 17 * Fixed where the Related Posts Shorcode would brick the page it was loading on (1.1.6) 17 18 18 19 -
dobsondev-shortcodes/tags/1.1.6/dobsondev-shortcodes.php
r1182701 r1200394 4 4 * Plugin URI: http://dobsondev.com/portfolio/dobsondev-shortcodes/ 5 5 * Description: A collection of helpful shortcodes. 6 * Version: 1.1. 56 * Version: 1.1.6 7 7 * Author: Alex Dobson 8 8 * Author URI: http://dobsondev.com/ … … 375 375 376 376 377 /* 378 Utility function to get the post by ID for the dobsondev_shrtcode_related_posts function 379 http://wordpress.stackexchange.com/questions/26729/get-excerpt-using-get-the-excerpt-outside-a-loop 380 */ 381 function dobsondev_shrtcode_get_excerpt_by_id( $id, $length ){ 382 $post = get_post($id); // Gets post ID 383 $excerpt = $post->post_content; // Gets post_content to be used as a basis for the excerpt 384 $excerpt = strip_tags(strip_shortcodes($excerpt)); // Strips tags and images 385 $words = explode(' ', $excerpt, $length + 1); 386 387 if(count($words) > $length) : 388 array_pop($words); 389 array_push($words, '…'); 390 $excerpt = implode(' ', $words); 391 endif; 392 393 return $excerpt; 394 } 377 395 /* Adds a shortcode for displaying related posts based on their id */ 378 396 function dobsondev_shrtcode_related_posts($atts) { -
dobsondev-shortcodes/tags/1.1.6/readme.txt
r1182701 r1200394 7 7 Requires at least: 2.5 8 8 Tested up to: 4.2.2 9 Stable tag: 1.1. 59 Stable tag: 1.1.6 10 10 11 11 Add a collection of helpful shortcodes to your site. … … 168 168 * Fixed a naming error for the WordPress transients used in the GitHub README and File shortcodes (1.1.4) 169 169 * Fixed a bug where GitHub file contents wouldn't display line breaks properly if they were not a markdown file - thanks to [Stephanie Locke](https://github.com/stephlocke) for catching this and letting me know (1.1.5) 170 * Fixed where the Related Posts Shorcode would brick the page it was loading on (1.1.6) 170 171 171 172 = - 1.0 - = -
dobsondev-shortcodes/trunk/changelog.txt
r1182701 r1200394 15 15 * Minified the CSS and JS scripts (1.1.3) 16 16 * Fixed a bug where GitHub file contents wouldn't display line breaks properly if they were not a markdown file - thanks to [Stephanie Locke](https://github.com/stephlocke) for catching this and letting me know (1.1.5) 17 * Fixed where the Related Posts Shorcode would brick the page it was loading on (1.1.6) 17 18 18 19 -
dobsondev-shortcodes/trunk/dobsondev-shortcodes.php
r1182701 r1200394 4 4 * Plugin URI: http://dobsondev.com/portfolio/dobsondev-shortcodes/ 5 5 * Description: A collection of helpful shortcodes. 6 * Version: 1.1. 56 * Version: 1.1.6 7 7 * Author: Alex Dobson 8 8 * Author URI: http://dobsondev.com/ … … 375 375 376 376 377 /* 378 Utility function to get the post by ID for the dobsondev_shrtcode_related_posts function 379 http://wordpress.stackexchange.com/questions/26729/get-excerpt-using-get-the-excerpt-outside-a-loop 380 */ 381 function dobsondev_shrtcode_get_excerpt_by_id( $id, $length ){ 382 $post = get_post($id); // Gets post ID 383 $excerpt = $post->post_content; // Gets post_content to be used as a basis for the excerpt 384 $excerpt = strip_tags(strip_shortcodes($excerpt)); // Strips tags and images 385 $words = explode(' ', $excerpt, $length + 1); 386 387 if(count($words) > $length) : 388 array_pop($words); 389 array_push($words, '…'); 390 $excerpt = implode(' ', $words); 391 endif; 392 393 return $excerpt; 394 } 377 395 /* Adds a shortcode for displaying related posts based on their id */ 378 396 function dobsondev_shrtcode_related_posts($atts) { -
dobsondev-shortcodes/trunk/readme.txt
r1182701 r1200394 7 7 Requires at least: 2.5 8 8 Tested up to: 4.2.2 9 Stable tag: 1.1. 59 Stable tag: 1.1.6 10 10 11 11 Add a collection of helpful shortcodes to your site. … … 168 168 * Fixed a naming error for the WordPress transients used in the GitHub README and File shortcodes (1.1.4) 169 169 * Fixed a bug where GitHub file contents wouldn't display line breaks properly if they were not a markdown file - thanks to [Stephanie Locke](https://github.com/stephlocke) for catching this and letting me know (1.1.5) 170 * Fixed where the Related Posts Shorcode would brick the page it was loading on (1.1.6) 170 171 171 172 = - 1.0 - =
Note: See TracChangeset
for help on using the changeset viewer.