Skip to content

friends_reblog_pre_insert_post

Alex Kirk edited this page Nov 22, 2024 · 10 revisions

Allows changing a reblog post before it gets posted.

Additionally, the array contains the post_format which can also be changed.

Example

add_filter( 'friends_reblog_pre_insert_post', function( $new_post ) {
    $new_post['post_type'] = 'custom_post_type';
    $new_post['post_format'] = 'aside'; // always set the post_format to aside, regardless of the original post format.
    return $new_post;
} );

Parameters

  • array $new_post A post array to be handed to wp_insert_post.

Files

apply_filters( 'friends_reblog_pre_insert_post', $new_post )

Hooks

Clone this wiki locally