function bp_links_widget() { parent::WP_Widget(false, $name = __('Links', 'buddypress-links'), array('description' => __('Your BuddyPress Links', 'buddypress-links'))); if (is_active_widget(false, false, $this->id_base)) { bp_links_setup_theme(); wp_enqueue_script('bp_links_widget_links_list-js', BP_LINKS_THEME_URL_INC . '/widgets.js', array('jquery')); } }
/** * Use this only inside of screen functions, etc * * @param string $template */ function bp_links_load_template($template) { bp_links_setup_theme(); bp_core_load_template(BP_LINKS_THEME . '/' . $template); }