You appear to be a bot. Output may be restricted
Description
Match a post based on the post IDThis filter is ideal when the site we're working on was cloned from the source site as the post IDs will match exactly. We would also expect the slugs and titles to be the same. The matched array should be keyed by the post ID of the local post we've found
Usage
oik_clone_match_post_by_ID( $matched, $data );
Parameters
- $matched
- ( mixed ) required –
- $data
- ( mixed ) required –
Returns
voidTO DO
It should also contain other information about the 'match' – to indicate why we should want to copy it. This should probably include:- the RAW post_content
- the last updated date
Source
File name: oik-clone/admin/oik-clone-match.phpLines:
1 to 7 of 7
function oik_clone_match_post_by_ID( $matched, $data ) { $post = get_post( $data->ID ); if ( $post ) { $matched = oik_clone_add_to_matched( $matched, array( $post ), $data->ID, "ID" ); } return( $matched ); }View on GitHub