Plugin Directory

Changeset 1200394


Ignore:
Timestamp:
07/16/2015 07:20:00 PM (11 years ago)
Author:
DobsonDev
Message:

Tagging Version 1.1.6. Fixed where the Related Posts Shortcode would brick the page it was loading on.

Location:
dobsondev-shortcodes
Files:
3 edited
7 copied

Legend:

Unmodified
Added
Removed
  • dobsondev-shortcodes/tags/1.1.6/changelog.txt

    r1182701 r1200394  
    1515* Minified the CSS and JS scripts (1.1.3)
    1616* 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)
    1718
    1819
  • dobsondev-shortcodes/tags/1.1.6/dobsondev-shortcodes.php

    r1182701 r1200394  
    44 * Plugin URI: http://dobsondev.com/portfolio/dobsondev-shortcodes/
    55 * Description: A collection of helpful shortcodes.
    6  * Version: 1.1.5
     6 * Version: 1.1.6
    77 * Author: Alex Dobson
    88 * Author URI: http://dobsondev.com/
     
    375375
    376376
     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*/
     381function 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}
    377395/* Adds a shortcode for displaying related posts based on their id */
    378396function dobsondev_shrtcode_related_posts($atts) {
  • dobsondev-shortcodes/tags/1.1.6/readme.txt

    r1182701 r1200394  
    77Requires at least: 2.5
    88Tested up to: 4.2.2
    9 Stable tag: 1.1.5
     9Stable tag: 1.1.6
    1010
    1111Add a collection of helpful shortcodes to your site.
     
    168168* Fixed a naming error for the WordPress transients used in the GitHub README and File shortcodes (1.1.4)
    169169* 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)
    170171
    171172= - 1.0 - =
  • dobsondev-shortcodes/trunk/changelog.txt

    r1182701 r1200394  
    1515* Minified the CSS and JS scripts (1.1.3)
    1616* 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)
    1718
    1819
  • dobsondev-shortcodes/trunk/dobsondev-shortcodes.php

    r1182701 r1200394  
    44 * Plugin URI: http://dobsondev.com/portfolio/dobsondev-shortcodes/
    55 * Description: A collection of helpful shortcodes.
    6  * Version: 1.1.5
     6 * Version: 1.1.6
    77 * Author: Alex Dobson
    88 * Author URI: http://dobsondev.com/
     
    375375
    376376
     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*/
     381function 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}
    377395/* Adds a shortcode for displaying related posts based on their id */
    378396function dobsondev_shrtcode_related_posts($atts) {
  • dobsondev-shortcodes/trunk/readme.txt

    r1182701 r1200394  
    77Requires at least: 2.5
    88Tested up to: 4.2.2
    9 Stable tag: 1.1.5
     9Stable tag: 1.1.6
    1010
    1111Add a collection of helpful shortcodes to your site.
     
    168168* Fixed a naming error for the WordPress transients used in the GitHub README and File shortcodes (1.1.4)
    169169* 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)
    170171
    171172= - 1.0 - =
Note: See TracChangeset for help on using the changeset viewer.