A simpler way to get link HTML by passing a post slug, ID, or WP_Post object.
Get post by slug:
use WaughJ\WPPostLink\WPPostLink;
$link = new WPPostLink([ 'slug' => 'contact-us' ]);
echo $link;
- Fix getting post by slug so that it works for children of other pages
- Previous version using slug inadvertedly seeked page by path, not slug. Now using a slug seeks by slug specifically
- Update TestHashItem dependency
- Make compatible with WordPress plugin rules
- Make compatible with WordPress plugin rules
- Make compatible with WordPress
- Make compatible with WordPress plugin rules
- Make default post_type mo' inclusive
- Make default post_type mo' inclusive so that it includes all types o' posts 'stead o' just pages.
- Incorporate bugfix from HTMLLink
- Add PostType
- Create initial usable release