05/14/2015 at 10:00 am
#334238
Keymaster
@ George
Actually there is a way to do this already ready that is update safe that can be used by templates and extensions that does not add the weight of another db query. First, install the Code Snippets plugin.
Add a new snippet with the following code:
function cn_add_address_types( $options ) {
$options['headquarters'] = __( 'Headquarters' , 'connections' );
// You can also remove those you do not require.
// Remove the '//' in front of 'unset' to remove the "Other" address type.
//unset( $options['other'] );
return $options;
}
add_filter( 'cn_address_options', 'cn_add_address_types' );
You would add another snippet for the change you need to date types:
function cn_add_date_types( $options ) {
$options['new_date_type'] = __( 'New Date Type' , 'connections' );
return $options;
}
add_filter( 'cn_date_options', 'cn_add_date_types' );
Hope that helps! If you have a moment, I would truly appreciate a review as they really do make a difference! https://wordpress.org/support/view/plugin-reviews/connections
-
This reply was modified 10 years ago by
Steven Zahm. Reason: Correct code
