Esempio n. 1
0
 public function add_class_postbox_website($classes)
 {
     $show_opts = NgfbUser::show_opts();
     $classes[] = 'postbox_website';
     if (!empty($show_opts)) {
         $classes[] = 'postbox_show_' . $show_opts;
     }
     return $classes;
 }
Esempio n. 2
0
 protected function get_submit_buttons($submit_text = '', $class = 'submit-buttons')
 {
     if (empty($submit_text)) {
         $submit_text = __('Save All Changes', NGFB_TEXTDOM);
     }
     $show_opts_next = SucomUtil::next_key(NgfbUser::show_opts(), $this->p->cf['form']['show_options']);
     $show_opts_text = 'Prefer ' . $this->p->cf['form']['show_options'][$show_opts_next] . ' View';
     $show_opts_url = $this->p->util->get_admin_url('?action=change_show_options&show_opts=' . $show_opts_next);
     $action_buttons = '<input type="submit" class="button-primary" value="' . $submit_text . '" />' . $this->form->get_button($show_opts_text, 'button-secondary button-highlight', null, wp_nonce_url($show_opts_url, $this->get_nonce(), NGFB_NONCE)) . '<br/>';
     if (empty($this->p->cf['*']['lib']['sitesubmenu'][$this->menu_id])) {
         // don't show on the network admin pages
         $action_buttons .= $this->form->get_button(__('Clear All Cache(s)', NGFB_TEXTDOM), 'button-secondary', null, wp_nonce_url($this->p->util->get_admin_url('?action=clear_all_cache'), $this->get_nonce(), NGFB_NONCE));
     }
     $action_buttons .= $this->form->get_button(__('Check for Update(s)', NGFB_TEXTDOM), 'button-secondary', null, wp_nonce_url($this->p->util->get_admin_url('?action=check_for_updates'), $this->get_nonce(), NGFB_NONCE), false, $this->p->is_avail['util']['um'] ? false : true);
     if (empty($this->p->cf['*']['lib']['sitesubmenu'][$this->menu_id])) {
         // don't show on the network admin pages
         $action_buttons .= $this->form->get_button(__('Reset Metabox Layout', NGFB_TEXTDOM), 'button-secondary', null, wp_nonce_url($this->p->util->get_admin_url('?action=clear_metabox_prefs'), $this->get_nonce(), NGFB_NONCE));
     }
     return '<div class="' . $class . '">' . $action_buttons . '</div>';
 }
Esempio n. 3
0
 protected function get_submit_buttons($submit_text = '', $class = 'submit-buttons')
 {
     if (empty($submit_text)) {
         $submit_text = _x('Save All Plugin Settings', 'submit button', 'nextgen-facebook');
     }
     $show_opts_next = SucomUtil::next_key(NgfbUser::show_opts(), $this->p->cf['form']['show_options']);
     $show_opts_text = sprintf(_x('View %s by Default', 'submit button', 'nextgen-facebook'), _x($this->p->cf['form']['show_options'][$show_opts_next], 'option value', 'nextgen-facebook'));
     $show_opts_url = $this->p->util->get_admin_url('?' . $this->p->cf['lca'] . '-action=change_show_options&show-opts=' . $show_opts_next);
     $action_buttons = '<input type="submit" class="button-primary" value="' . $submit_text . '" />' . $this->form->get_button($show_opts_text, 'button-secondary button-highlight', null, wp_nonce_url($show_opts_url, self::get_nonce(), NGFB_NONCE)) . '<br/>';
     if ($this->menu_lib === 'setting' || $this->menu_lib === 'submenu') {
         $action_buttons .= $this->form->get_button(_x('Clear All Cache(s)', 'submit button', 'nextgen-facebook'), 'button-secondary', null, wp_nonce_url($this->p->util->get_admin_url('?' . $this->p->cf['lca'] . '-action=clear_all_cache'), self::get_nonce(), NGFB_NONCE));
     }
     if ($this->menu_lib !== 'profile') {
         // don't show on profile pages
         $action_buttons .= $this->form->get_button(_x('Check for Pro Update(s)', 'submit button', 'nextgen-facebook'), 'button-secondary', null, wp_nonce_url($this->p->util->get_admin_url('?' . $this->p->cf['lca'] . '-action=check_for_updates'), self::get_nonce(), NGFB_NONCE), false, $this->p->is_avail['util']['um'] ? false : true);
     }
     // disable button if um not available
     $action_buttons .= $this->form->get_button(_x('Reset Metabox Layout', 'submit button', 'nextgen-facebook'), 'button-secondary', null, wp_nonce_url($this->p->util->get_admin_url('?' . $this->p->cf['lca'] . '-action=clear_metabox_prefs'), self::get_nonce(), NGFB_NONCE));
     $action_buttons .= $this->form->get_button(_x('Reset Hidden Notices', 'submit button', 'nextgen-facebook'), 'button-secondary', null, wp_nonce_url($this->p->util->get_admin_url('?' . $this->p->cf['lca'] . '-action=clear_hidden_notices'), self::get_nonce(), NGFB_NONCE));
     return '<div class="' . $class . '">' . $action_buttons . '</div>';
 }