_publish_post_hook [ WordPress Function ]
_publish_post_hook ( $post_id )
| Access: |
|
| Parameters: |
|
| Uses: | |
| Defined at: |
|
Similar Functions: wp_publish_post, _save_post_hook, _future_post_hook, wp_set_post_lock, get_plugin_page_hook
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
- _publish_post_hook (WordPress Function) - WPSeek.com
WordPress lookup for _publish_post_hook, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers and theme authors.
wpseek.com - _publish_post_hook() WordPress function reference, arguments and ...
Hook to schedule pings and enclosures when a post is published.
queryposts.com - #10545 (_publish_post_hook (adding to postmeta existing hooks ...
Description. The problem that each time yuo press publish (assuming this is a save button) wp add to postmeta table new records even thay already exist now.
core.trac.wordpress.org - WordPress › Support » Publish Post hook
I've got a plugin which uses the publish_post hook. For some reason on some sites it seems that the following line: add_action('publish_post', my_function'); ...
wordpress.org