• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_submit_button函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_submit_button函数的典型用法代码示例。如果您正苦于以下问题:PHP get_submit_button函数的具体用法?PHP get_submit_button怎么用?PHP get_submit_button使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_submit_button函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: column_default

 /**
  * Generates content for a single row of the table
  *
  * @since 0.1-dev
  * @access protected
  *
  * @param object $item The current item.
  * @param string $column_name The current column name.
  */
 protected function column_default($item, $column_name)
 {
     switch ($column_name) {
         case 'name':
             return esc_html($item['name']);
         case 'created':
             if (empty($item['created'])) {
                 return '—';
             }
             return date(get_option('date_format', 'r'), $item['created']);
         case 'last_used':
             if (empty($item['last_used'])) {
                 return '—';
             }
             return date(get_option('date_format', 'r'), $item['last_used']);
         case 'last_ip':
             if (empty($item['last_ip'])) {
                 return '—';
             }
             return $item['last_ip'];
         case 'revoke':
             return get_submit_button(__('Revoke'), 'delete', 'revoke-application-password', false);
         default:
             return 'WTF^^?';
     }
 }
开发者ID:georgestephanis,项目名称:application-passwords,代码行数:35,代码来源:class.application-passwords-list-table.php


示例2: dashboard_widget

        public function dashboard_widget()
        {
            $projectId = 0;
            if (empty($this->gadwp->config->options['ga_dash_token'])) {
                echo '<p>' . __("This plugin needs an authorization:", 'google-analytics-dashboard-for-wp') . '</p><form action="' . menu_page_url('gadash_settings', false) . '" method="POST">' . get_submit_button(__("Authorize Plugin", 'google-analytics-dashboard-for-wp'), 'secondary') . '</form>';
                return;
            }
            if (current_user_can('manage_options')) {
                if ($this->gadwp->config->options['ga_dash_tableid_jail']) {
                    $projectId = $this->gadwp->config->options['ga_dash_tableid_jail'];
                } else {
                    echo '<p>' . __("An admin should asign a default Google Analytics Profile.", 'google-analytics-dashboard-for-wp') . '</p><form action="' . menu_page_url('gadash_settings', false) . '" method="POST">' . get_submit_button(__("Select Domain", 'google-analytics-dashboard-for-wp'), 'secondary') . '</form>';
                    return;
                }
            } else {
                if ($this->gadwp->config->options['ga_dash_tableid_jail']) {
                    $projectId = $this->gadwp->config->options['ga_dash_tableid_jail'];
                } else {
                    echo '<p>' . __("An admin should asign a default Google Analytics Profile.", 'google-analytics-dashboard-for-wp') . '</p><form action="' . menu_page_url('gadash_settings', false) . '" method="POST">' . get_submit_button(__("Select Domain", 'google-analytics-dashboard-for-wp'), 'secondary') . '</form>';
                    return;
                }
            }
            if (!$projectId) {
                echo '<p>' . __("Something went wrong while retrieving property data. You need to create and properly configure a Google Analytics account:", 'google-analytics-dashboard-for-wp') . '</p> <form action="https://deconf.com/how-to-set-up-google-analytics-on-your-website/" method="POST">' . get_submit_button(__("Find out more!", 'google-analytics-dashboard-for-wp'), 'secondary') . '</form>';
                return;
            }
            ?>
<div id="gadwp-window-1"></div>
<?php 
        }
开发者ID:aguerojahannes,项目名称:aguerojahannes.com,代码行数:30,代码来源:widgets.php


示例3: wpcf_fields_radio_editor_callback

/**
 * Editor callback form.
 */
function wpcf_fields_radio_editor_callback()
{
    wpcf_admin_ajax_head('Insert checkbox', 'wpcf');
    $field = wpcf_admin_fields_get_field($_GET['field_id']);
    if (empty($field)) {
        echo '<div class="message error"><p>' . __('Wrong field specified', 'wpcf') . '</p></div>';
        wpcf_admin_ajax_footer();
        return '';
    }
    $form = array();
    $form['#form']['callback'] = 'wpcf_fields_radio_editor_submit';
    $form['display'] = array('#type' => 'radios', '#default_value' => 'db', '#name' => 'display', '#options' => array('display_from_db' => array('#title' => __('Display the value of this field from the database', 'wpcf'), '#name' => 'display', '#value' => 'db', '#inline' => true, '#after' => '<br />'), 'display_values' => array('#title' => __('Show one of these values:', 'wpcf'), '#name' => 'display', '#value' => 'value')), '#inline' => true);
    if (!empty($field['data']['options'])) {
        $form['table-open'] = array('#type' => 'markup', '#markup' => '<table style="margin-top:20px;" cellpadding="0" cellspacing="8">');
        foreach ($field['data']['options'] as $option_id => $option) {
            if ($option_id == 'default') {
                continue;
            }
            $value = isset($option['display_value']) ? $option['display_value'] : $option['value'];
            $form['display-value-' . $option_id] = array('#type' => 'textfield', '#title' => $option['title'], '#name' => 'options[' . $option_id . ']', '#value' => $value, '#inline' => true, '#pattern' => '<tr><td style="text-align:right;"><LABEL></td><td><ELEMENT></td></tr>', '#attributes' => array('style' => 'width:200px;'));
        }
        $form['table-close'] = array('#type' => 'markup', '#markup' => '</table>');
    }
    $form['submit'] = array('#type' => 'markup', '#markup' => get_submit_button());
    $f = wpcf_form('wpcf-form', $form);
    echo '<form method="post" action="">';
    echo $f->renderForm();
    echo '</form>';
    wpcf_admin_ajax_footer();
}
开发者ID:rdbartlett,项目名称:kellyspencer.co.nz,代码行数:33,代码来源:radio.php


示例4: wpcf_fields_checkbox_editor_callback

/**
 * Editor callback form.
 */
function wpcf_fields_checkbox_editor_callback()
{
    $form = array();
    $value_not_selected = '';
    $value_selected = '';
    if (isset($_GET['field_id'])) {
        $field = wpcf_admin_fields_get_field($_GET['field_id']);
        if (!empty($field)) {
            if (isset($field['data']['display_value_not_selected'])) {
                $value_not_selected = $field['data']['display_value_not_selected'];
            }
            if (isset($field['data']['display_value_selected'])) {
                $value_selected = $field['data']['display_value_selected'];
            }
        }
    }
    $form['#form']['callback'] = 'wpcf_fields_checkbox_editor_submit';
    $form['display'] = array('#type' => 'radios', '#default_value' => 'db', '#name' => 'display', '#options' => array('display_from_db' => array('#title' => __('Display the value of this field from the database', 'wpcf'), '#name' => 'display', '#value' => 'db', '#inline' => true, '#after' => '<br />'), 'display_values' => array('#title' => __('Show one of these two values:', 'wpcf'), '#name' => 'display', '#value' => 'value')), '#inline' => true);
    $form['display-value-1'] = array('#type' => 'textfield', '#title' => '<td style="text-align:right;">' . __('Not selected:', 'wpcf') . '</td><td>', '#name' => 'display_value_not_selected', '#value' => $value_not_selected, '#inline' => true, '#before' => '<table><tr>', '#after' => '</td></tr>');
    $form['display-value-2'] = array('#type' => 'textfield', '#title' => '<td style="text-align:right;">' . __('Selected:', 'wpcf') . '</td><td>', '#name' => 'display_value_selected', '#value' => $value_selected, '#after' => '</tr></table>');
    $form['submit'] = array('#type' => 'markup', '#markup' => get_submit_button());
    $f = wpcf_form('wpcf-form', $form);
    wpcf_admin_ajax_head('Insert checkbox', 'wpcf');
    echo '<form method="post" action="">';
    echo $f->renderForm();
    echo '</form>';
    wpcf_admin_ajax_footer();
}
开发者ID:rdbartlett,项目名称:kellyspencer.co.nz,代码行数:31,代码来源:checkbox.php


示例5: add_change_member_type_selectbox

    public function add_change_member_type_selectbox($where = '')
    {
        //Since wp will not pass whether it is for top/bottom, let us use static var to deremine position
        static $position;
        if (!isset($position)) {
            $position = 'top';
            //assume it will be called from top
        } else {
            $position = 'bottom';
        }
        //only admin/super admin
        if (!current_user_can('edit_users')) {
            return;
        }
        $member_types = bp_get_member_types(array(), 'objects');
        if (empty($member_types)) {
            return;
        }
        $output = '<div class="alignright" id="bp-member-type-change-action_' . $position . '">' . '<label for="new_member_type_' . $position . '" class="screen-reader-text">' . __('Change member type to…', 'bp-member-type-generator') . '</label>
					<select id="new_member_type_' . $position . '" name="new_member_type_' . $position . '">
					<option value="">' . __('Change member type to…', 'bp-member-type-generator') . '</option>';
        foreach ($member_types as $key => $type) {
            $output .= sprintf('<option value="%s">%s</option>', esc_attr($key), $type->labels['singular_name']);
        }
        $output .= '</select>';
        $output .= get_submit_button(__('Change', 'bp-member-type-generator'), 'secondary', 'change-member-type', false);
        $output .= '</div>';
        echo $output;
    }
开发者ID:buddydev,项目名称:bp-member-type-generator,代码行数:29,代码来源:user-helper.php


示例6: admin_post_thumbnail_html

 /**
  * Generate HTML on the featured image size
  *
  * @param $content
  * @param $ID
  *
  * @return string
  */
 public static function admin_post_thumbnail_html($content, $ID)
 {
     $content .= '<span class="spinner"></span>';
     $content .= get_submit_button('Regenerate image sizes', 'primary', 'sis_featured', false, array('id' => 'sis_featured_regenerate', 'data-nonce' => wp_create_nonce('sis-regenerate-featured-' . $ID)));
     $content .= '<div class="sis_message"></div>';
     return $content;
 }
开发者ID:waynestedman,项目名称:commodore-new,代码行数:15,代码来源:post.php


示例7: buttons

 function buttons()
 {
     $active_tab = isset($_GET['tab']) ? $_GET['tab'] : 'display';
     $html = "";
     $html .= '<a href="' . get_home_url() . '?apollo=true&TB_iframe=true&width=640&height=632" class="preview thickbox thickbox-preview" title="Be sure to save your settings first">Preview</a>';
     $html .= '<a id="clear" href="?page=apollo_general_settings&tab=' . $active_tab . '&refresh" class="clear-settings">Clear Settings</a>';
     $html .= get_submit_button("Save Changes", "primary", "submit", false);
     $html = '<span>' . $html . '</span>';
     return $html;
 }
开发者ID:bqevin,项目名称:wp-shopeasy,代码行数:10,代码来源:settings.php


示例8: render

 public function render()
 {
     printf('<div class="puc-debug-bar-panel" id="puc-debug-bar-panel_%1$s" data-slug="%1$s" data-nonce="%2$s">', esc_attr($this->updateChecker->slug), esc_attr(wp_create_nonce('puc-ajax')));
     $responseBox = '<div class="puc-ajax-response" style="display: none;"></div>';
     echo '<h3>Configuration</h3>';
     echo '<table class="puc-debug-data">';
     $this->row('Plugin file', htmlentities($this->updateChecker->pluginFile));
     $this->row('Slug', htmlentities($this->updateChecker->slug));
     $this->row('DB option', htmlentities($this->updateChecker->optionName));
     $requestInfoButton = function_exists('get_submit_button') ? get_submit_button('Request Info', 'secondary', 'puc-request-info-button', false) : '';
     $this->row('Metadata URL', htmlentities($this->updateChecker->metadataUrl) . ' ' . $requestInfoButton . $responseBox);
     if ($this->updateChecker->checkPeriod > 0) {
         $this->row('Automatic checks', 'Every ' . $this->updateChecker->checkPeriod . ' hours');
     } else {
         $this->row('Automatic checks', 'Disabled');
     }
     if (isset($this->updateChecker->throttleRedundantChecks)) {
         if ($this->updateChecker->throttleRedundantChecks && $this->updateChecker->checkPeriod > 0) {
             $this->row('Throttling', sprintf('Enabled. If an update is already available, check for updates every %1$d hours instead of every %2$d hours.', $this->updateChecker->throttledCheckPeriod, $this->updateChecker->checkPeriod));
         } else {
             $this->row('Throttling', 'Disabled');
         }
     }
     echo '</table>';
     echo '<h3>Status</h3>';
     echo '<table class="puc-debug-data">';
     $state = $this->updateChecker->getUpdateState();
     $checkNowButton = function_exists('get_submit_button') ? get_submit_button('Check Now', 'secondary', 'puc-check-now-button', false) : '';
     if (isset($state, $state->lastCheck)) {
         $this->row('Last check', $this->formatTimeWithDelta($state->lastCheck) . ' ' . $checkNowButton . $responseBox);
     } else {
         $this->row('Last check', 'Never');
     }
     $nextCheck = wp_next_scheduled($this->updateChecker->getCronHookName());
     $this->row('Next automatic check', $this->formatTimeWithDelta($nextCheck));
     if (isset($state, $state->checkedVersion)) {
         $this->row('Checked version', htmlentities($state->checkedVersion));
         $this->row('Cached update', $state->update);
     }
     $this->row('Update checker class', htmlentities(get_class($this->updateChecker)));
     echo '</table>';
     $update = $this->updateChecker->getUpdate();
     if ($update !== null) {
         echo '<h3>An Update Is Available</h3>';
         echo '<table class="puc-debug-data">';
         $fields = array('version', 'download_url', 'slug', 'homepage', 'upgrade_notice');
         foreach ($fields as $field) {
             $this->row(ucwords(str_replace('_', ' ', $field)), htmlentities($update->{$field}));
         }
         echo '</table>';
     } else {
         echo '<h3>No updates currently available</h3>';
     }
     echo '</div>';
 }
开发者ID:maesson,项目名称:lyft,代码行数:55,代码来源:debug-bar-panel.php


示例9: bizz_builder_screen_options

function bizz_builder_screen_options($status, $args)
{
    if ($args->base == 'toplevel_page_bizz-layout') {
        $button = get_submit_button(__('Apply', 'bizzthemes'), 'button', 'screen-options-apply', false);
        $user = get_current_user_id();
        $usermeta = get_user_meta($user, 'templates_screen_options', true);
        $saved1 = isset($usermeta['inactive_widgets']) ? $usermeta['inactive_widgets'] : false;
        $checked1 = checked($saved1, 1, false);
        return "<h5>" . __('Show on screen', 'bizzthemes') . "</h5>\r\r\n\t\t\t\t\t<p class='cmi_custom_fields'>\r\r\n\t\t\t\t\t\t<input type='checkbox' value='1' id='templates_screen[inactive_widgets]' name='templates_screen[inactive_widgets]' {$checked1} />\r\r\n\t\t\t\t\t\t<label for='templates_screen[inactive_widgets]'>" . __('Show Inactive Widgets', 'bizzthemes') . "</label>\r\r\n\t\t\t\t\t</p>\r\r\n\t\t\t\t\t{$button}\r\r\n\t\t\t\t\t<input type='hidden' name='wp_screen_options[option]' value='templates_screen_options' />\r\r\n\t\t\t\t\t<input type='hidden' name='wp_screen_options[value]' value='yes' />\r\r\n\t\t\t\t\t";
    }
}
开发者ID:loevendahl,项目名称:flexbil,代码行数:11,代码来源:frame_layout.php


示例10: printForm

 /**
  * Return form HTML replacing variables in a template string.
  *
  * @return string
  */
 private function printForm()
 {
     $title = apply_filters('the_title', $this->post->post_title);
     $nonce = self::NONCE . get_current_blog_id();
     $data = ['action' => esc_attr(Launcher::SLUG . '_send_mail'), 'postId' => $this->post->ID, 'postTitle' => esc_attr($title), 'recipient' => esc_attr($this->author->get('user_email')), 'messageLabel' => esc_html__('Message:', 'reject-notify'), 'button' => get_submit_button(esc_html__('Send', 'reject-notify')), 'nonce' => wp_nonce_field($nonce, self::NONCE, true, false), 'title' => sprintf(esc_html__('Send reject mail to %s', 'reject-notify'), esc_html($this->author->get('display_name'))), 'message' => vsprintf(esc_html__('Sorry %s, your post %s was rejected.', 'reject-notify'), [esc_html($this->author->get('display_name')), '&quot;' . esc_html($title) . '&quot;'])];
     $template = file_get_contents(dirname($this->path) . '/templates/form.php');
     foreach ($data as $key => $value) {
         $template = str_replace("{{{{$key}}}}", $value, $template);
     }
     return $template;
 }
开发者ID:makeandship,项目名称:RejectNotify,代码行数:16,代码来源:FormCase.php


示例11: wpcf_fields_url_editor_callback

/**
 * Editor callback form.
 */
function wpcf_fields_url_editor_callback()
{
    $form = array();
    $form['#form']['callback'] = 'wpcf_fields_url_editor_submit';
    $form['title'] = array('#type' => 'textfield', '#title' => __('Title', 'wpcf'), '#description' => __('If set, this text will be displayed instead of raw data'), '#name' => 'title');
    $form['submit'] = array('#type' => 'markup', '#markup' => get_submit_button());
    $f = wpcf_form('wpcf-form', $form);
    wpcf_admin_ajax_head('Insert URL', 'wpcf');
    echo '<form method="post" action="">';
    echo $f->renderForm();
    echo '</form>';
    wpcf_admin_ajax_footer();
}
开发者ID:nuevomediagroup,项目名称:nmg-code,代码行数:16,代码来源:url.php


示例12: wpcf_fields_email_editor_callback

/**
 * Editor callback form.
 */
function wpcf_fields_email_editor_callback()
{
    $last_settings = wpcf_admin_fields_get_field_last_settings($_GET['field_id']);
    $form = array();
    $form['#form']['callback'] = 'wpcf_fields_email_editor_submit';
    $form['title'] = array('#type' => 'textfield', '#title' => __('Title', 'wpcf'), '#description' => __('If set, this text will be displayed instead of raw data'), '#name' => 'title', '#value' => isset($last_settings['title']) ? $last_settings['title'] : '');
    $form['submit'] = array('#type' => 'markup', '#markup' => get_submit_button());
    $f = wpcf_form('wpcf-form', $form);
    wpcf_admin_ajax_head('Insert email', 'wpcf');
    echo '<form method="post" action="">';
    echo $f->renderForm();
    echo '</form>';
    wpcf_admin_ajax_footer();
}
开发者ID:nuevomediagroup,项目名称:nmg-code,代码行数:17,代码来源:email.php


示例13: mtphr_dnt_settings_display

function mtphr_dnt_settings_display($active_tab = null)
{
    ?>
	<!-- Create a header in the default WordPress 'wrap' container -->
	<div class="wrap">

		<div id="icon-themes" class="icon32"></div>
		<h2><?php 
    _e('Ditty News Ticker Settings', 'ditty-news-ticker');
    ?>
</h2>
		<?php 
    settings_errors();
    ?>

		<?php 
    $tabs = mtphr_dnt_settings_tabs();
    $active_tab = isset($_GET['tab']) ? $_GET['tab'] : 'general';
    ?>

		<ul style="margin-bottom:20px;" class="subsubsub">
			<?php 
    $num_tabs = count($tabs);
    $count = 0;
    foreach ($tabs as $key => $tab) {
        $count++;
        $current = $key == $active_tab ? 'class="current"' : '';
        $sep = $count != $num_tabs ? ' |' : '';
        echo '<li><a href="?post_type=ditty_news_ticker&page=mtphr_dnt_settings&tab=' . $key . '" ' . $current . '>' . ucfirst($key) . '</a>' . $sep . '</li>';
    }
    ?>
		</ul>

		<br class="clear" />

		<form method="post" action="options.php">
			<?php 
    settings_fields($tabs[$active_tab]);
    do_settings_sections($tabs[$active_tab]);
    echo apply_filters('mtphr_dnt_settings_submit_button', get_submit_button());
    ?>
		</form>

	</div><!-- /.wrap -->
	<?php 
}
开发者ID:serker72,项目名称:T3S,代码行数:46,代码来源:settings.php


示例14: notice

 /**
  * Checks if there are existing settings from the Old iCal or Facebook Plugins
  * and displays a notice with a button to migrated those using AJAX
  *
  * @return string
  */
 public function notice()
 {
     if (!Tribe__Events__Aggregator__Page::instance()->is_screen()) {
         return false;
     }
     if (($this->is_facebook_migrated() || !$this->has_facebook_setting()) && ($this->is_ical_migrated() || !$this->has_ical_setting())) {
         return false;
     }
     $aggregator = Tribe__Events__Aggregator::instance();
     $html = '<p>' . esc_html__('Thanks for activating Event Aggregator! It looks like you have some settings and imports configured on our legacy importer plugins. To complete your transition, we need to transfer those options to our new system.', 'the-events-calendar');
     if (!$this->is_facebook_migrated() && $this->has_facebook_setting()) {
         $html .= '<p style="display:inline-block;">' . get_submit_button(esc_html__('Migrate Facebook Events settings', 'the-events-calendar'), 'secondary', 'tribe-migrate-facebook-settings', false) . '<span class="spinner"></span></p>';
     }
     if (!$this->is_ical_migrated() && $this->has_ical_setting()) {
         $html .= '<p style="display:inline-block;">' . get_submit_button(esc_html__('Migrate iCal Importer settings', 'the-events-calendar'), 'secondary', 'tribe-migrate-ical-settings', false) . '<span class="spinner"></span></p>';
     }
     return Tribe__Admin__Notices::instance()->render('tribe-aggregator-migrate-legacy-settings', $html);
 }
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:24,代码来源:Migrate.php


示例15: file_gallery_list_meta_row

/**
 * {@internal Missing Short Description}}
 *
 * @since 2.5.0
 *
 * @param unknown_type $entry
 * @param unknown_type $count
 * @return unknown
 */
function file_gallery_list_meta_row($entry, &$count)
{
    static $update_nonce = false;
    if (is_protected_meta($entry['meta_key'], 'post')) {
        return;
    }
    if (!$update_nonce) {
        $update_nonce = wp_create_nonce('add-meta');
    }
    $r = '';
    ++$count;
    if ($count % 2) {
        $style = 'alternate';
    } else {
        $style = '';
    }
    if (is_serialized($entry['meta_value'])) {
        if (is_serialized_string($entry['meta_value'])) {
            // this is a serialized string, so we should display it
            $entry['meta_value'] = maybe_unserialize($entry['meta_value']);
        } else {
            // this is a serialized array/object so we should NOT display it
            --$count;
            return;
        }
    }
    $entry['meta_key'] = esc_attr($entry['meta_key']);
    $entry['meta_value'] = esc_textarea($entry['meta_value']);
    // using a <textarea />
    $entry['meta_id'] = (int) $entry['meta_id'];
    $delete_nonce = wp_create_nonce('delete-meta_' . $entry['meta_id']);
    $r .= "\n\t<tr id='meta-{$entry['meta_id']}' class='{$style}'>";
    $r .= "\n\t\t<td class='left'><label class='screen-reader-text' for='meta[{$entry['meta_id']}][key]'>" . __('Key') . "</label><input name='meta[{$entry['meta_id']}][key]' id='meta[{$entry['meta_id']}][key]' type='text' size='20' value='{$entry['meta_key']}' />";
    $r .= "\n\t\t<div class='submit'>";
    $r .= get_submit_button(__('Delete'), 'deletemeta small', "deletemeta[{$entry['meta_id']}]", false, array('data-wp-lists' => "delete:attachment-the-list:meta-{$entry['meta_id']}::_ajax_nonce={$delete_nonce}"));
    $r .= "\n\t\t";
    $r .= get_submit_button(__('Update'), 'updatemeta small', "meta-{$entry['meta_id']}-submit", false, array('data-wp-lists' => "add:attachment-the-list:meta-{$entry['meta_id']}::_ajax_nonce-add-meta={$update_nonce}"));
    $r .= "</div>";
    $r .= wp_nonce_field('change-meta', '_ajax_nonce', false, false);
    $r .= "</td>";
    $r .= "\n\t\t<td><label class='screen-reader-text' for='meta[{$entry['meta_id']}][value]'>" . __('Value') . "</label><textarea name='meta[{$entry['meta_id']}][value]' id='meta[{$entry['meta_id']}][value]' rows='2' cols='30'>{$entry['meta_value']}</textarea></td>\n\t</tr>";
    return $r;
}
开发者ID:kyme-online,项目名称:Ramesh-Photography,代码行数:52,代码来源:attachments-custom-fields.php


示例16: wpcf_fields_numeric_editor_callback

/**
 * Editor callback form.
 */
function wpcf_fields_numeric_editor_callback()
{
    wp_enqueue_style('wpcf-fields', WPCF_EMBEDDED_RES_RELPATH . '/css/basic.css', array(), WPCF_VERSION);
    wp_enqueue_script('jquery');
    // Get field
    $field = wpcf_admin_fields_get_field($_GET['field_id']);
    if (empty($field)) {
        _e('Wrong field specified', 'wpcf');
        die;
    }
    $last_settings = wpcf_admin_fields_get_field_last_settings($_GET['field_id']);
    $form = array();
    $form['#form']['callback'] = 'wpcf_fields_numeric_editor_submit';
    $form['format'] = array('#type' => 'textfield', '#title' => __('Output format', 'wpcf'), '#description' => __("Similar to sprintf function. Default: 'FIELD_NAME: FIELD_VALUE'.", 'wpcf'), '#name' => 'format', '#value' => isset($last_settings['format']) ? $last_settings['format'] : 'FIELD_NAME: FIELD_VALUE');
    $form['submit'] = array('#type' => 'markup', '#markup' => get_submit_button(__('Insert shortcode', 'wpcf')));
    $f = wpcf_form('wpcf-form', $form);
    wpcf_admin_ajax_head('Insert numeric', 'wpcf');
    echo '<form method="post" action="">';
    echo $f->renderForm();
    echo '</form>';
}
开发者ID:nuevomediagroup,项目名称:nmg-code,代码行数:24,代码来源:numeric.php


示例17: admin_page

 /**
  * Admin page html
  *
  * @since 0.1
  */
 function admin_page()
 {
     $files = new WP_Parser_JSON_File();
     // abort if we cannot access the WP_Filesystem API
     if ($files->generate_files() === true) {
         return;
     }
     echo '<div class="wrap">';
     echo '<h2>' . __('WP Parser JSON', 'wp-parser-json') . '</h2>';
     echo '<p>' . __('Generate json files from all functions, hooks, filters, actions and classes', 'wp-parser-json') . '</p>';
     settings_errors();
     // don't show the form if the post types from WP Parser don't exist
     if (!$files->post_types_exists()) {
         return;
     }
     echo '<form method="post" action="">';
     wp_nonce_field('wp-parser-json_nonce');
     echo get_submit_button(esc_html__('Generate json files!', 'wp-parser-json'));
     echo '</form>';
     $errors = get_settings_errors();
     $settings_updated = true;
     // Check if new files were generated.
     if (!(isset($errors[0]['code']) && 'wp_parser_json_updated' === $errors[0]['code'])) {
         // Offer download link to old zip file if it exists.
         $zip_dir = plugin_dir_path(__FILE__) . 'json-files/wp-parser-json.zip';
         $version = plugin_dir_path(__FILE__) . 'json-files/version.json';
         if (file_exists($zip_dir) && file_exists($version)) {
             $version = json_decode(file_get_contents($version));
             $version = isset($version->version) ? '(WP ' . $version->version . ')' : '';
             echo '<a href="' . plugins_url('wp-parser-json') . '/json-files/wp-parser-json.zip">';
             printf(__('download %s files', 'wp-parser-json'), $version) . '</a>';
         }
         $settings_updated = false;
     }
     if ($settings_updated) {
         do_action('wp_parser_json_afer_form');
     }
     echo '</div>';
 }
开发者ID:keesiemeijer,项目名称:wp-parser-json,代码行数:44,代码来源:class-wp-parser-json-admin.php


示例18: aviators_settings_render_settings_page

/**
 * Renders settings page
 */
function aviators_settings_render_settings_page()
{
    $plugins = aviator_core_get_all_plugins_list();
    $page = $_GET['page'];
    $config = aviators_settings_get_config($plugins[$page]['path'] . '/settings.json');
    $tabs = aviators_settings_get_tabs($page);
    $registered_tabs = aviators_settings_get_registered_pages($_GET['page']);
    $submit = get_submit_button();
    $active_tab = !empty($_GET['tab']) ? $_GET['tab'] : $tabs[0]->settings->slug;
    $forms = array();
    foreach ($registered_tabs as $registered_tab) {
        if ($registered_tab == $active_tab) {
            $forms[] = $_GET['page'] . '_' . $registered_tab;
        }
    }
    foreach ($tabs as $tab) {
        if ($tab->settings->slug == $active_tab) {
            $active_tab_title = $tab->settings->title;
        }
    }
    echo View::render('settings/wrapper.twig', array('active_tab_title' => $active_tab_title, 'title' => __('Settings', 'settings'), 'page_title' => $config->title, 'tabs' => aviators_settings_render_tabs(), 'forms' => $forms, 'active_tab' => $active_tab, 'submit' => $submit));
}
开发者ID:dongchpp,项目名称:BIPHP,代码行数:25,代码来源:renderers.php


示例19: displayStatus

 private function displayStatus()
 {
     echo '<h3>Status</h3>';
     echo '<table class="puc-debug-data">';
     $state = $this->updateChecker->getUpdateState();
     $checkNowButton = '';
     if (function_exists('get_submit_button')) {
         $checkNowButton = get_submit_button('Check Now', 'secondary', 'puc-check-now-button', false, array('id' => 'puc-check-now-button-' . $this->updateChecker->slug));
     }
     if (isset($state, $state->lastCheck)) {
         $this->row('Last check', $this->formatTimeWithDelta($state->lastCheck) . ' ' . $checkNowButton . $this->responseBox);
     } else {
         $this->row('Last check', 'Never');
     }
     $nextCheck = wp_next_scheduled($this->updateChecker->scheduler->getCronHookName());
     $this->row('Next automatic check', $this->formatTimeWithDelta($nextCheck));
     if (isset($state, $state->checkedVersion)) {
         $this->row('Checked version', htmlentities($state->checkedVersion));
         $this->row('Cached update', $state->update);
     }
     $this->row('Update checker class', htmlentities(get_class($this->updateChecker)));
     echo '</table>';
 }
开发者ID:LibertyAllianceGit,项目名称:wordpress-popular-posts-feedmaker,代码行数:23,代码来源:debug-bar-panel.php


示例20: Render

 public function Render()
 {
     echo '<div class="wrap">';
     echo '<form id="' . $this->ID() . ' action="" method="post">';
     $header = array();
     //Workspace Title
     $header['title'] = $this->Title();
     // $text = '', $type = 'primary large', $name = 'submit', $wrap = true, $other_attributes = ''
     $header['save'] = get_submit_button(__('Save Changes', 'clearbase'), 'primary large', 'save-changes', false, 'class="button-primary"');
     //Allow for custom header handling
     $header = apply_filters('clearbase_admin_header', $header);
     echo '<h2 class="workspace-h2">';
     echo "<ul class='header'>\n";
     foreach ($header as $id => $item) {
         echo "<li class='header-item {$id}'>{$item}</li>";
     }
     echo "</ul>";
     echo '</h2>';
     // End Render Header
     //render the settings fields
     parent::Render();
     echo '</form></div>';
 }
开发者ID:unity3software,项目名称:clearbase,代码行数:23,代码来源:class-view-admin-settings.php



注:本文中的get_submit_button函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_subordinate函数代码示例发布时间:2022-05-15
下一篇:
PHP get_subdirectory_reserved_names函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap