Making string changes to functions
What is the AppTheme's preferred way to make changes to strings functions in Classipress 3.3 that aren't in template files? Should be be able to hook/unhook functions in a child theme or are we expected to use translation files?
I ask because for some reason, this code isn't working to remove the default function (I'm getting both the new and old). I don't see the action getting moved to a different hook or priority, so I'm not sure why the remove_action is not working:
(in child theme functions.php I've got)
Code:
remove_action( 'appthemes_after_post_content', 'cp_do_ad_ref_id' ); // Remove not working
function bkf_do_ad_ref_id() {
global $post;
if ( ! is_singular( APP_POST_TYPE ) )
return;
?>
<div class='note'><strong><?php _e( 'Reference ID:', APP_TD ); ?></strong> <?php if ( get_post_meta( $post->ID, 'cp_sys_ad_conf_id', true ) ) echo get_post_meta( $post->ID, 'cp_sys_ad_conf_id', true ); else _e( 'N/A', APP_TD ); ?></div>
<div class="dotted"></div>
<div class="pad5"></div>
<?php
}
add_action( 'appthemes_after_post_content', 'bkf_do_ad_ref_id' );
You can see the only change there is "Ad Reference ID:" has been changed to "Reference ID:". I'd prefer doing it this way then messing with translation files, but I'll do whatever works. I need to change a dozen string in a dozen functions and having the same problem with modifiying the strings in the step functions /includes/forms/step-functions.php.
Side note, you seem to load these things with include_once or require_once, perhaps that could be changed to get_template or get_template_part so child themes could over ride them? Maybe I'm missing some obvious reason why that's not already the case though...
Thanks