コード例 #1
0
ファイル: admin.php プロジェクト: jamesvillarrubia/uniken-web
 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>';
 }
コード例 #2
0
ファイル: admin.php プロジェクト: coollog/theboola
        public function show_form_page()
        {
            $short_aop = $this->p->cf['plugin'][$this->p->cf['lca']]['short'] . ($this->p->check->aop($this->p->cf['lca']) ? ' Pro' : '');
            if ($this->menu_id !== 'contact') {
                // the "settings" page displays its own error messages
                settings_errors(NGFB_OPTIONS_NAME);
            }
            // display "error" and "updated" messages
            $this->set_form();
            // define form for side boxes and show_form_content()
            if ($this->p->debug->is_on()) {
                $this->p->debug->show_html(print_r($this->p->is_avail, true), 'available features');
                $this->p->debug->show_html(print_r($this->p->check->get_active(), true), 'active plugins');
                $this->p->debug->show_html(null, 'debug log');
            }
            ?>
			<div class="wrap" id="<?php 
            echo $this->pagehook;
            ?>
">
				<h2>
					<?php 
            $this->show_follow_icons();
            echo '<div class="display_options_info">';
            echo '<strong>' . $this->p->cf['form']['display_options'][$this->p->options['plugin_display']] . '</strong>';
            $next_key = SucomUtil::next_key($this->p->options['plugin_display'], $this->p->cf['form']['display_options']);
            if ($next_key !== false) {
                echo ' | <a href="' . wp_nonce_url($this->p->util->get_admin_url('?action=change_display_options&display_options=' . $next_key), $this->get_nonce(), NGFB_NONCE) . '">Display ' . $this->p->cf['form']['display_options'][$next_key] . '</a>';
            }
            echo '</div>';
            echo $short_aop . ' &ndash; ' . $this->menu_name;
            ?>
				</h2>
				<div id="poststuff" class="metabox-holder has-right-sidebar">
					<div id="side-info-column" class="inner-sidebar">
						<?php 
            do_meta_boxes($this->pagehook, 'side', null);
            ?>
					</div><!-- .inner-sidebar -->
					<div id="post-body" class="has-sidebar">
						<div id="post-body-content" class="has-sidebar-content">
							<?php 
            $this->show_form_content();
            ?>
						</div><!-- .post-body-content -->
					</div><!-- .post-body -->
				</div><!-- .metabox-holder -->
			</div><!-- .wrap -->
			<script type="text/javascript">
				//<![CDATA[
					jQuery(document).ready( 
						function($) {
							// close postboxes that should be closed
							$('.if-js-closed').removeClass('if-js-closed').addClass('closed');
							// postboxes setup
							postboxes.add_postbox_toggles('<?php 
            echo $this->pagehook;
            ?>
');
						}
					);
				//]]>
			</script>
			<?php 
        }
コード例 #3
0
ファイル: admin.php プロジェクト: leotaillard/btws2016
 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>';
 }