Categories
Package/plugin/module WordPress

Easy Post-to-Post Links v2.0

I’d like to announce the official release of the updated Easy Post-to-Post Links plugin (v2.0) for WordPress.

Easily create a link to another post using a simple shortcut that references the post’s id or slug; the link text is the post’s title, unless overridden.

The plugin’s official homepage is located at :
coffee2code.com/wp-plugins/easy-post-to-post-links.

This release debuts the admin options page for the plugin. It introduces a new, preferred syntax for post-to-post link shortcuts (e.g. [post="25"] or [post="hello-world"]) (don’t worry, the older syntax is still optionally supported). You can now also supply text to be used as the link text, overriding the default of using the referenced post’s title (e.g. [post="hello-world" text="My first post"]. The title attribute for the link is also now generated, set to the sanitized value of the referenced post’s title. A bug which prevented references by post slug from working was fixed. There are more examples and documentations. The release also brings with it full compatibility with WordPress 2.3+ and 2.5.

This update is part of coffee2code’s 14 Days of Plugins (updated plugin #15).

Comments welcome on this post for this version of the plugin. Comments will be closed once this release has been superseded by another.

Read more for a detailed ChangeLog of the release.

Detailed ChangeLog

These are the detailed changes, which may or may not make sense to you depending on your familiarity with the previous features and internals of the plugin.

  • Created its own class to encapsulate plugin functionality
  • Added admin options page under Options → Post2Post (or in WP 2.5: Settings → Post2Post). Options are now saved to database, negating need to customize code within the plugin source file.
  • Admin options page also includes documentation and examples
  • Added support for new post-to-post tag syntax of [post='XX']
    (also still works for legacy syntax)
  • Added support for per-post-to-post-link override of display text, i.e. [post='25' title='this post']
  • Fixed bug that prevented linking to posts vis post slug from working
  • Send post’s ID to get_the_title(), not the title
  • Utilize get_the_title() to obtain the post’s title, rather than direct retrieval
  • Added filter so that content seen via RSS gets filtered
  • Filter ‘get_the_except’ instead of ‘the_excerpt’
  • Added new admin option ‘enable_legacy’ to control support of legacy syntax
  • Changed filter priority level to 9 to trigger before some of WP’s formatting filters
  • Added TinyMCE button (w/ custom image) to insert post-to-post link tag into editor. If text is highlighted, it becomes the text=”” value.
  • Fixed Quicktags button support; now it also applies to writing and creating pages
  • Changed installation instructions
  • Added compatibility note
  • Updated copyright date and version to 2.0
  • Moved into its own subdirectory; added readme.txt and screenshot
  • Tested compatibility with WP 2.3.3 and 2.5

7 replies on “Easy Post-to-Post Links v2.0”

I can’t get this to work under 2.6–the quicktag doesn’t appear, and the text in brackets appears in the post exactly as they would in the html view.

Hi! Is it possible to add a option which allows to show the “text” without a link even if there is no target-post found?
Example, if I use [post=”msn” text=”MSN”], the text “MSN” should appear, even if I have no post with the slug msn. This would be helpful to build links to posts, which will be created in the future.
Thanks!

Jens

For those who need a quick help, just change line 376 from
if ( empty($post->post_title) ) return '';
into
if ( empty($post->post_title) ) return $title;
This will return the “text” without a link, if there is no post fitting the query.

Leave a Reply

Your email address will not be published.