/**
  * Get the registered widgets
  * 
  * @return array
  */
 function get_registered_widgets()
 {
     return register_multiwidget();
 }
예제 #2
0
add_action('wp', 'bum_init_page_profile');
add_action('wp', 'bum_init_page_registration');
add_action('show_user_profile', 'bum_display_custom_user_fields');
add_action('bum_register_form', 'bum_do_registration_form');
add_action('admin_menu', 'bum_menu');
add_action('init', 'bum_preload_data');
add_action('user_register', 'bum_save_user_meta_data', 20, 1);
add_action('edit_user_profile', 'bum_show_custom_fields_admin');
add_action('edit_user_profile_update', 'bum_save_user_meta_data', 0, 2);
add_filter('bum_edit_user', 'bum_edit_user', 10);
add_filter('bum_edit_user', 'bum_save_user_meta_data', 20);
add_filter('site_url', 'bum_update_login_url', 20, 2);
add_filter('wp_nav_menu', 'bum_wp_page_menu', 20, 2);
add_filter('wp_page_menu', 'bum_wp_page_menu', 20, 2);
add_filter('bum_menu_href', 'bum_check_menu_hrefs', 20, 2);
add_filter('bum_menu_text', 'bum_check_menu_text', 20, 2);
add_filter('bum-page-shortcode', 'bum_page_login', 20, 2);
add_filter('bum-page-shortcode', 'bum_page_profile', 20, 2);
add_filter('bum-page-shortcode', 'bum_page_registration', 20, 2);
//widgets;
add_action('widgets_init', 'init_registered_widgets', 1);
//520 notifications
add_action('admin_notices', 'bum_read_520_rss', 1);
//register hidden field taxonomy
register_taxonomy(BUM_HIDDEN_FIELDS, 'post', array('hierarchical' => false, 'show_ui' => false, 'query_var' => false));
//register hidden role taxonomy
register_taxonomy(BUM_HIDDEN_ROLES, 'post', array('hierarchical' => false, 'show_ui' => false, 'query_var' => false));
//////////////////////////////////////////////////
//   WIDGETS
register_multiwidget(array('id' => 'bum-widget-login', 'title' => 'job Login', 'classname' => 'bum-widget-login', 'show_view' => 'bum-widget-login', 'fields' => array(array('name' => 'Title', 'id' => 'title', 'type' => 'text', 'std' => 'Login'), array('name' => 'Redirect To', 'id' => 'redirect', 'type' => 'text', 'std' => get_bloginfo('url')), array('name' => 'Form ID', 'id' => 'form_id', 'type' => 'text', 'std' => 'loginform'), array('name' => 'Username Label', 'id' => 'label_username', 'type' => 'text', 'std' => __('Username')), array('name' => 'Password Label', 'id' => 'label_password', 'type' => 'text', 'std' => __('Password')), array('name' => 'Remember Me Label', 'id' => 'label_remember', 'type' => 'text', 'std' => __('Remember Me')), array('name' => 'Submit Label', 'id' => 'label_log_in', 'type' => 'text', 'std' => __('Log In')), array('name' => 'Username ID', 'id' => 'id_username', 'type' => 'text', 'std' => 'user_login'), array('name' => 'Password ID', 'id' => 'id_password', 'type' => 'text', 'std' => 'user_pass'), array('name' => 'Remember Me ID', 'id' => 'id_remember', 'type' => 'text', 'std' => 'rememberme'), array('name' => 'Submit ID', 'id' => 'id_submit', 'type' => 'text', 'std' => 'wp-submit'), array('name' => 'Username Value', 'id' => 'value_username', 'type' => 'text', 'std' => ''), array('name' => 'Username Value', 'id' => 'value_username', 'type' => 'text', 'std' => ''), array('name' => 'Show Remember Me<br/>', 'id' => 'remember', 'type' => 'radio', 'options' => array(array('name' => 'Visible', 'value' => '1'), array('name' => 'Hidden', 'value' => '0'))), array('name' => 'Default Remember Me<br/>', 'id' => 'value_remember', 'type' => 'radio', 'options' => array(array('name' => 'Checked', 'value' => '1'), array('name' => 'Unchecked', 'value' => '0'))))));
예제 #3
0
	array(
		'name' => 'Radio',
		'id' => 'radio',
		'type' => 'radio',
		'options' => array(
		array('name' => 'Name 1', 'value' => 'Value 1'),
		array('name' => 'Name 2', 'value' => 'Value 2')
		)
	),
	array(
		'name' => 'Checkbox',
		'id' => 'checkbox',
		'type' => 'checkbox'
	),
	
	)
));
</pre>
* 
* 
*/
defined('ABSPATH') or die("Cannot access pages directly.");
/**
 * 
 */
register_multiwidget(array('id' => 'omega-slider-text', 'title' => __('Omega Slide - Text'), 'description' => __('This widget is specifically for the omega slider sidebar. It will display plain text'), 'classname' => 'omega-slide-text', 'show_view' => 'omega-slide-text', 'fields' => array(array('name' => __('Title'), 'id' => 'title', 'type' => 'text', 'std' => ''))));
/**
 * 
 */
register_multiwidget(array('id' => 'omega-slider-portfolio', 'title' => __('Omega Slide - Portfolio'), 'description' => __('This widget is specifically for the omega slider sidebar. This widget will display a large image with text and call to action buttons.'), 'classname' => 'omega-slide-portfolio', 'show_view' => 'omega-slide-portfolio', 'fields' => array(array('name' => __('Title'), 'id' => 'title', 'type' => 'text', 'std' => ''), array('name' => __('Description'), 'id' => 'description', 'type' => 'textarea', 'std' => ''), array('name' => __('Image Source'), 'id' => 'img_src', 'type' => 'text', 'std' => ''), array('name' => __('Link To'), 'id' => 'ahref', 'type' => 'text', 'std' => ''), array('name' => __('Button Text'), 'id' => 'button', 'type' => 'text', 'std' => ''))));
예제 #4
0
 * able to view the default widget area. This will not cause problems with the script,
 * however the editing user will not be able to add or delete viewable pages to the 
 * widget.
 * 
 * @TODO need to set this to call get_option from the db
 * @TODO need to add this as a security check to every file
 */
defined("FIVETS_CURRENT_USER_CANNOT") or define("FIVETS_CURRENT_USER_CANNOT", !current_user_can("edit_theme_options"));
/**
 * Initialize the Framework
 * 
 */
set_controller_path(dirname(__FILE__));
//register assets
wp_register_script('fivets_default_js', plugin_dir_url(__FILE__) . 'js/default.js', array(), CFW_VERSION, true);
wp_register_style('fivets_default_css', plugin_dir_url(__FILE__) . 'css/default.css', array(), CFW_VERSION, 'all');
//load the scripts into the theme
wp_enqueue_style('fivets_default_css');
wp_enqueue_script('fivets_default_js');
//shortcodes
//add_shortcode('widget', 'cfw_shortcode_widget');
//actions for bootstrap
add_action('init', 'fivets_show_ajax', 100);
//add_action('admin_notices', 'fivets_read_520_rss', 1);
//actions for helper
add_action('activate_' . plugin_basename(dirname(__FILE__)) . DS . 'index.php', 'cfw_activate_plugin');
add_action('deactivate_' . plugin_basename(dirname(__FILE__)) . DS . 'index.php', 'cfw_deactivate_plugin');
add_action('wp_head', 'cfw_document_head');
add_action('wp_footer', 'cfw_document_footer');
register_multiwidget(array('id' => 'category-filter-widget', 'title' => __('Category Filter Widget'), 'description' => __('Allows your users to select multiple categories and then view a list of all posts within those categories.'), 'classname' => 'st-custom-wi', 'show_view' => 'category-filter-widget', 'fields' => array()));