Skip to content

friends_reblog_pre_insert_post

Alex Kirk edited this page Apr 8, 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;
} );

Generic Example

add_filter(
    'friends_reblog_pre_insert_post',
    function ( $new_post ) {
        // Your code here
        return $new_post;
    }
);

Parameters

  • $new_post

Files

apply_filters( 'friends_reblog_pre_insert_post', $new_post )

Hooks

Clone this wiki locally