Deprecated: Function split() is deprecated in /home/webconte/public_html/sandbox19/wp-content/plugins/custom-status/index.php on line 163
Deprecated: Function split() is deprecated in /home/webconte/public_html/sandbox19/wp-content/plugins/custom-status/index.php on line 164
#163: list($count_singular_val,$dummy) = split(‘ ‘,$label_count[‘singular’],2);
#164: list($count_plural_val,$dummy) = split(‘ ‘,$label_count[‘plural’],2);
tks
]]>We have multiple people submitting articles in our department. After the author is complete, they are to set their posts as “Review” status so that a team can review the post. When they create a new article and select a custom status of “Review” and then press Save Draft button, the article is published anyways. The visibility status is set to Public, though the custom status was not configured to display as Public. These articles are not ready for public viewing and we thought by setting them as this new custom status, they’d would not actually be published.
Also – we created another status (“Formatted”) last week to flag articles that were ready for final approval, applied this status to one post, then decided that we’d go with another route for approving articles. We deleted the custom status of “Formatted” and found out that the article with that custom status applied was deleted from wordpress. Luckily we had the contents of the article saved and we could recreate it, however, this would have really sucked to have tagged a ton of articles with a custom status and have them be deleted when the custom status is deleted.
TLDR: Deleting a custom status will also delete any articles with that custom status.
]]>I added a new custom status with this plugin. When bulk-editing posts, the new status does not appear in the menu.
]]>This plugin seems interesting, though lacking documentation.
Could you provide some examples just like Codex does on how to use the hooks your plugin adds to WordPress ?
Best regards,
Antoine
Replaced:
if ($editable_statuses_array=='') $editable_statuses_array=array();
By:
if ($editable_statuses_array=='' || !is_array($editable_statuses_array)) $editable_statuses_array=array();
Then, the block:
list($count_singular_val,$dummy) = split(' ',$label_count['singular'],2);
list($count_plural_val,$dummy) = split(' ',$label_count['plural'],2);
$public_val = $status->public;
if (in_array($status->name,$editable_statuses)) {
echo cs_print_custom_status($i, $opt_val, $slug_val, $count_singular_val, $count_plural_val, $public_val);
$i++;
} else {
if (('inherit'!=$status->name) && ('auto-draft'!=$status->name))
$field .= '<p>' . $label_default . ' <input type="text" readonly="readonly" id="fixed_status_'.$slug_val .'" name="fixed_status_'.$slug_val . '" value="' . $status->label . '" size="20"></p>';
}
Needed to be wrapped with:
if (isset($label_count['singular']) && isset($label_count['plural'])) {
// same code here
}
Bonus: in case you are using it with “Events+” plugin (by WPMUdev)
This plugin manages recurrent events, thus creates an internal statuts “recurrent” that will also populate Custom Status’ dropdown.
So I had to exclude this type from displaying in the list.
Replace line:
if ($status->name != "auto-draft" && $status->name != "inherit" ) {
By:
if ($status->name != "auto-draft" && $status->name != "inherit" && $status->name != "recurrent" ) {
That’s all for today.
Best,
Germain
After installing (and reinstalling), there is no save button in the “Publish Custom” area. I deactivate, and it returns. Any solution to this? Your plugin is the ONLY one I’ve found that does what I need.
]]>I had hoped that that would complete register_post_status function in 3.4 but they didn’t, just stumbled on your plugin and excited to get it running on a few sites needing this functionality.
I installed and tested it with multiple custom post types and pages and neither will keep the custom status of “Inactive” except for posts. It displays in the dropdown on all the post types though.
]]>