de

wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren




_publish_post_hook [ WordPress Function ]

_publish_post_hook ( $post_id )
Zugriff:
  • private
Parameter:
  • (int) $post_id The ID in the database table of the post being published
Nutzt:
Definiert in:



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');
}
?>

Beispiele [ wp-snippets.com ]

Top Google Suchergebnisse

Mehr ...

Nutzerduskussionen [ wordpress.org ]

0 Nutzerkommentare

Noch keine. Sei der Erste!

Neu hinzufügen ...



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