Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: post_submitbox_start

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

This hook occurs 2 times in this file.

Line Code
320      /**
321       * Fires at the beginning of the publishing actions section of the Publish meta box.
322       *
323       * @since 2.7.0
324       * @since 4.9.0 Added the `$post` parameter.
325       *
326       * @param WP_Post|null $post WP_Post object for the current post on Edit Post screen,
327       *                           null on Edit Link screen.
328       */
329      do_action( 'post_submitbox_start', $post );
330      ?>
331      <div id="delete-action">
332           <?php
333           if ( current_user_can( 'delete_post', $post_id ) ) {
334                if ( ! EMPTY_TRASH_DAYS ) {
335                     $delete_text = __( 'Delete permanently' );
336                } else {
337                     $delete_text = __( 'Move to Trash' );
338                }
 
Line Code
1060      <label for="link_private" class="selectit"><input id="link_private" name="link_visible" type="checkbox" value="N" <?php checked( $link->link_visible, 'N' ); ?> /> <?php _e( 'Keep this link private' ); ?></label>
1061 </div>
1062 </div>
1063
1064 </div>
1065
1066 <div id="major-publishing-actions">
1067      <?php
1068      /** This action is documented in wp-admin/includes/meta-boxes.php */
1069      do_action( 'post_submitbox_start', null );
1070      ?>
1071 <div id="delete-action">
1072      <?php
1073      if ( ! empty( $_GET['action'] ) && 'edit' === $_GET['action'] && current_user_can( 'manage_links' ) ) {
1074           printf(
1075                '<a class="submitdelete deletion" href="%s" onclick="return confirm( \'%s\' );">%s</a>',
1076                wp_nonce_url( "link.php?action=delete&amp;link_id=$link->link_id", 'delete-bookmark_' . $link->link_id ),
1077                /* translators: %s: Link name. */
1078                esc_js( sprintf( __( "You are about to delete this link '%s'\n  'Cancel' to stop, 'OK' to delete." ), $link->link_name ) ),