* Fires after the post time/date setting in the Publish meta box.
*
* @since 2.9.0
+ * @since 4.4.0 Added the `$post` parameter.
+ *
+ * @param WP_Post $post WP_Post object for the current post.
*/
-do_action( 'post_submitbox_misc_actions' );
+do_action( 'post_submitbox_misc_actions', $post );
?>
@@ -324,7 +323,7 @@ function attachment_submit_meta_box( $post ) {
ID ) )
if ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) {
- echo "" . __( 'Trash' ) . "";
+ echo "" . _x( 'Trash', 'verb' ) . "";
} else {
$delete_ays = ! MEDIA_TRASH ? " onclick='return showNotice.warn();'" : '';
echo "" . __( 'Delete Permanently' ) . "";
@@ -356,7 +355,7 @@ function attachment_submit_meta_box( $post ) {
*
* @type string $id Meta box ID.
* @type string $title Meta box title.
- * @type callback $callback Meta box display callback.
+ * @type callable $callback Meta box display callback.
* @type array $args Extra meta box arguments.
* }
*/
@@ -397,7 +396,7 @@ function post_format_meta_box( $post, $box ) {
*
* @type string $id Meta box ID.
* @type string $title Meta box title.
- * @type callback $callback Meta box display callback.
+ * @type callable $callback Meta box display callback.
* @type array $args {
* Extra meta box arguments.
*
@@ -417,19 +416,24 @@ function post_tags_meta_box( $post, $box ) {
$taxonomy = get_taxonomy( $r['taxonomy'] );
$user_can_assign_terms = current_user_can( $taxonomy->cap->assign_terms );
$comma = _x( ',', 'tag delimiter' );
+ $terms_to_edit = get_terms_to_edit( $post->ID, $tax_name );
+ if ( ! is_string( $terms_to_edit ) ) {
+ $terms_to_edit = '';
+ }
?>
-
labels->add_or_remove_items; ?>
-
+
+
+
-
-
+
+
-
labels->separate_items_with_commas; ?>
+
labels->separate_items_with_commas; ?>
@@ -453,7 +457,7 @@ function post_tags_meta_box( $post, $box ) {
*
* @type string $id Meta box ID.
* @type string $title Meta box title.
- * @type callback $callback Meta box display callback.
+ * @type callable $callback Meta box display callback.
* @type array $args {
* Extra meta box arguments.
*
@@ -486,30 +490,65 @@ function post_categories_meta_box( $post, $box ) {
"; // Allows for an empty term set to be sent. 0 is an invalid Term ID and will be ignored by empty() checks.
- ?>
+ $name = ( $tax_name == 'category' ) ? 'post_category' : 'tax_input[' . $tax_name . ']';
+ echo ""; // Allows for an empty term set to be sent. 0 is an invalid Term ID and will be ignored by empty() checks.
+ ?>