Ciao a tutti, dopo aver installato il plugin di Aloeasymail in wp per la creazione e gestione delle newsletter, desideravo personalizzare il form preinstallato aggiungendo qualche voce, ed il creatore del plugin mi ha detto che posso farlo aggiungendo nel file functions.php del mio tema il seguente codice :
codice:
function custom_easymail_set_my_custom_fields ( $fields ) {
// Custom field: City
$fields['cf_city'] = array(
'humans_name' => __("City", "alo-easymail"),
'sql_attr' => "VARCHAR(100) NOT NULL",
'input_type' => "text",
'input_mandatory' => true,
'input_validation' => false,
'input_attr' => "maxlength=\"100\""
);
return $fields;
}
add_filter ( 'alo_easymail_newsletter_set_custom_fields', 'custom_easymail_set_my_custom_fields' );
chiaramente va personalizzato ed io ho provato così :
codice:
<?php
function custom_easymail_set_my_custom_fields ( $fields ) {
// Custom field: Newsletters
$fields['cf_newsletters'] = array(
'humans_name' => __("Newsletters", "alo-easymail"),
'sql_attr' => "VARCHAR(100) NOT NULL",
'input_type' => "text",
'input_mandatory' => true,
'input_validation' => false,
'input_attr' => "maxlength=\"100\""
);
return $fields;
}
add_filter ( 'alo_easymail_newsletter_set_custom_fields',
'custom_easymail_set_my_custom_fields' );
?>
ma mi da errore !
Qualcuno potrebbe darmi una mano ?