post_trackback_meta_box

Display trackback links form fields.

Description

post_trackback_meta_box( (object) $post ); 

Parameters (1)

0. $post (object)
The post.

Usage

  1. if ( !function_exists( 'post_trackback_meta_box' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/meta-boxes.php'; 
  3.  
  4. // The post. 
  5. $post = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = post_trackback_meta_box($post); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/includes/meta-boxes.php  
  1. function post_trackback_meta_box($post) { 
  2. $form_trackback = '<input type="text" name="trackback_url" id="trackback_url" class="code" value="' . 
  3. esc_attr( str_replace( "\n", ' ', $post->to_ping ) ) . '" aria-describedby="trackback-url-desc" />'; 
  4. if ('' != $post->pinged) { 
  5. $pings = '<p>'. __('Already pinged:') . '</p><ul>'; 
  6. $already_pinged = explode("\n", trim($post->pinged)); 
  7. foreach ($already_pinged as $pinged_url) { 
  8. $pings .= "\n\t<li>" . esc_html($pinged_url) . "</li>"; 
  9. $pings .= '</ul>'; 
  10.  
  11. ?> 
  12. <p> 
  13. <label for="trackback_url"><?php _e( 'Send trackbacks to:' ); ?></label> 
  14. <?php echo $form_trackback; ?> 
  15. </p> 
  16. <p id="trackback-url-desc" class="howto"><?php _e( 'Separate multiple URLs with spaces' ); ?></p> 
  17. <p><?php 
  18. printf( 
  19. /** translators: %s: Codex URL */ 
  20. __( 'Trackbacks are a way to notify legacy blog systems that you’ve linked to them. If you link other WordPress sites, they’ll be notified automatically using <a href="%s">pingbacks</a>, no other action necessary.' ),  
  21. __( 'https://codex.wordpress.org/Introduction_to_Blogging#Managing_Comments' ) 
  22. ); 
  23. ?></p> 
  24. <?php 
  25. if ( ! empty($pings) ) 
  26. echo $pings;