Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




_publish_post_hook [ WordPress Function ]

_publish_post_hook ( $post_id )
Access:
  • private
Parameters:
  • (int) $post_id The ID in the database table of the post being published
Uses:
Defined at:



Hook to schedule pings and enclosures when a post is published.

Source


<?php
function _publish_post_hook($post_id) {
    global 
$wpdb;

    if ( 
defined('XMLRPC_REQUEST') )
        
do_action('xmlrpc_publish_post'$post_id);
    if ( 
defined('APP_REQUEST') )
        
do_action('app_publish_post'$post_id);

    if ( 
defined('WP_IMPORTING') )
        return;

    if ( 
get_option('default_pingback_flag') )
        
add_post_meta$post_id'_pingme''1' );
    
add_post_meta$post_id'_encloseme''1' );

    
wp_schedule_single_event(time(), 'do_pings');
}
?>

Examples [ wp-snippets.com ]

Top Google Search Results

More ...

User discussions [ wordpress.org ]

0 User Note(s)

None yet. Be the first!

Add New ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics