You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As mentioned in #23 we need the ability to allow an authorsied user easy access to the editor for a displayed post.
This should work for a single post or for any post listed in a query-posts block.
Requirements
Ability to display an edit link for the current post
Displayed to users who have the authority to edit the post
The link text should be (Edit), by default
Proposed solution
In genesis-a2z this was implemented using the [edit] shortcode.
In oik, a similar capability is implemented in the [bw_pages] shortcode as part of the format= parameter.
A value of lower case e causes the [Edit] link to appear for the current post.
It uses the WordPress core function get_edit_post_link()
/**
* Format the Edit post link (format=e)
*
*/
function bw_field_function_edit( $post, &$atts, $f ) {
$link = get_edit_post_link( $post->ID );
if ( $link ) {
BW_::alink( "bw_edit", $link, __( "[Edit]", "oik" ) );
}
}
The text was updated successfully, but these errors were encountered:
As mentioned in #23 we need the ability to allow an authorsied user easy access to the editor for a displayed post.
This should work for a single post or for any post listed in a query-posts block.
Requirements
(Edit)
, by defaultProposed solution
In genesis-a2z this was implemented using the
[edit]
shortcode.In oik, a similar capability is implemented in the
[bw_pages]
shortcode as part of theformat=
parameter.A value of lower case
e
causes the[Edit]
link to appear for the current post.It uses the WordPress core function
get_edit_post_link()
The text was updated successfully, but these errors were encountered: