Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Pass tarski_post_metadata_edit output through edit_post_link filters.…

… Thanks to Martin Lormes for suggesting this.
  • Loading branch information...
commit c9ae4bab55051da0e2895574fc2cd302dd22df5d 1 parent c55d00c
@beastaugh authored
Showing with 8 additions and 1 deletion.
  1. +2 −0  changelog.txt
  2. +6 −1 library/helpers/content_helper.php
View
2  changelog.txt
@@ -9,6 +9,8 @@
#### Tweaks
+ * The output of `tarski_post_metadata_edit` now passes through
+ `edit_post_link` filters.
* Added default navbar for sites without menus defined
* New search form placeholder fallback JavaScript
* Tarski now depends on jQuery
View
7 library/helpers/content_helper.php
@@ -330,19 +330,24 @@ function tarski_post_metadata_date($metadata) {
* @see tarski_post_metadata
*
* @param string $metadata
+ * @global object $post
* @return string
*/
function tarski_post_metadata_edit($metadata) {
$uri = get_edit_post_link();
if ($uri) {
+ global $post;
+
$edit_link = sprintf(
'<a class="post-edit-link" href="%s" title="%s">%s</a>',
$uri,
esc_attr(__('Edit this post', 'tarski')),
esc_html(__('edit', 'tarski')));
- $metadata .= ' <span class="edit">(' . $edit_link . ')</span>';
+ $metadata .= ' <span class="edit">('
+ . apply_filters('edit_post_link', $edit_link, $post->ID)
+ . ')</span>';
}
return $metadata;
Please sign in to comment.
Something went wrong with that request. Please try again.