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
308      /**
309       * Fires at the beginning of the publishing actions section of the Publish meta box.
310       *
311       * @since 2.7.0
312       * @since 4.9.0 Added the `$post` parameter.
313       *
314       * @param WP_Post|null $post WP_Post object for the current post on Edit Post screen,
315       *                           null on Edit Link screen.
316       */
317      do_action( 'post_submitbox_start', $post );
318      ?>
319 <div id="delete-action">
320      <?php
321      if ( current_user_can( 'delete_post', $post->ID ) ) {
322           if ( ! EMPTY_TRASH_DAYS ) {
323                $delete_text = __( 'Delete Permanently' );
324           } else {
325                $delete_text = __( 'Move to Trash' );
326           }
 
Line Code
1045      <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>
1046 </div>
1047 </div>
1048
1049 </div>
1050
1051 <div id="major-publishing-actions">
1052      <?php
1053      /** This action is documented in wp-admin/includes/meta-boxes.php */
1054      do_action( 'post_submitbox_start', null );
1055      ?>
1056 <div id="delete-action">
1057      <?php
1058      if ( ! empty( $_GET['action'] ) && 'edit' == $_GET['action'] && current_user_can( 'manage_links' ) ) {
1059           printf(
1060                '<a class="submitdelete deletion" href="%s" onclick="return confirm( \'%s\' );">%s</a>',
1061                wp_nonce_url( "link.php?action=delete&amp;link_id=$link->link_id", 'delete-bookmark_' . $link->link_id ),
1062                /* translators: %s: Link name. */
1063                esc_js( sprintf( __( "You are about to delete this link '%s'\n  'Cancel' to stop, 'OK' to delete." ), $link->link_name ) ),