public function render($post) { $users = get_users(); $members = $this->get_members($post->ID); $admins = $this->get_administrators($post->ID); include BuggyPress::plugin_path('views/admin/meta-box-members.php'); }
public function render($post) { $issue = new BuggyPress_Issue($post->ID); $projects = get_posts(array('post_type' => BuggyPress_Project::POST_TYPE, 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC')); $current_project = $issue->get_project_id(); include BuggyPress::plugin_path('views/admin/meta-box-issue-project.php'); }
public function render($post) { $issue = new BuggyPress_Issue($post->ID); $users = get_users(); $assignee = $issue->get_assignee_id(); include BuggyPress::plugin_path('views/admin/meta-box-assignee.php'); }
/** * Enqueue scripts and styles for the edit-tags page * * @param string $hook_suffix */ public function enqueue_admin_resources($hook_suffix) { if ($hook_suffix == 'edit-tags.php') { global $taxonomy; if ($taxonomy == $this->taxonomy) { wp_enqueue_script('buggypress-taxonomy-sort', BuggyPress::plugin_url('resources/taxonomy-sort.js'), array('jquery-ui-sortable'), FALSE, TRUE); wp_enqueue_style('buggypress-taxonomy-sort', BuggyPress::plugin_url('resources/taxonomy-sort.css')); } } }
/** * Load all the plugin files and initialize appropriately * * @return void */ function BuggyPress_load() { if (!class_exists('BuggyPress')) { // load the base class require_once 'classes/BuggyPress.php'; BuggyPress::set_plugin_basedir(); if (!BuggyPress::prerequisites_met(phpversion(), get_bloginfo('version'))) { // let the user know prerequisites weren't met add_action('admin_head', array('BuggyPress', 'failed_to_load_notices'), 0, 0); return; } add_action('plugins_loaded', array('BuggyPress', 'initialize_plugin'), -100, 0); } }
public static function set_plugin_basedir() { if (!empty(self::$plugin_file)) { return; } global $plugin, $mu_plugin, $network_plugin; $plugin_file = dirname(__FILE__); if (!empty($plugin)) { $plugin_file = $plugin; } elseif (!empty($mu_plugin)) { $plugin_file = $mu_plugin; } elseif (!empty($network_plugin)) { $plugin_file = $network_plugin; } self::$plugin_file = $plugin_file; }
public function select_post_template($template) { if (is_single() && get_query_var('post_type') == $this->post_type) { // check in the theme's buggypress directory if ($found = locate_template(array('buggypress/' . $this->post_type . '.php'), FALSE)) { return $found; } // check in the main theme directory if ($found = locate_template(array('single-' . $this->post_type . '.php'), FALSE)) { return $found; } if (file_exists(BuggyPress::plugin_path('views/page-templates/single-' . $this->post_type . '.php'))) { return BuggyPress::plugin_path('views/page-templates/single-' . $this->post_type . '.php'); } } return $template; }
public function render($post) { $visibility = $this->get_visibility($post->ID); $commenting = $this->get_commenting($post->ID); include BuggyPress::plugin_path('views/admin/meta-box-permissions.php'); }
/** * Print the HTML for the buggypress menu metabox */ public function populate_menu_metabox() { global $nav_menu_selected_id; $projects = get_post_type_object('project'); $issues = get_post_type_object('issue'); $items = array('project' => $projects->label, 'newissue' => $issues->labels->new_item); include BuggyPress::plugin_path('views/admin/menu-meta-box.php'); }
public function select_template($template) { if (is_archive() && get_query_var('post_type') == BuggyPress_Issue::POST_TYPE) { // check in the theme's buggypress directory if ($found = locate_template(array('buggypress/archive-' . BuggyPress_Issue::POST_TYPE . '.php'), FALSE)) { return $found; } // check in the main theme directory if ($found = locate_template(array('archive-' . BuggyPress_Issue::POST_TYPE . '.php'), FALSE)) { return $found; } if (file_exists(BuggyPress::plugin_path('views/page-templates/archive-' . BuggyPress_Issue::POST_TYPE . '.php'))) { return BuggyPress::plugin_path('views/page-templates/archive-' . BuggyPress_Issue::POST_TYPE . '.php'); } } return $template; }