-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathpmxi_article_data.php
More file actions
26 lines (24 loc) · 893 Bytes
/
pmxi_article_data.php
File metadata and controls
26 lines (24 loc) · 893 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
/**
* ==================================
* Filter: pmxi_article_data
* ==================================
*
* Append content to existing post body.
*
* This filter works only when 'Choose which data to update' options is chosen in import settings.
*
* @param $articleData array - TODO: Verify ... New content is in $articleData['post_content']
* @param $import object - TODO: Verify
* @param $post_to_update object - Current content is in $post_to_update->post_content
* @param $current_xml_node array - Parsed data of current XML node
*
* @return mixed
*/
function my_pmxi_article_data($articleData, $import, $post_to_update, $current_xml_node)
{
// Add new content to the top of old content
// $articleData['post_content'] .= $post_to_update->post_content;
return $articleData;
}
add_filter('pmxi_article_data', 'my_pmxi_article_data', 10, 4);