I found this plugin is very useful, except one thing, how can i use multiple text input with fieldCustomList1_display function, instead of just one textbox
Thanks for your comment; glad you find the plugin useful.
I’ve created another example that the same as x_fieldCustomList1 but adds another field. The key is to use a custom sanitize_callback to collect the submitted data and return it all as an array.
Big thanks for a really good plugin. There’s not that much pure developer oriented plugins out there and your Custom Metadata is very helpful. I hope you will follow your to-do list because additional field types and custom validation will be essential! Keep great work! :)
Hi, there. I am using your plugin and it’s very usefull. But I have a bit headache finding a solution for a particular case. I added a custom “textarea” field to my users where I enable tinymce. It work well but the field is sanitized and i got all and removed. Do you think it would be possible to introduce an option to disable sanitizing for a give field (when adding it with x_add_metadata_field)
or could i use a hook to do it ? (I am not really familiar with hooks yet)
where the hell can i view the fields? i dont see them anywhere. i entered this code into functions.php but dont see anything in my wordpress dashboard or in users.
/*————————————————*/
/*—————–[CUSTOM-USER-META-DATA]————————*/
/*————————————————*/
$args_x_user_twitter = array(
‘group’ => ‘x_social_group’ // The slug of group the field should be added to. This needs to be registered with x_add_metadata_group first.
, ‘field_type’ => ‘text’ // The type of field; possible values: text, checkbox, radio, select
, ‘label’ => ‘Twitter’ // Label for the field
, ‘description’ => ‘Twitter link’ // Description of the field, displayed below the input
);
$args_x_user_facebook = array(
‘group’ => ‘x_social_group’ // The slug of group the field should be added to. This needs to be registered with x_add_metadata_group first.
, ‘field_type’ => ‘text’ // The type of field; possible values: text, checkbox, radio, select
, ‘label’ => ‘Facebook’ // Label for the field
, ‘description’ => ‘Facebook link’ // Description of the field, displayed below the input
);
Like your plugin very much. Not sure I understand what Multiplied fields are and how to take advantage of them in your latest update. If you have time please explain. Thanks
I found this plugin is very useful, except one thing, how can i use multiple text input with fieldCustomList1_display function, instead of just one textbox
hope to receive your answer
Thanks for your comment; glad you find the plugin useful.
I’ve created another example that the same as x_fieldCustomList1 but adds another field. The key is to use a custom sanitize_callback to collect the submitted data and return it all as an array.
You can see the code here: https://gist.github.com/664186
thank you very much, i never expect your answer so quickly, i will test it soon and let you know ASAP.
thanks again.
Hi,
I am quite a newbie. I installed the plugin. I added to “function.php” in my theme the line x_add_metadata_field( ‘Numero’, ‘post’ );
And tried to write a post , hoping to see a new box titled “number” somewhere on the screen.
But I see nothing.
HAve I understood the purpose of the plugin ? What do I get wrong ?
Big thanks for a really good plugin. There’s not that much pure developer oriented plugins out there and your Custom Metadata is very helpful. I hope you will follow your to-do list because additional field types and custom validation will be essential! Keep great work! :)
Hi, there. I am using your plugin and it’s very usefull. But I have a bit headache finding a solution for a particular case. I added a custom “textarea” field to my users where I enable tinymce. It work well but the field is sanitized and i got all and removed. Do you think it would be possible to introduce an option to disable sanitizing for a give field (when adding it with x_add_metadata_field)
or could i use a hook to do it ? (I am not really familiar with hooks yet)
thx
Well sorry for disturbing i found a solution with sanitize_callback just strangely all are replaced before the sanitize_callback. i am investigation
where the hell can i view the fields? i dont see them anywhere. i entered this code into functions.php but dont see anything in my wordpress dashboard or in users.
/*————————————————*/
/*—————–[CUSTOM-USER-META-DATA]————————*/
/*————————————————*/
$args_x_user_twitter = array(
‘group’ => ‘x_social_group’ // The slug of group the field should be added to. This needs to be registered with x_add_metadata_group first.
, ‘field_type’ => ‘text’ // The type of field; possible values: text, checkbox, radio, select
, ‘label’ => ‘Twitter’ // Label for the field
, ‘description’ => ‘Twitter link’ // Description of the field, displayed below the input
);
$args_x_user_facebook = array(
‘group’ => ‘x_social_group’ // The slug of group the field should be added to. This needs to be registered with x_add_metadata_group first.
, ‘field_type’ => ‘text’ // The type of field; possible values: text, checkbox, radio, select
, ‘label’ => ‘Facebook’ // Label for the field
, ‘description’ => ‘Facebook link’ // Description of the field, displayed below the input
);
add_action( ‘admin_init’, ‘my_theme_init_custom_fields’ );
function my_theme_ainit_custom_fields() {
if( function_exists( ‘x_add_metadata_field’ ) && function_exists( ‘x_add_metadata_group’ ) ) {
x_add_metadata_group( ‘x_social_group’, ‘user’, array( ‘label’ => ‘User Social Group’));
x_add_metadata_field( ‘x_user_twitter’, ‘user’, $args_x_user_twitter );
x_add_metadata_field( ‘x_user_facebook’, ‘user’, $args_x_user_facebook );
}
}
Like your plugin very much. Not sure I understand what Multiplied fields are and how to take advantage of them in your latest update. If you have time please explain. Thanks