public function admin_context() { $this->salaire_personnel = new PostType(array('namespace' => 'posts', 'label' => __('Posts'))); $this->salaire_personnel->run(); // Creating Menu 1.4 create_admin_menu('blogster', 'after', 'dashboard'); add_admin_menu('blogster', array('title' => __('Posts'), 'href' => module_url(array('index'), 'blogster'))); add_admin_menu('blogster', array('title' => __('Write a new post'), 'href' => module_url(array('publish'), 'blogster'))); add_admin_menu('blogster', array('title' => __('Create a new category'), 'href' => module_url(array('category', 'create'), 'blogster'))); add_admin_menu('blogster', array('title' => __('Categories'), 'href' => module_url(array('category'), 'blogster'))); add_admin_menu('blogster', array('title' => __('Comments'), 'href' => module_url(array('comments'), 'blogster'))); add_admin_menu('blogster', array('title' => __('Tags'), 'href' => module_url(array('tags'), 'blogster'))); add_admin_menu('blogster', array('title' => __('Settings'), 'href' => module_url(array('setting'), 'blogster'))); declare_admin_widget(array("module_namespace" => "blogster", "widget_namespace" => "articles_stats", "widget_title" => __('Blogster statistics'), "widget_content" => $this->load->view(MODULES_DIR . $this->module['encrypted_dir'] . '/views/widgets/articles_stats', null, true, true), "widget_description" => __('Displays blogster stats'))); declare_admin_widget(array("module_namespace" => "blogster", "widget_namespace" => "recents_commentaires", "widget_title" => __('Recents comments'), "widget_content" => $this->load->view(MODULES_DIR . $this->module['encrypted_dir'] . '/views/widgets/recents_comments', null, true, true), "widget_description" => __('Displays recents comments'), "action_control" => module_action('blogster', 'blogster_manage_comments'))); }
function run() { if (current_user()->can($this->privilege)) { create_admin_menu($this->namespace, riake(0, $this->menu_position), riake(1, $this->menu_position)); add_admin_menu($this->namespace, array('title' => $this->label, 'href' => '#', 'is_submenu' => false, 'icon' => $this->menu_icon)); add_admin_menu($this->namespace, array('title' => $this->posts_list_label, 'href' => get_instance()->url->site_url(array('admin', 'posttype', $this->namespace, 'list')))); add_admin_menu($this->namespace, array('title' => $this->new_post_label, 'href' => get_instance()->url->site_url(array('admin', 'posttype', $this->namespace, 'new')))); if ($this->comment_enabled === TRUE) { add_admin_menu($this->namespace, array('title' => $this->post_comment_label, 'href' => get_instance()->url->site_url(array('admin', 'posttype', $this->namespace, 'comments')))); } foreach (force_array($this->query->get_defined_taxonomies()) as $taxonomy) { add_admin_menu($this->namespace, array('title' => riake('taxonomy-list-label', $taxonomy, sprintf(__('%s list'), riake('namespace', $taxonomy))), 'href' => get_instance()->url->site_url(array('admin', 'posttype', $this->namespace, 'taxonomy', riake('namespace', $taxonomy), 'list')))); add_admin_menu($this->namespace, array('title' => riake('new-taxonomy-label', $taxonomy, sprintf(__('New %s'), riake('namespace', $taxonomy))), 'href' => get_instance()->url->site_url(array('admin', 'posttype', $this->namespace, 'taxonomy', riake('namespace', $taxonomy), 'new')))); } } }
public function admin_context() { create_admin_menu('tendoo_contents', 'after', 'dashboard'); add_admin_menu('tendoo_contents', array('title' => __('Media Library'), 'href' => module_url(array('index'), 'tendoo_contents'), 'icon' => 'fa fa-image')); add_admin_menu('tendoo_contents', array('title' => __('Add new media'), 'href' => module_url(array('upload'), 'tendoo_contents'))); }