• Stars
    star
    158
  • Rank 236,526 (Top 5 %)
  • Language
    PHP
  • License
    GNU General Publi...
  • Created over 7 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

WordPress plugin to ease Custom Post Statuses integration

WP Statuses

Whether you are using the Classic editor or the Block Editor of WordPress, WP Statuses brings an API to control the post types your custom Post Status will be applied to. It also adapts the various WordPress Administration UIs to let you manage all the available statuses for you post (including the custom ones of course!).

Below are screenshots of how it looks into WordPress editors.

Built in statuses in the Publishing Metabox Block Editor
Classic Editor Block Editor

This is a safely way to wait until the WordPress trac ticket #12706 and the Gutenberg GitHub issue #3144 are fixed.

PS: The Password protected visibility option is now included into the statuses dropdowns and labels for Private and Published has been renamed respectively to Privately published and Publicly published.

Custom statuses for builtin Post Types

add_filter( 'wp_statuses_use_custom_status', '__return_true' );

Using the above filter will demonstrate how it is possible to add custom statuses for WordPress builtin Post Types.

  • A new restricted status for the page's post type. Pages using this status will need the user to be logged in to view their content.
  • A new archive status for the post's post type. Posts using this status will be removed from front-end loops and only viewable from the Archived view of the Posts Administration screen.

Custom statuses for Custom Post Types

In this gist a new Post Type named "ticket" is registered along with custom statuses. It's a tiny use case showing how you can with less than 150 lines begin to build an Issue reporting system. The ticket's post type has five statuses:

  • The WordPress builtin Draft and Pending statuses,
  • Three custom statuses: assigned, resolved & invalid, as shown below.

Custom statuses in the Publishing Metabox

WP Statuses also takes care of the Bulk Edit and Quick Edit actions of the Post types administration screens. Below is a screen capture of the Quick Edit form for an item of the ticket's post type.

Quick edit

Registering a custom status

To register a custom status and make it appear into the Post Type's UIs, you will use the WordPress' register_post_status() function making sure to add these WP Statuses specific arguments. Below is the list of them.

Type Name Description
Array post_type The list of post type names the status should be applied to
bool show_in_metabox_dropdown Whether to show the status in the Publishing Metabox
bool show_in_inline_dropdown Whether to show the status in the Bulk Edit and Quick Edit forms
Array labels An associative array containing the labels for the two previous contexts. If there are not defined, The value of the label argument of the register_post_status() function will be used. Keys are metabox_dropdown for the Publishing Metabox and inline_dropdown for Bulk/Quick Edit forms
String dashicon The dachicon's name

For example, to add an archive custom status to Posts, you can use the WordPress function this way:

register_post_status( 'archive', array(
		/* WordPress built in arguments. */
		'label'                       => __( 'Archive', 'wp-statuses' ),
		'label_count'                 => _n_noop( 'Archived <span class="count">(%s)</span>', 'Archived <span class="count">(%s)</span>', 'wp-statuses' ),
		'public'                      => false,
		'show_in_admin_all_list'      => false,
		'show_in_admin_status_list'   => true,

		/* WP Statuses specific arguments. */
		'post_type'                   => array( 'post' ), // Only for posts!
		'show_in_metabox_dropdown'    => true,
		'show_in_inline_dropdown'     => true,
		'show_in_press_this_dropdown' => true,
		'labels'                      => array(
			'metabox_dropdown' => __( 'Archived',        'wp-statuses' ),
			'inline_dropdown'  => __( 'Archived',        'wp-statuses' ),
		),
		'dashicon'                    => 'dashicons-archive',
	) );

Configuration needed

  • WordPress 5.0

Installation

Before activating the plugin, make sure all the files of the plugin are located in /wp-content/plugins/wp-statuses folder.

More Repositories

1

bp-reshare

BuddyPress component to reshare activities
PHP
33
star
2

entrepot

A list of free GitHub.com hosted WordPress plugins, themes & blocks
PHP
31
star
3

bp-groups-taxo

Experimental BuddyPress plugin to add tags to Groups
PHP
30
star
4

wp-idea-stream

Share ideas, great ones will rise to the top!
PHP
27
star
5

altctrl-public-group

BuddyPress plugin to provide an alternative control to group admins on their public groups
PHP
22
star
6

mediatheque

An alternative Media Management for WordPress.
PHP
20
star
7

bp-reactions

React to BuddyPress activities!
PHP
19
star
8

wordcamp-talks

Manage your WordCamp Call for Speakers.. In WordPress!
PHP
17
star
9

gutenblocks

My personal collection of Gutenberg blocks.
PHP
14
star
10

bp-wake-up-sleepers

sends email in case buddies felt asleep
PHP
12
star
11

buddy-bbPress-Support-Topic

Simple bbPress plugin to add support functionnality to topics
PHP
10
star
12

types-de-membre

Adds a dropdown control to filter the BuddyPress Members directory by types.
PHP
10
star
13

communaute-protegee

Restrict the access to your BuddyPress community
PHP
9
star
14

gutenprez

Do your keynote about Gutenberg using Gutenberg
PHP
8
star
15

modal-buddy

Modal Boxes for BuddyPress objects
PHP
7
star
16

profil-de-groupes

Profile fields for your BuddyPress groups
PHP
7
star
17

wp-comment-types

WordPress Comment Types feature (as a plugin)
PHP
7
star
18

bp-avatar-suggestions

A BuddyPress plugin to add an avatar suggestions list
PHP
7
star
19

activites-de-publication

Use the BuddyPress activities to boost conversations about your WordPress posts.
PHP
7
star
20

bp-bookmarklet

Let the members of your BuddyPress powered community add a Bookmarklet to their browser to share interesting web pages
PHP
6
star
21

wp-manual

A WordPress plugin to create a manual for your blog, theme, plugin or any application.
PHP
6
star
22

reception

BuddyPress plugin to customize members front page using WordPress Blocks
PHP
6
star
23

bp-invitation

BuddyPress plugin to restrict registration to invited users
PHP
6
star
24

bp-idea-stream

Share ideas, the BuddyPress Way!
PHP
6
star
25

buddybooth

BuddyPress plugin to add a photobooth in users change avatar page
JavaScript
5
star
26

bp-activity-replies

Brings screen notifications when a BuddyPress activity is commented
PHP
5
star
27

bbp-avatar

A plugin to add a local Avatar management for your bbPress forum participants.
PHP
4
star
28

bp-sidebar-item-nav

Testing Vertical nav for BuddyPress items (Group or Member) main nav
PHP
4
star
29

bp-email-header-logo

Use the WordPress Site Icon feature to add your site logo inside the header of the BuddyPress emails.
PHP
4
star
30

vingt-dixsept

A TwentySeventeen's kid.
PHP
4
star
31

bp-loop-filters

Plugin to follow the BuddyPress codex Article : Add custom filters to loops and enjoy them within your plugin
PHP
4
star
32

activity-sticker

BuddyPress plugin to stick an activity on top of SWA directory
PHP
4
star
33

bp-code-snippets

PHP
3
star
34

docutheques

An alternative & document oriented organization for your WordPress media
JavaScript
3
star
35

carte-de-survol

BuddyPress plugin to add hovercards to user links.
PHP
3
star
36

required-block-attributes

WordPress plugin to check required block attributes are set when a post is published
PHP
3
star
37

workmates

WorkMates Brings BP Nouveau Group Invites UI into BP Legacy.
PHP
3
star
38

wp-query-block-attributes

Introduce a new WP_Query parameter to run block attributes queries.
PHP
3
star
39

thaim

my first WordPress theme
PHP
3
star
40

buddyplug

my template for building BuddyPress plugins.
PHP
3
star
41

bp-activity-2017

A TwentySeventeen child theme to show how to use the WP Editor for the BuddyPress activity post form.
PHP
3
star
42

bp-wc-account

Integrates the WooCommerce "My Account" pages inside the BuddyPress user's profile
PHP
3
star
43

wc-talk

Extends WP Idea Stream to manage WordCamp talk proposals
PHP
2
star
44

bp-template-checker

Experimental - do not use !!
PHP
2
star
45

front-end-attachments

Plugin used during my WordCamp Paris 2016 talk to illustrate how to benefit from the BP Attachment API.
PHP
2
star
46

imath-upgrader

my very own upgrader...
PHP
2
star
47

meilleur-copain

BuddyPress Nouveau template pack polisher
PHP
1
star
48

bp-blogs-extended

Experimental plugin to add single items to the BuddyPress Blogs component
PHP
1
star
49

custom-file-for-messages

Sample BuddyPress plugin to demonstrate the BP_Attachment class introduced in 2.3
PHP
1
star
50

bowe-codes

Git repo of the WordPress plugin
PHP
1
star
51

retroliens

Adds a new sidebar to the WordPress Blocks Editor to manage trackbacks
PHP
1
star
52

bp-mystery-man-hunt

BuddyPress child theme
PHP
1
star
53

gdpr-compliance-is-not-a-worse-user-experience

Keeps the comment author's feedback even if he opts-out cookies consent in WordPress 4.9.6 (see https://core.trac.wordpress.org/ticket/43857)
PHP
1
star
54

bp-custom-addon

A BuddyPress Add-on example
PHP
1
star
55

bporg-developer

Theme for the developer.buddypress.org site
PHP
1
star
56

buddypress

BuddyPress DEVELOPMENT repo. This repository is just a mirror of the development SVN at https://buddypress.svn.wordpress.org/. Please include a link to a pre-existing ticket on https://buddypress.trac.wordpress.org/ with every pull request.
PHP
1
star
57

buddypress-monster-widget

PHP
1
star