This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Plugin Name: My PMPro Directory Widget | |
* Description: Add widget to Member Directory page to filter results. | |
*/ | |
class My_PMPro_Directory_Widget extends WP_Widget { | |
/** | |
* Sets up the widget | |
*/ | |
public function __construct() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* The field added via Register Helper. Field works fine in the checkout. */ | |
$fields[] = new PMProRH_Field( | |
'category', // input name, will also be used as meta key | |
'select2', // type of field | |
array( | |
'label' => 'Vælg interesser', // custom field label | |
'options' => array("model"=>"Model", "statist"=>"Statist", "actor_unex"=>"Skuespil (uøvet)", "actor_ex"=>"Skuespil (øvet)"), // input size | |
'class' => 'category', // custom class | |
'profile' => true, // show in user profile | |
'required' => true, // make this field required |