Skip to content

Instantly share code, notes, and snippets.

@siamkreative
Created May 27, 2016 07:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save siamkreative/76993cbfdf01b3d8ab713bcc3ffc1993 to your computer and use it in GitHub Desktop.
Save siamkreative/76993cbfdf01b3d8ab713bcc3ffc1993 to your computer and use it in GitHub Desktop.
Awesome Support - Register a custom field after the plugin is safely loaded
<?php
/**
* Register all custom fields after the plugin is safely loaded.
*/
add_action( 'plugins_loaded', 'wpas_user_custom_fields' );
function wpas_user_custom_fields() {
if ( function_exists( 'wpas_add_custom_field' ) ) {
wpas_add_custom_taxonomy( 'my_custom_services', array( 'title' => 'My Custom Services', 'label' => 'Service', 'label_plural' => 'Services' ) );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment