You appear to be a bot. Output may be restricted
Description
Match a post based on the post's titleThis filter will find posts which have the same title Assumes that bw_get_posts() is accessible. Here we'll also match the post type BUT note that this does not allow for post type switching… BUT that should match on the GUID
Usage
oik_clone_match_post_by_title( $matched, $data );
Parameters
- $matched
- ( mixed ) required –
- $data
- ( mixed ) required –
Returns
voidSource
File name: oik-clone/admin/oik-clone-match.phpLines:
1 to 13 of 13
function oik_clone_match_post_by_title( $matched, $data ) { //bw_trace2( $data ); $args = array( "post_type" => $data->post_type , "numberposts" => -1 ); $post_title = esc_sql( $data->post_title ); oik_clone_match_add_filter_field( "AND post_title = '" . $post_title . "'" ); $posts = bw_get_posts( $args ); if ( $posts ) { $matched = oik_clone_add_to_matched( $matched, $posts, $data->ID, "title" ); } return( $matched ); }View on GitHub