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

PHP wp_referer_field函数代码示例

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

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



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

示例1: wfu_clean_log_prompt

function wfu_clean_log_prompt()
{
    $siteurl = site_url();
    if (!current_user_can('manage_options')) {
        return wfu_manage_mainmenu();
    }
    $echo_str = "\n" . '<div class="wrap">';
    $echo_str .= "\n\t" . '<div style="margin-top:20px;">';
    $echo_str .= "\n\t\t" . '<a href="' . $siteurl . '/wp-admin/options-general.php?page=wordpress_file_upload&amp;action=maintenance_actions" class="button" title="go back">Go back</a>';
    $echo_str .= "\n\t" . '</div>';
    $echo_str .= "\n\t" . '<h2 style="margin-bottom: 10px;">Clean Database Log</h2>';
    $echo_str .= "\n\t" . '<form enctype="multipart/form-data" name="clean_log" id="clean_log" method="post" action="' . $siteurl . '/wp-admin/options-general.php?page=wordpress_file_upload" class="validate">';
    $nonce = wp_nonce_field('wfu_clean_log', '_wpnonce', false, false);
    $nonce_ref = wp_referer_field(false);
    $echo_str .= "\n\t\t" . $nonce;
    $echo_str .= "\n\t\t" . $nonce_ref;
    $echo_str .= "\n\t\t" . '<input type="hidden" name="action" value="clean_log">';
    $echo_str .= "\n\t\t" . '<label>Are you sure that you want to clean the database log? This will erase all file data kept by the plugin in the database. Files uploaded by the plugin will be maintained, however all relevant information, such as user data, will be erased.</label><br/>';
    $echo_str .= "\n\t\t" . '<p class="submit">';
    $echo_str .= "\n\t\t\t" . '<input type="submit" class="button-primary" name="submit" value="Yes">';
    $echo_str .= "\n\t\t\t" . '<input type="submit" class="button-primary" name="submit" value="Cancel">';
    $echo_str .= "\n\t\t" . '</p>';
    $echo_str .= "\n\t" . '</form>';
    $echo_str .= "\n" . '</div>';
    return $echo_str;
}
开发者ID:Cgorton48,项目名称:ssn790,代码行数:26,代码来源:wfu_admin_maintenance.php


示例2: iframe

 public function iframe()
 {
     global $thesis, $wp_scripts;
     if (!wp_verify_nonce($_GET['window_nonce'], 'thesis_upload_iframe') && current_user_can('upload_files')) {
         wp_die(__('You are not allowed to upload files.', 'thesis'));
     }
     $file = in_array($this->args['file_type'], array('image', 'txt')) ? 'admin-post' : 'update';
     $button_text = !empty($this->args['button']) ? esc_attr($this->args['button']) : ($this->args['file_type'] == 'zip' ? sprintf(__('Add %s', 'thesis'), ucwords(esc_attr($this->args['folder']))) : ($this->args['file_type'] == 'image' ? __('Add Image', 'thesis') : ($this->args['file_type'] == 'txt' ? __('Import Data', 'thesis') : __('Upload', 'thesis'))));
     $import = !empty($_GET['import']) && $_GET['import'] == 'true' ? true : false;
     $image = !empty($_GET['height']) && !empty($_GET['width']) && !empty($_GET['url']) ? true : false;
     echo "<!DOCTYPE html>\n", "<html dir=\"ltr\" lang=\"en-US\">\n", "<head>\n", "<style type=\"text/css\">* { margin: 0; padding: 0; } body #t_canvas { padding: 0; } p.option_field { margin-bottom: 12px; }</style>\n", "<link rel=\"stylesheet\" href=\"", THESIS_CSS_URL, "/admin.css\" type=\"text/css\" media=\"all\" />\n", "<link rel=\"stylesheet\" href=\"", THESIS_CSS_URL, "/options.css\" type=\"text/css\" media=\"all\" />\n";
     do_action($this->args['prefix'] . '_thesis_iframe_head');
     echo $image && empty($import) ? "<script type=\"text/javascript\">\n" . "var thesis_image_result = { height: " . (int) $_GET['height'] . ", width: " . (int) $_GET['width'] . ", url: '" . esc_url($_GET['url']) . "' };\n" . "</script>\n" : '', "</head>\n";
     do_action("{$this->args['prefix']}_before_thesis_iframe_form");
     echo "<body>\n", "\t<div id=\"t_canvas\">\t", "\t\t<form id=\"t_iframe\" method=\"post\" action=\"", admin_url("{$file}.php?action="), esc_attr($this->args['action']), "\" enctype=\"multipart/form-data\">\n", "\t\t\t<p class=\"option_field\">\n", "\t\t\t\t<input type=\"file\" data-style=\"input\" name=\"thesis_file\" />\n", "\t\t\t</p>\n", "\t\t\t<div id=\"t_iframe_submit\">\n", "\t\t\t\t<input type=\"submit\" id=\"t_upload_button\" data-style=\"button ", esc_attr($this->args['button_context']), "\" value=\"{$button_text}\" />\n", $this->args['show_delete'] === true ? "\t\t\t\t<style type=\"text/css\">#t_canvas #t_delete_button { margin-left: 12px; }</style>\n" . "\t\t\t\t<button id=\"t_delete_button\" data-style=\"button delete\" name=\"delete_image\" value=\"1\">" . esc_attr($this->args['delete_text']) . "</button>\n" : '', "\t\t\t\t", wp_nonce_field($this->args['nonce'], 'thesis_form_nonce', false, false), "\n", "\t\t\t\t", wp_referer_field(false), "\n", "\t\t\t\t<input type=\"hidden\" value=\"", esc_attr($this->args['folder']), "\" name=\"location\" />\n", "\t\t\t</div>\n", "\t\t</form>\n";
     do_action("{$this->args['prefix']}_after_thesis_iframe_form");
     echo "\t</div>", "<script type=\"text/javascript\" src=\"", $wp_scripts->base_url, !empty($wp_scripts->registered['jquery-core']->src) ? $wp_scripts->registered['jquery-core']->src : $wp_scripts->registered['jquery']->src, "\"></script>\n", "<script type=\"text/javascript\">", !empty($_GET['action']) && $_GET['action'] == 'import_skin_window' ? "\tjQuery('#t_iframe').submit( function() {\n" . "\t\tif (confirm(\"" . __('Are you sure you want to do this? If you import from a file, you will lose the current state of your Skin unless you make a backup first.\\n\\nHit cancel to return to the manager and make a backup, or hit OK to import the Skin options!', 'thesis') . "\"))\n" . "\t\t\treturn true;\n" . "\t\telse return false;\n" . "\t});\n" : '', !!$import ? "\tparent.window.location.reload();\n" : '', $this->args['show_delete'] === true && $this->args['file_type'] == 'image' ? "\tjQuery(document).ready(function(\$){\n" . "\t\t\$('#t_delete_button').on('click', function(){\n" . "\t\t\tif (confirm('" . __('Are you sure you want to remove this image?', 'thesis') . "')) {\n" . "\t\t\t\t\$.each(['url', 'height', 'width'], function(){\n" . "\t\t\t\t\t\$(parent.window.document.getElementById('image_' + this)).val('');\n" . "\t\t\t\t});\n" . "\t\t\t\t\$('body > img').remove();\n" . "\t\t\t}\n" . "\t\t\telse\n" . "\t\t\t\treturn false;\n" . "\t\t});\n" . "\t});\n" : '', "</script>\n";
     do_action("{$this->args['prefix']}_thesis_iframe_body_bottom");
     echo "</body>\n", "</html>\n";
 }
开发者ID:iaakash,项目名称:chriskeef,代码行数:20,代码来源:upload.php


示例3: admin_form

    /**
     * Show our admin page
     *
     * @since 0.1
     *
     * @return void
     */
    public function admin_form()
    {
        // multisite and network activated?
        if ($this->is_network_activated()) {
            // only allow network admins through
            if (!is_super_admin()) {
                wp_die(__('You do not have permission to access this page.', 'civicrm-event-organiser'));
            }
        }
        // sanitise admin page url
        $url = $_SERVER['REQUEST_URI'];
        $url_array = explode('&', $url);
        if (is_array($url_array)) {
            $url = $url_array[0];
        }
        // get all participant roles
        $roles = $this->plugin->civi->get_participant_roles_select($event = null);
        // get all event types
        $types = $this->plugin->civi->get_event_types_select();
        // open admin page
        echo '

		<div class="wrap" id="civi_eo_admin_wrapper">

		<h1>' . __('CiviCRM Event Organiser', 'civicrm-event-organiser') . '</h1>

		<form method="post" action="' . htmlentities($url . '&updated=true') . '">

		' . wp_nonce_field('civi_eo_admin_action', 'civi_eo_nonce', true, false) . '
		' . wp_referer_field(false) . '

		';
        // open div
        echo '<div id="civi_eo_admin_options">

		<hr>';
        // show table
        echo '
		<h3>' . __('General Settings', 'civicrm-event-organiser') . '</h3>

		<p>' . __('The following options configure some CiviCRM and Event Organiser defaults.', 'civicrm-event-organiser') . '</p>

		<table class="form-table">

		';
        // did we get any roles?
        if ($roles != '') {
            echo '
			<tr valign="top">
				<th scope="row"><label for="civi_eo_event_default_role">' . __('Default CiviCRM Participant Role for Events', 'civicrm-event-organiser') . '</label></th>
				<td><select id="civi_eo_event_default_role" name="civi_eo_event_default_role">' . $roles . '</select></td>
			</tr>
			';
        }
        // did we get any types?
        if ($types != '') {
            echo '
			<tr valign="top">
				<th scope="row"><label for="civi_eo_event_default_type">' . __('Default CiviCRM Event Type', 'civicrm-event-organiser') . '</label></th>
				<td><select id="civi_eo_event_default_type" name="civi_eo_event_default_type">' . $types . '</select></td>
			</tr>
			';
        }
        // close table
        echo '
		</table>

		<hr>';
        // show blurb
        echo '
		<h3>' . __('Synchronisation', 'civicrm-event-organiser') . '</h3>

		<p><strong>' . __('Please note: the following are not settings as such. Ticking a checkbox below and submitting the form will cause the checked sync procedure to run. It is recommended that only one procedure is run in any one go.', 'civicrm-event-organiser') . '</strong></p>

		<p>' . __('Things can be a little complicated on initial setup because there can be data in WordPress or CiviCRM or both.', 'civicrm-event-organiser') . '</p>

		<p>' . __('The most robust procedure for setting up the sync between Event Organiser events and CiviEvents is to sync in the following order:', 'civicrm-event-organiser') . '</p>

		<ol>
			<li>' . __('Only sync Event Categories with CiviCRM Event Types', 'civicrm-event-organiser') . '</li>
			<li>' . __('Only sync EO Venues with CiviCRM Locations', 'civicrm-event-organiser') . '</li>
			<li>' . __('Only sync EO Events with CiviEvents.', 'civicrm-event-organiser') . '</li>
		</ol>

		<p>' . __('Your set up may require some direct manipulation of the data, but the following procedures should help get things moving.', 'civicrm-event-organiser') . '</p>

		<hr>';
        // show table
        echo '
		<h3>' . __('Event Type Synchronisation', 'civicrm-event-organiser') . '</h3>

		<p>' . __('At present, there is no CiviCRM hook that fires when a CiviEvent event type is deleted.', 'civicrm-event-organiser') . '<br />
		<strong>' . __('Event types should always be deleted from the Event Category screen.', 'civicrm-event-organiser') . '</strong></p>
//.........这里部分代码省略.........
开发者ID:academe,项目名称:civicrm-event-organiser,代码行数:101,代码来源:civicrm-event-organiser-admin.php


示例4: wp_nonce_field

/**
 * Retrieve or display nonce hidden field for forms.
 *
 * The nonce field is used to validate that the contents of the form came from
 * the location on the current site and not somewhere else. The nonce does not
 * offer absolute protection, but should protect against most cases. It is very
 * important to use nonce field in forms.
 *
 * If you set $echo to true and set $referer to true, then you will need to
 * retrieve the {@link wp_referer_field() wp referer field}. If you have the
 * $referer set to true and are echoing the nonce field, it will also echo the
 * referer field.
 *
 * The $action and $name are optional, but if you want to have better security,
 * it is strongly suggested to set those two parameters. It is easier to just
 * call the function without any parameters, because validation of the nonce
 * doesn't require any parameters, but since crackers know what the default is
 * it won't be difficult for them to find a way around your nonce and cause
 * damage.
 *
 * The input name will be whatever $name value you gave. The input value will be
 * the nonce creation value.
 *
 * @package WordPress
 * @subpackage Security
 * @since 2.0.4
 *
 * @param string $action Optional. Action name.
 * @param string $name Optional. Nonce name.
 * @param bool $referer Optional, default true. Whether to set the referer field for validation.
 * @param bool $echo Optional, default true. Whether to display or return hidden form field.
 * @return string Nonce field.
 */
function wp_nonce_field($action = -1, $name = "_wpnonce", $referer = true, $echo = true)
{
    $name = attribute_escape($name);
    $nonce_field = '<input type="hidden" id="' . $name . '" name="' . $name . '" value="' . wp_create_nonce($action) . '" />';
    if ($echo) {
        echo $nonce_field;
    }
    if ($referer) {
        wp_referer_field($echo, 'previous');
    }
    return $nonce_field;
}
开发者ID:joelglennwright,项目名称:agencypress,代码行数:45,代码来源:functions.php


示例5: display_tablenav

 /**
  * @global string $tab
  *
  * @param string $which
  */
 protected function display_tablenav($which)
 {
     if ($GLOBALS['tab'] === 'featured') {
         return;
     }
     if ('top' == $which) {
         wp_referer_field();
         ?>
         <div class="tablenav top">
             <div class="alignleft actions">
                 <?php 
         /**
          * Fires before the Plugin Install table header pagination is displayed.
          *
          * @since 2.7.0
          */
         do_action('install_plugins_table_header');
         ?>
             </div>
             <?php 
         $this->pagination($which);
         ?>
             <br class="clear"/>
         </div>
     <?php 
     } else {
         ?>
         <div class="tablenav bottom">
             <?php 
         $this->pagination($which);
         ?>
             <br class="clear"/>
         </div>
         <?php 
     }
 }
开发者ID:richardbota,项目名称:WordPress-Theme-Development-with-Bootstrap,代码行数:41,代码来源:class-wp-plugin-install-list-table.php


示例6: get_book

$existing = get_book($id);
$meta = get_book_meta($existing->id);
$tags = join(get_book_tags($existing->id), ',');
echo '
			<div class="wrap dk_single">
				<h2>' . __("Edit book", NRTD) . '</h2>
				<a href = "' . DK_BOOKSHELF_URL . '" >' . __('My bookshelf', NRTD) . ' &raquo;</a>
				<a href = "' . get_page_link(intval($_GET['page_id'])) . '" >' . __("Manage books", NRTD) . ' &raquo;</a>

				<form method="post" action="' . get_option('siteurl') . '/wp-content/plugins/dk_books/functions/edit.php">
			';
if (function_exists('wp_nonce_field')) {
    wp_nonce_field('now-reading-edit');
}
if (function_exists('wp_referer_field')) {
    wp_referer_field();
}
echo '
				<div class="book-image">
					<img style="" id="book-image-0" alt="Book Cover" src="' . $existing->image . '" />
				</div>

				<h3><cite>' . $existing->title . '</cite><br /> by ' . $existing->author . '</h3>


				<table class="form-table" cellspacing="2" cellpadding="5">

				<input type="hidden" name="action" value="update" />
				<input type="hidden" name="count" value="1" />
				<input type="hidden" name="id[]" value="' . $existing->id . '" />
开发者ID:joaosigno,项目名称:dazake-job,代码行数:30,代码来源:single_tpl.php


示例7: aktt_options_form


//.........这里部分代码省略.........
						<li>' . __('If you\'re not logged in, you can use your Twitter username and password', 'twitter-tools') . '</li>
						<li>' . __('Your Application\'s Name will be what shows up after "via" in your twitter stream', 'twitter-tools') . '</li>
						<li>' . __('Application Type should be set on ', 'twitter-tools') . '<strong>' . __('Browser', 'twitter-tools') . '</strong></li>
						<li>' . __('The Callback URL should be ', 'twitter-tools') . '<strong>' . get_bloginfo('url') . '</strong></li>
						<li>' . __('Default Access type should be set to ', 'twitter-tools') . '<strong>' . __('Read &amp; Write', 'twitter-tools') . '</strong> ' . __('(this is NOT the default)', 'twitter-tools') . '</li>
						</ul>
					<p>' . __('Once you have registered your site as an application, you will be provided with a consumer key and a comsumer secret.', 'twitter-tools') . '</p>
					</div>
					<h4>' . __('2. Copy and paste your consumer key and consumer secret into the fields below', 'twitter-tools') . '</h4>
				
					<div class="option">
						<label for="aktt_app_consumer_key">' . __('Twitter Consumer Key', 'twitter-tools') . '</label>
						<input type="text" size="25" name="aktt_app_consumer_key" id="aktt_app_consumer_key" value="' . esc_attr($aktt->app_consumer_key) . '" autocomplete="off">
					</div>
					<div class="option">
						<label for="aktt_app_consumer_secret">' . __('Twitter Consumer Secret', 'twitter-tools') . '</label>
						<input type="text" size="25" name="aktt_app_consumer_secret" id="aktt_app_consumer_secret" value="' . esc_attr($aktt->app_consumer_secret) . '" autocomplete="off">
					</div>
					<h4>3. Copy and paste your Access Token and Access Token Secret into the fields below</h4>
					<p>On the right hand side of your application page, click on \'My Access Token\'.</p>
					<div class="option">
						<label for="aktt_oauth_token">' . __('Access Token', 'twitter-tools') . '</label>
						<input type="text" size="25" name="aktt_oauth_token" id="aktt_oauth_token" value="' . esc_attr($aktt->oauth_token) . '" autocomplete="off">
					</div>
					<div class="option">
						<label for="aktt_oauth_token_secret">' . __('Access Token Secret', 'twitter-tools') . '</label>
						<input type="text" size="25" name="aktt_oauth_token_secret" id="aktt_oauth_token_secret" value="' . esc_attr($aktt->oauth_token_secret) . '" autocomplete="off">
					</div>
				</fieldset>
				<p class="submit">
					<input type="submit" name="submit" class="button-primary" value="' . __('Connect to Twitter', 'twitter-tools') . '" />
				</p>
				<input type="hidden" name="ak_action" value="aktt_oauth_test" class="hidden" style="display: none;" />
				' . wp_nonce_field('aktt_oauth_test', '_wpnonce', true, false) . wp_referer_field(false) . '
			</form>
				
				';
    } else {
        if (aktt_oauth_test()) {
            print '	
			<form id="ak_twittertools_disconnect" name="ak_twittertools_disconnect" action="' . admin_url('options-general.php') . '" method="post">
				<p><a href="#" id="aktt_authentication_showhide" class="auth_information_link">Account Information</a></p>
				<div id="aktt_authentication_display">
					<fieldset class="options">
						<div class="option"><span class="auth_label">' . __('Twitter Username ', 'twitter-tools') . '</span><span class="auth_code">' . $aktt->twitter_username . '</span></div>
						<div class="option"><span class="auth_label">' . __('Consumer Key ', 'twitter-tools') . '</span><span class="auth_code">' . $aktt->app_consumer_key . '</span></div>
						<div class="option"><span class="auth_label">' . __('Consumer Secret ', 'twitter-tools') . '</span><span class="auth_code">' . $aktt->app_consumer_secret . '</span></div>
						<div class="option"><span class="auth_label">' . __('Access Token ', 'twitter-tools') . '</span><span class="auth_code">' . $aktt->oauth_token . '</span></div>
						<div class="option"><span class="auth_label">' . __('Access Token Secret ', 'twitter-tools') . '</span><span class="auth_code">' . $aktt->oauth_token_secret . '</span></div>
					</fieldset>
					<p class="submit">
					<input type="submit" name="submit" class="button-primary" value="' . __('Disconnect Your WordPress and Twitter Account', 'twitter-tools') . '" />
					</p>
					<input type="hidden" name="ak_action" value="aktt_twitter_disconnect" class="hidden" style="display: none;" />
					' . wp_nonce_field('aktt_twitter_disconnect', '_wpnonce', true, false) . wp_referer_field(false) . ' 
				</div>		
			</form>
					
			<form id="ak_twittertools" name="ak_twittertools" action="' . admin_url('options-general.php') . '" method="post">
				<fieldset class="options">			
					<div class="option">
						<label for="aktt_notify_twitter">' . __('Enable option to create a tweet when you post in your blog?', 'twitter-tools') . '</label>
						<select name="aktt_notify_twitter" id="aktt_notify_twitter">' . $notify_twitter_options . '</select>
					</div>
					<div class="option">
						<label for="aktt_tweet_prefix">' . __('Tweet prefix for new blog posts:', 'twitter-tools') . '</label>
开发者ID:novuscory,项目名称:ACH,代码行数:67,代码来源:twitter-tools.php


示例8: aktt_excludecat_settings_form

function aktt_excludecat_settings_form()
{
    print '
<style class="text/css">
#aktt_exclude_cat_options {
	list-style: none;
}
#aktt_exclude_cat_options li {
	float: left;
	margin: 0 0 5px 0;
	padding: 3px;
	width: 200px;
}
</style>
<script type="text/javascript">
jQuery(function() {
	jQuery("#aktt_excludecat_select").click(function() {
		jQuery("#aktt_exclude_cat_options input[type=checkbox]").attr("checked", true);
		return false;
	});
	jQuery("#aktt_excludecat_unselect").click(function() {
		jQuery("#aktt_exclude_cat_options input[type=checkbox]").attr("checked", false);
		return false;
	});
});
</script>
<div class="wrap">
	<h2>' . __('Exclude Categories for Twitter Tools', 'twitter-tools-excludecat') . '</h2>
	<form id="aktt_excludecat_settings_form" name="aktt_excludecat_settings_form" action="' . admin_url('options-general.php') . '" method="post">
		<input type="hidden" name="cf_action" value="aktt_excludecat_update_settings" />
		<fieldset class="options">
			<p>' . __('Posts in selected categories will be excluded from blog post tweets', 'twitter-tools-excludecat') . '</p>
			<p><a href="#" id="aktt_excludecat_select">' . __('Select All', 'twitter-tools-excludecat') . '</a> | <a href="#" id="aktt_excludecat_unselect">' . __('Unselect All', 'twitter-tools-excludecat') . '</a></p>
			<ul id="aktt_exclude_cat_options">
	';
    $categories = get_categories('hide_empty=0');
    $exclude_cats = get_option('aktt_excludecats');
    if (!is_array($exclude_cats)) {
        $exclude_cats = array();
    }
    foreach ($categories as $cat) {
        $id = 'aktt_exclude_cat_' . $cat->term_id;
        in_array($cat->term_id, $exclude_cats) ? $checked = ' checked="checked"' : ($checked = '');
        print '
				<li>
					<input type="checkbox" name="aktt_exclude_cats[]" value="' . $cat->term_id . '" id="' . $id . '" ' . $checked . ' />
					<label for="' . $id . '">' . htmlspecialchars($cat->name) . '</label>
				</li>
		';
    }
    print '
			</ul>
			<div class="clear"></div>
		</fieldset>
		<p class="submit">
			<input type="submit" name="submit" value="' . __('Save Settings', 'twitter-tools-excludecat') . '" class="button-primary" />
		</p>
		' . wp_nonce_field('aktt_excludecat_update_settings', '_wpnonce', true, false) . wp_referer_field(false) . '
	</form>
</div>
	';
}
开发者ID:kennethreitz-archive,项目名称:wordpress-skeleton,代码行数:62,代码来源:twitter-tools-excludecat.php


示例9: aktt_bitly_settings_form

function aktt_bitly_settings_form()
{
    global $aktt_bitly_settings;
    print '
<div class="wrap">
	<h2>' . __('Bit.ly for Twitter Tools', 'twitter-tools-bitly') . '</h2>
	<form id="aktt_bitly_settings_form" class="aktt" name="aktt_bitly_settings_form" action="' . admin_url('options-general.php') . '" method="post">
		<input type="hidden" name="cf_action" value="aktt_bitly_update_settings" />
		<fieldset class="options">
	';
    foreach ($aktt_bitly_settings as $key => $config) {
        echo cf_settings_field($key, $config);
    }
    print '
		</fieldset>
		<p class="submit">
			<input type="submit" name="submit" class="button-primary" value="' . __('Save Settings', 'twitter-tools-bitly') . '" />
		</p>
		' . wp_nonce_field('aktt_bitly_save_settings', '_wpnonce', true, false) . wp_referer_field(false) . '
	</form>
</div>
	';
}
开发者ID:kennethreitz-archive,项目名称:wordpress-skeleton,代码行数:23,代码来源:twitter-tools-bitly.php


示例10: wfu_manage_settings

function wfu_manage_settings($message = '')
{
    if (!current_user_can('manage_options')) {
        return;
    }
    $siteurl = site_url();
    $plugin_options = wfu_decode_plugin_options(get_option("wordpress_file_upload_options"));
    $echo_str = '<div class="wrap">';
    $echo_str .= "\n\t" . '<h2>Wordpress File Upload Control Panel</h2>';
    $echo_str .= "\n\t" . '<div style="margin-top:20px;">';
    $echo_str .= wfu_generate_dashboard_menu("\n\t\t", "Settings");
    $echo_str .= "\n\t\t" . '<form enctype="multipart/form-data" name="editsettings" id="editsettings" method="post" action="' . $siteurl . '/wp-admin/options-general.php?page=wordpress_file_upload&amp;action=edit_settings" class="validate">';
    $nonce = wp_nonce_field('wfu_edit_admin_settings', '_wpnonce', false, false);
    $nonce_ref = wp_referer_field(false);
    $echo_str .= "\n\t\t\t" . $nonce;
    $echo_str .= "\n\t\t\t" . $nonce_ref;
    $echo_str .= "\n\t\t\t" . '<input type="hidden" name="action" value="edit_settings">';
    $echo_str .= "\n\t\t\t" . '<table class="form-table">';
    $echo_str .= "\n\t\t\t\t" . '<tbody>';
    $echo_str .= "\n\t\t\t\t\t" . '<tr>';
    $echo_str .= "\n\t\t\t\t\t\t" . '<th scope="row">';
    $echo_str .= "\n\t\t\t\t\t\t\t" . '<label for="wfu_hashfiles">Hash Files</label>';
    $echo_str .= "\n\t\t\t\t\t\t" . '</th>';
    $echo_str .= "\n\t\t\t\t\t\t" . '<td>';
    $echo_str .= "\n\t\t\t\t\t\t\t" . '<input name="wfu_hashfiles" id="wfu_hashfiles" type="checkbox"' . ($plugin_options['hashfiles'] == '1' ? ' checked="checked"' : '') . ' style="width:auto;" /> Enables better control of uploaded files, but slows down performance when uploaded files are larger than 100MBytes';
    $echo_str .= "\n\t\t\t\t\t\t\t" . '<p style="cursor: text; font-size:9px; padding: 0px; margin: 0px; width: 95%; color: #AAAAAA;">Current value: <strong>' . ($plugin_options['hashfiles'] == '1' ? 'Yes' : 'No') . '</strong></p>';
    $echo_str .= "\n\t\t\t\t\t\t" . '</td>';
    $echo_str .= "\n\t\t\t\t\t" . '</tr>';
    $echo_str .= "\n\t\t\t\t\t" . '<tr>';
    $echo_str .= "\n\t\t\t\t\t\t" . '<th scope="row">';
    $echo_str .= "\n\t\t\t\t\t\t\t" . '<label for="wfu_basedir">Base Directory</label>';
    $echo_str .= "\n\t\t\t\t\t\t" . '</th>';
    $echo_str .= "\n\t\t\t\t\t\t" . '<td>';
    $echo_str .= "\n\t\t\t\t\t\t\t" . '<input name="wfu_basedir" id="wfu_basedir" type="text" value="' . $plugin_options['basedir'] . '" />';
    $echo_str .= "\n\t\t\t\t\t\t\t" . '<p style="cursor: text; font-size:9px; padding: 0px; margin: 0px; width: 95%; color: #AAAAAA;">Current value: <strong>' . $plugin_options['basedir'] . '</strong></p>';
    $echo_str .= "\n\t\t\t\t\t\t" . '</td>';
    $echo_str .= "\n\t\t\t\t\t" . '</tr>';
    $echo_str .= "\n\t\t\t\t\t" . '<tr>';
    $echo_str .= "\n\t\t\t\t\t\t" . '<th scope="row">';
    $echo_str .= "\n\t\t\t\t\t\t\t" . '<label for="wfu_postmethod">Post Method</label>';
    $echo_str .= "\n\t\t\t\t\t\t" . '</th>';
    $echo_str .= "\n\t\t\t\t\t\t" . '<td>';
    $echo_str .= "\n\t\t\t\t\t\t\t" . '<select name="wfu_postmethod" id="wfu_postmethod" value="' . $plugin_options['postmethod'] . '">';
    $echo_str .= "\n\t\t\t\t\t\t\t\t" . '<option value="fopen"' . ($plugin_options['postmethod'] == 'fopen' || $plugin_options['postmethod'] == '' ? ' selected="selected"' : '') . '>Using fopen (default)</option>';
    $echo_str .= "\n\t\t\t\t\t\t\t\t" . '<option value="curl"' . ($plugin_options['postmethod'] == 'curl' ? ' selected="selected"' : '') . '>Using cURL</option>';
    $echo_str .= "\n\t\t\t\t\t\t\t\t" . '<option value="socket"' . ($plugin_options['postmethod'] == 'socket' ? ' selected="selected"' : '') . '>Using Sockets</option>';
    $echo_str .= "\n\t\t\t\t\t\t\t" . '</select>';
    $echo_str .= "\n\t\t\t\t\t\t\t" . '<p style="cursor: text; font-size:9px; padding: 0px; margin: 0px; width: 95%; color: #AAAAAA;">Current value: <strong>' . ($plugin_options['postmethod'] == 'fopen' || $plugin_options['postmethod'] == '' ? 'Using fopen' : ($plugin_options['postmethod'] == 'curl' ? 'Using cURL' : 'Using Sockets')) . '</strong></p>';
    $echo_str .= "\n\t\t\t\t\t\t" . '</td>';
    $echo_str .= "\n\t\t\t\t\t" . '</tr>';
    $echo_str .= "\n\t\t\t\t\t" . '<tr>';
    $echo_str .= "\n\t\t\t\t\t\t" . '<th scope="row">';
    $echo_str .= "\n\t\t\t\t\t\t\t" . '<label for="wfu_relaxcss">Relax CSS Rules</label>';
    $echo_str .= "\n\t\t\t\t\t\t" . '</th>';
    $echo_str .= "\n\t\t\t\t\t\t" . '<td>';
    $echo_str .= "\n\t\t\t\t\t\t\t" . '<input name="wfu_relaxcss" id="wfu_relaxcss" type="checkbox"' . ($plugin_options['relaxcss'] == '1' ? ' checked="checked"' : '') . ' style="width:auto;" /> If enabled then the textboxes and the buttons of the plugin will inherit the theme\'s styling';
    $echo_str .= "\n\t\t\t\t\t\t\t" . '<p style="cursor: text; font-size:9px; padding: 0px; margin: 0px; width: 95%; color: #AAAAAA;">Current value: <strong>' . ($plugin_options['relaxcss'] == '1' ? 'Yes' : 'No') . '</strong></p>';
    $echo_str .= "\n\t\t\t\t\t\t" . '</td>';
    $echo_str .= "\n\t\t\t\t\t" . '</tr>';
    $echo_str .= "\n\t\t\t\t\t" . '<tr>';
    $echo_str .= "\n\t\t\t\t\t\t" . '<th scope="row">';
    $echo_str .= "\n\t\t\t\t\t\t\t" . '<label for="wfu_admindomain">Admin Domain</label>';
    $echo_str .= "\n\t\t\t\t\t\t" . '</th>';
    $echo_str .= "\n\t\t\t\t\t\t" . '<td>';
    $echo_str .= "\n\t\t\t\t\t\t\t" . '<select name="wfu_admindomain" id="wfu_admindomain" value="' . $plugin_options['admindomain'] . '">';
    $echo_str .= "\n\t\t\t\t\t\t\t\t" . '<option value="siteurl"' . ($plugin_options['admindomain'] == 'siteurl' || $plugin_options['admindomain'] == '' ? ' selected="selected"' : '') . '>Using site_url (default)</option>';
    $echo_str .= "\n\t\t\t\t\t\t\t\t" . '<option value="adminurl"' . ($plugin_options['admindomain'] == 'adminurl' ? ' selected="selected"' : '') . '>Using admin_url</option>';
    $echo_str .= "\n\t\t\t\t\t\t\t\t" . '<option value="homeurl"' . ($plugin_options['admindomain'] == 'homeurl' ? ' selected="selected"' : '') . '>Using home_url</option>';
    $echo_str .= "\n\t\t\t\t\t\t\t" . '</select>';
    $echo_str .= "\n\t\t\t\t\t\t\t" . '<p style="cursor: text; font-size:9px; padding: 0px; margin: 0px; width: 95%; color: #AAAAAA;">Current value: <strong>' . ($plugin_options['admindomain'] == 'siteurl' || $plugin_options['admindomain'] == '' ? 'Using site_url' : ($plugin_options['admindomain'] == 'adminurl' ? 'Using admin_url' : 'Using home_url')) . '</strong></p>';
    $echo_str .= "\n\t\t\t\t\t\t" . '</td>';
    $echo_str .= "\n\t\t\t\t\t" . '</tr>';
    $echo_str .= "\n\t\t\t\t\t" . '<tr>';
    $echo_str .= "\n\t\t\t\t\t\t" . '<th scope="row">';
    $echo_str .= "\n\t\t\t\t\t\t\t" . '<label for="wfu_mediacustom">Show Custom Fields in Media Library</label>';
    $echo_str .= "\n\t\t\t\t\t\t" . '</th>';
    $echo_str .= "\n\t\t\t\t\t\t" . '<td>';
    $echo_str .= "\n\t\t\t\t\t\t\t" . '<input name="wfu_mediacustom" id="wfu_mediacustom" type="checkbox"' . ($plugin_options['mediacustom'] == '1' ? ' checked="checked"' : '') . ' style="width:auto;" /> If enabled and the uploaded files are added to Media Library then any user fields submitted together with the files will be shown in Media Library';
    $echo_str .= "\n\t\t\t\t\t\t\t" . '<p style="cursor: text; font-size:9px; padding: 0px; margin: 0px; width: 95%; color: #AAAAAA;">Current value: <strong>' . ($plugin_options['mediacustom'] == '1' ? 'Yes' : 'No') . '</strong></p>';
    $echo_str .= "\n\t\t\t\t\t\t" . '</td>';
    $echo_str .= "\n\t\t\t\t\t" . '</tr>';
    $echo_str .= "\n\t\t\t\t" . '</tbody>';
    $echo_str .= "\n\t\t\t" . '</table>';
    $echo_str .= "\n\t\t\t" . '<p class="submit">';
    $echo_str .= "\n\t\t\t\t" . '<input type="submit" class="button-primary" name="submitform" value="Update" />';
    $echo_str .= "\n\t\t\t" . '</p>';
    $echo_str .= "\n\t\t" . '</form>';
    $echo_str .= "\n\t" . '</div>';
    $echo_str .= "\n" . '</div>';
    echo $echo_str;
}
开发者ID:brettratner,项目名称:TCNJ-IMM-Showcase-2016,代码行数:91,代码来源:wfu_admin_settings.php


示例11: wpt_update_settings


//.........这里部分代码省略.........
        ?>
<div id="message" class="updated fade"><?php 
        echo $message;
        ?>
</div>
<?php 
    }
    if (get_option('wp_twitter_failure') != '0' || get_option('wp_url_failure') == '1') {
        ?>
		<div class="error">
		<?php 
        if (get_option('wp_twitter_failure') == '1') {
            _e("<p>One or more of your last posts has failed to send a status update to Twitter. The Tweet has been saved, and you can re-Tweet it at your leisure.</p>", 'wp-to-twitter');
        }
        if (get_option('jd_status_message') != '') {
            echo "<p><strong>" . get_option('jd_status_message') . "</strong></p>";
        }
        if (get_option('wp_twitter_failure') == '2') {
            echo "<p>" . __("Sorry! I couldn't get in touch with the Twitter servers to post your <strong>new link</strong>! You'll have to post it manually, I'm afraid. ", 'wp-to-twitter') . "</p>";
        }
        if (get_option('wp_url_failure') == '1') {
            _e("<p>The query to the URL shortener API failed, and your URL was not shrunk. The full post URL was attached to your Tweet. Check with your URL shortening provider to see if there are any known issues.</p>", 'wp-to-twitter');
        }
        ?>
		<?php 
        $admin_url = is_plugin_active('wp-tweets-pro/wpt-pro-functions.php') ? admin_url('admin.php?page=wp-tweets-pro') : admin_url('options-general.php?page=wp-to-twitter/wp-to-twitter.php');
        ?>
		<form method="post" action="<?php 
        echo $admin_url;
        ?>
">
		<div><input type="hidden" name="submit-type" value="clear-error" /></div>
		<?php 
        $nonce = wp_nonce_field('wp-to-twitter-nonce', '_wpnonce', true, false) . wp_referer_field(false);
        echo "<div>{$nonce}</div>";
        ?>
	
		<p><input type="submit" name="submit" value="<?php 
        _e("Clear 'WP to Twitter' Error Messages", 'wp-to-twitter');
        ?>
" class="button-primary" /></p>
		</form>		
		</div>
<?php 
    }
    ?>
	
<?php 
    if (isset($_GET['export']) && $_GET['export'] == "settings") {
        print_settings();
    }
    ?>
<h2><?php 
    _e("WP to Twitter Options", 'wp-to-twitter');
    ?>
</h2>
<div id="wpt_settings_page" class="postbox-container" style="width: 70%">

<?php 
    $wp_to_twitter_directory = get_bloginfo('wpurl') . '/' . PLUGINDIR . '/' . dirname(plugin_basename(__FILE__));
    ?>
		
<div class="metabox-holder">

<?php 
    if (function_exists('wtt_connect_oauth')) {
开发者ID:rab,项目名称:wordpress-heroku,代码行数:67,代码来源:wp-to-twitter-manager.php


示例12: switch

switch ($sign) {
    case "1":
        $currentloginurl = basename($_SERVER['REQUEST_URI']);
        $loginmessage = 'Sign in to submit an entry. <br />If you haven\'t signed in before, <a href=\'' . $currentloginurl . '&mode=signup\'>Sign Up.</a>';
        break;
    case "2":
        $loginmessage = "Sign in to submit or manage an entry";
        break;
    case "3":
        $loginmessage = "Sign in to manage your entries";
        break;
    default:
        $loginmessage = 'Sign In';
        break;
}
if (strpos(wp_referer_field(), 'edit-entry') > 0) {
    $loginmessage = 'Sign in to submit or manage<br /> your entries.';
}
if ($mode == "reset") {
    $loginmessage = "Change your password";
}
//Wordpress header and Theme header call
get_header();
?>
<style>

</style>

<div class="clear"></div>

<div class="container">
开发者ID:hansstam,项目名称:makerfaire,代码行数:31,代码来源:login.php


示例13: wtt_connect_oauth

function wtt_connect_oauth($auth = false)
{
    if (!$auth) {
        echo '<div class="ui-sortable meta-box-sortables">';
        echo '<div class="postbox">';
    }
    $class = $auth ? 'wpt-profile' : 'wpt-settings';
    $form = !$auth ? '<form action="" method="post">' : '';
    $nonce = !$auth ? wp_nonce_field('wp-to-twitter-nonce', '_wpnonce', true, false) . wp_referer_field(false) . '</form>' : '';
    if (!wtt_oauth_test($auth, 'verify')) {
        // show notification to authenticate with OAuth. No longer global; settings only.
        if (!wpt_check_oauth()) {
            $admin_url = is_plugin_active('wp-tweets-pro/wpt-pro-functions.php') ? admin_url('admin.php?page=wp-tweets-pro') : admin_url('options-general.php?page=wp-to-twitter/wp-to-twitter.php');
            $message = sprintf(__("Twitter requires authentication by OAuth. You will need to <a href='%s'>update your settings</a> to complete installation of WP to Twitter.", 'wp-to-twitter'), $admin_url);
            echo "<div class='error'><p>{$message}</p></div>";
        }
        $ack = !$auth ? get_option('app_consumer_key') : get_user_meta($auth, 'app_consumer_key', true);
        $acs = !$auth ? get_option('app_consumer_secret') : get_user_meta($auth, 'app_consumer_secret', true);
        $ot = !$auth ? get_option('oauth_token') : get_user_meta($auth, 'oauth_token', true);
        $ots = !$auth ? get_option('oauth_token_secret') : get_user_meta($auth, 'oauth_token_secret', true);
        $submit = !$auth ? '<p class="submit"><input type="submit" name="submit" class="button-primary" value="' . __('Connect to Twitter', 'wp-to-twitter') . '" /></p>' : '';
        print '
			<h3><span>' . __('Connect to Twitter', 'wp-to-twitter') . '</span></h3>
			<div class="inside ' . $class . '">
			<div class="notes">
			<h4>' . __('WP to Twitter Set-up', 'wp-to-twitter') . '</h4>
			</div>
					<h4>' . __('1. Register this site as an application on ', 'wp-to-twitter') . '<a href="https://apps.twitter.com/app/new/" target="_blank">' . __('Twitter\'s application registration page', 'wp-to-twitter') . '</a></h4>
						<ul>
						<li>' . __('If you\'re not currently logged in to Twitter, log-in to the account you want associated with this site', 'wp-to-twitter') . '</li>
						<li>' . __('Your application name cannot include the word "Twitter."', 'wp-to-twitter') . '</li>
						<li>' . __('Your Application Description can be anything.', 'wp-to-twitter') . '</li>
						<li>' . __('The WebSite and Callback URL should be ', 'wp-to-twitter') . '<strong>' . esc_url(home_url()) . '</strong></li>
						</ul>
					<p><em>' . __('Agree to the Twitter Developer Agreement and continue.', 'wp-to-twitter') . '</em></p>
					<h4>' . __('2. Switch to the "Permissions" tab in Twitter apps', 'wp-to-twitter') . '</h4>
						<ul>
						<li>' . __('Select "Read and Write" for the Application Type', 'wp-to-twitter') . '</li>
						<li>' . __('Update the application settings', 'wp-to-twitter') . '</li>
						</ul>
					<h4>' . __('3. Switch to the Keys and Access Tokens tab and regenerate your consumer key and secret, then create your access token.', 'wp-to-twitter') . '</h4>
						<ul>
						<li>' . __('Copy your API key and API secret from the "Application Settings" section.', 'wp-to-twitter') . '</li>
						<li>' . __('Copy your Access token and Access token secret from the "Your Access Token" se 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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