Plain Text, 6 => HTML, 15 => WYSIWYG, 29 => IMAGE
// If you don´t need a filter (all CPs will be processed), please disable the if statement and the associated closing parenthesis
// Second example for processing only cp´s are located in specific category
// Third example for processing only cp´s are located in specific articles
// Forth example for processing only cp´s with it´s unique cp id
// 1) Filter by Content Part Types
// if( in_array($data['acontent_type'], array(0,6,14,29)) ) { // is used only when the CP-filter is needed.
// 2) Filter by category
// if( in_array($GLOBALS["content"]["struct"][$GLOBALS["content"]["cat_id"]]["acat_id"], array(0,6,14,29)) ) { // is used only when the CP-filter is needed.
// 3) Filter by unique article id´s
// if( in_array($data['acontent_aid'], array(0,6,14,29)) ) { // is used only when the CP-filter is needed.
// 4) Filter by unique cp id´s
if( in_array($data['acontent_id'], array(10,6,14,29)) ) { // is used only when the CP-filter is needed.
// Replaces the TAG and put a class around it.
$text = str_replace("{CPCOMMENT}", '', $text); // replace cp Comment
} // Used only if a CP-filter is in use.
// Delete all unused TAGs
else
$text = str_replace("{CPCOMMENT}", '', $text);
return $text;
}
register_cp_trigger('CP_Comment_field_Output');
?>
\\