You appear to be a bot. Output may be restricted
Description
Match a post based on the post's slugThis filter will find posts which have the same slug. Assumes that bw_get_posts() is accessible. Note: Even though the "slug" field is called "post_name" the query arg we need to use is "name". Ifyou use "post_name" and numberposts is -1 you can run out of memory.
Usage
oik_clone_match_post_by_slug( $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_slug( $matched, $data ) { //bw_trace2( $data ); $args = array( "name" => $data->post_name , "post_type" => "any" , "numberposts" => 1 ); //gobang(); $posts = bw_get_posts( $args ); if ( $posts ) { $matched = oik_clone_add_to_matched( $matched, $posts, $data->ID, "slug" ); } return( $matched ); }View on GitHub