The best way to handle this which will require a bit more up front work but will be update safe is to add your own metabox for phone numbers à la the “Education Levels” extension and then unregister the core phone numbers metabox so you only have one with your modifications. And most of the work is simply copy/pasting.
I would copy the entire code for the phone numbers metabox:
Make your changes and register it using the same array attributes:
Use this method to do the actual metabox registration:
To unregister the core phone number field, this should work:
cnMetaboxAPI::remove( 'metabox-phone' );
You can hook into the
cn_metabox hook to make this happen:
add_action( 'cn_metabox', array( 'cnEntryMetabox', 'init' ), 10 );
Step by step:
- Hook a new function to the
- The function should unregister the
- Set up an array with the exact same attributes.
- Register your custom phone metabox.
Hope that helps.