post_title; } /* * Derive the new Title from the IPTC Object Name, if present. * You can use MLAOptions::mla_get_data_source() to get anything available. */ $my_setting = array( 'data_source' => 'template', 'meta_name' => '([+iptc:2#005+])', 'option' => 'raw' ); $object_name = trim( MLAOptions::mla_get_data_source( $post_id, 'single_attachment_mapping', $my_setting, NULL ) ); if ( ! empty( $object_name ) ) { $object_link = strtolower( str_replace( array( ' ', '-', '_', '.' ), '-', $object_name ) ); $new_title = sprintf( ' %2$s ', $object_link, $object_name ); if ( $old_value != $new_title ) { $updates[ 'post_title' ] = $new_title; } } return $updates; } // mla_mapping_updates_filter } //MLAjhdeanMappingHooksExample /* * Install the filters at an early opportunity */ add_action('init', 'MLAjhdeanMappingHooksExample::initialize'); ?>