• Hi Coen,

    I really like your plugin and my company’s site has currently 29 smart blocks πŸ™‚

    I’m using the same title for SWBOC posts as for the widget title to indentify them later via the WP backend.
    Much better is some edit post link at the front end.

    Check this code I changed in your widget script:

    $swbox_content = $post->post_content;
    			if ( current_user_can('edit_post', $post->ID) ) $swbox_content .= ' <a href="'.get_edit_post_link($post->ID).'">Edit</a>';
    			echo apply_filters( 'the_content', $swbox_content );

    Maybe you like to add this modification to the next version πŸ™‚

    http://wordpress.org/plugins/smart-wysiwyg-blocks-of-content/

Viewing 1 replies (of 1 total)
  • function ww_add_edit_link($content, $id)
    {
    $content .= ' <a href="'. get_edit_post_link($id).'">Edit</a>';
    }
    
    add_filter('ww_content', 'ww_add_edit_link', 10, 2);

    EDIT: Oops, posted this in the wrong topic.

Viewing 1 replies (of 1 total)
  • The topic ‘Add "edit" link to the front end’ is closed to new replies.