BACK TO DIRECTORY

Sewn In Post Delete

by Jupitercow

0.0
(0 ratings)

Adds a shortcode and action to add a “Delete Post” link to posts so user’s can delete them. By default it requires the user to have the “delete_post” capability for the post in question, but if you want anarchy, you can customize that all the way to loggedin or even public…

SHORTCODE

[sewn_post_delete_link] // Loads current post for editing

[sewn_post_delete_link text="Bye bye post" before="" after="" title="" class=""] // Will change the link text to "Bye bye post"

Attributes

These are the same arguments for in template action below.

text = link text
before = html to show before the link
after = html to show after the link
title = the link title, defaults to link text
class = extra classes to add to the link

IN TEMPLATE

This will show the link to users have the ability to use it.

do_action('sewn/post_delete/link');

do_action('sewn/post_delete/link', array('text'=>"Bye bye post", 'before'=>'', 'after'=>'', title=>'', 'class'=>''));

Screenshots

The basic shortcode in the backend.

The basic shortcode in the backend.

The default delete link on the frontend.

The default delete link on the frontend.

Plugin Details

Active Installs
10
Total Downloads
1,654
Version
1.0.1
Requires WP
3.6.1
Requires PHP
Tested Up To
4.2.39
Added
2015-06-13
Last Updated
2015-06-13 1:11am GMT

Ratings

5
0
4
0
3
0
2
0
1
0