<?php | |
/** | |
* @package Awesome Support/Custom Fields | |
* @author ThemeAvenue <web@themeavenue.net> | |
* @license GPL-2.0+ | |
* @link http://themeavenue.net | |
* @copyright 2014 ThemeAvenue | |
* | |
* @wordpress-plugin | |
* Plugin Name: Awesome Support: My Custom Fields | |
* Plugin URI: http://getawesomesupport.com | |
* Description: Adds custom fields to the Awesome Support ticket submission form. | |
* Version: 0.1.0 | |
* Author: ThemeAvenue | |
* Author URI: http://themeavenue.net | |
* Text Domain: wpas | |
* License: GPL-2.0+ | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt | |
* Domain Path: /languages | |
*/ | |
// If this file is called directly, abort. | |
if ( ! defined( 'WPINC' ) ) { | |
die; | |
} | |
add_action( 'plugins_loaded', 'wpas_user_custom_fields' ); | |
/** | |
* Register all custom fields after the plugin is safely loaded. | |
*/ | |
function wpas_user_custom_fields() { | |
/* You can start adding your custom fields safely after this line */ | |
/* Do NOT write anything after this line */ | |
} |
This comment has been minimized.
This comment has been minimized.
I added it according to the instructions in the documentation, but still it's not showing up. |
This comment has been minimized.
This comment has been minimized.
yes i followed the same procedure it is not working |
This comment has been minimized.
This comment has been minimized.
The 'plugins_loaded action' is triggered before the theme is loaded. So if it's used in your functions.php it is has already been called. You could rather use the action 'after_setup_theme'. But it does not work regardless unfortunately. My input:
|
This comment has been minimized.
This comment has been minimized.
For all of you not managing to get plugin working.
|
This comment has been minimized.
This comment has been minimized.
For those who, like me, have tried all the examples above, and still could not get it to work: |
This comment has been minimized.
This comment has been minimized.
how to setup a mandatory custom field? |
This comment has been minimized.
This comment has been minimized.
Following these examples doesn't have any effect. Are there any additional options in the admin interface that need to be enable in order for custom fields to show up in the "Fields" Settings tab? Additionally, do custom fields even work with Remote Tickets in the first place? |
This comment has been minimized.
This comment has been minimized.
After add awesome-support-custom-fields.php in the plugin folder, we must return to the plugin page. And you must activate the new plugin which named "Awesome Support: My Custom Fields", then the filed can be used in the ticket page. |
This comment has been minimized.
This comment has been minimized.
I downloaded the "Code Snippet" plugin and put the following code inside.
|
This comment has been minimized.
This comment has been minimized.
Hi, its possible get the department tag to send in email notification? |
This comment has been minimized.
When using
wpas_add_custom_field()
orwpas_add_custom_taxonomy()
, please make sure to wrap them inside afunction_exists()
check.Example