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

PHP esc_textarea函数代码示例

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

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



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

示例1: wikiembed_network_site_admin_options

/**
 * wikiembed_network_site_admin_options function.
 * 
 * @access public
 * @return void
 */
function wikiembed_network_site_admin_options()
{
    ?>
		<h3><?php 
    _e('Wiki Embed Settings');
    ?>
</h3> 
		<table class="form-table">
			<tr valign="top"> 
				<th scope="row"><label for="wiki_embed_white_list"><?php 
    _e('White List of Allowed Sites');
    ?>
</label></th> 
				<td>
	                <textarea type="text" name="wiki_embed_white_list" id="wiki_embed_white_list" class="regular-text" style="width:100%; height:200px;" ><?php 
    echo esc_textarea(get_site_option('wiki_embed_white_list'));
    ?>
 </textarea>
					<br />
					<span>separate urls with new lines </span>
				</td>
			</tr>
		</table>
<?php 
}
开发者ID:nemobis,项目名称:wiki-embed,代码行数:31,代码来源:admin.php


示例2: Grafik_MetaStyles_Callback

function Grafik_MetaStyles_Callback($entry)
{
    // Get Stored Meta Values...
    $PREFILL = array('grafik-meta-styles-noglobal' => (int) get_post_meta($entry->ID, 'grafik-meta-styles-noglobal', true), 'grafik-meta-styles-notype' => (int) get_post_meta($entry->ID, 'grafik-meta-styles-notype', true), 'grafik-meta-styles' => stripslashes(esc_textarea(base64_decode(get_post_meta($entry->ID, 'grafik-meta-styles', true)))));
    // Output Meta Controls...
    echo '<div class="grafik-metabox">' . wp_nonce_field('grafik-nonce-metastyles', 'grafik-nonce-metastyles', true, false) . '<table>' . '<tr>' . '<td>' . '<strong>Style Configuration:</strong>' . '<p>By default, each post/page inherits the global and corresponding type styles. If you would like this post/page to not inherit these assets, you can disable them here.</p>' . '<p>' . '<input type="checkbox" name="grafik-meta-styles-noglobal" id="grafik-meta-styles-noglobal" ' . ($PREFILL['grafik-meta-styles-noglobal'] == 1 ? 'checked="checked"' : null) . '/>' . '<label for="grafik-meta-styles-noglobal">Do Not Use Global Styles</label>' . '</p>' . '<p>' . '<input type="checkbox" name="grafik-meta-styles-notype" id="grafik-meta-styles-notype" ' . ($PREFILL['grafik-meta-styles-notype'] == 1 ? 'checked="checked"' : null) . '/>' . '<label for="grafik-meta-styles-notype">Do Not Use Type Styles</label>' . '</p>' . '<p><textarea name="grafik-meta-styles">' . $PREFILL['grafik-meta-styles'] . '</textarea></p>' . '</td>' . '</tr>' . '</table>' . '</div>';
}
开发者ID:GrafikMatthew,项目名称:Grafik-Engine-Alpha,代码行数:7,代码来源:styles.php


示例3: display_field_options

    /**
     * 設定画面にフィールドを表示(オリジナル項目)
     *
     * @param int $group_key
     * @param int $field_key
     */
    public function display_field_options($group_key, $field_key)
    {
        ?>
		<tr>
			<th><?php 
        esc_html_e('Choices', 'smart-custom-fields');
        ?>
</th>
			<td>
				<textarea
					name="<?php 
        echo esc_attr($this->get_field_name_in_setting($group_key, $field_key, 'choices'));
        ?>
"
					class="widefat"
					rows="5" /><?php 
        echo esc_textarea("\n" . $this->get('choices'));
        ?>
</textarea>
			</td>
		</tr>
		<tr>
			<th><?php 
        esc_html_e('Default', 'smart-custom-fields');
        ?>
</th>
			<td>
				<input type="text"
					name="<?php 
        echo esc_attr($this->get_field_name_in_setting($group_key, $field_key, 'default'));
        ?>
"
					class="widefat"
					value="<?php 
        echo esc_attr($this->get('default'));
        ?>
" />
			</td>
		</tr>
		<tr>
			<th><?php 
        esc_html_e('Notes', 'smart-custom-fields');
        ?>
</th>
			<td>
				<input type="text"
					name="<?php 
        echo esc_attr($this->get_field_name_in_setting($group_key, $field_key, 'notes'));
        ?>
"
					class="widefat"
					value="<?php 
        echo esc_attr($this->get('notes'));
        ?>
"
				/>
			</td>
		</tr>
		<?php 
    }
开发者ID:hideokamoto,项目名称:smart-custom-fields,代码行数:66,代码来源:class.field-select.php


示例4: form

 function form($instance)
 {
     $instance = wp_parse_args((array) $instance, array('code' => ''));
     $code = $instance['code'];
     echo '<p><label for="' . esc_attr($this->get_field_id('code')) . '">' . __('Zone Code:', 'ci_theme') . '</label><textarea rows="10" id="' . esc_attr($this->get_field_id('code')) . '" name="' . esc_attr($this->get_field_name('code')) . '" class="widefat" >' . esc_textarea($code) . '</textarea></p>';
     echo '<p>' . sprintf(__('Paste your <strong>Zone Code</strong> here, as described in this <a href="%s">BuySellAds tutorial</a>.', 'ci_theme'), esc_url('http://support.buysellads.com/knowledge_base/topics/how-to-install-your-ad-code')) . '</p>';
 }
开发者ID:nickolasnikolic,项目名称:wordpress-heroku-php,代码行数:7,代码来源:ci_widget_bsa.php


示例5: render_field

 function render_field($field)
 {
     // vars
     $atts = array();
     $o = array('id', 'class', 'name', 'placeholder', 'rows');
     $s = array('readonly', 'disabled');
     $e = '';
     // maxlength
     if ($field['maxlength']) {
         $o[] = 'maxlength';
     }
     // rows
     if (empty($field['rows'])) {
         $field['rows'] = 8;
     }
     // append atts
     foreach ($o as $k) {
         $atts[$k] = $field[$k];
     }
     // append special atts
     foreach ($s as $k) {
         if (!empty($field[$k])) {
             $atts[$k] = $k;
         }
     }
     $e .= '<textarea ' . acf_esc_attr($atts) . ' >';
     $e .= esc_textarea($field['value']);
     $e .= '</textarea>';
     // return
     echo $e;
 }
开发者ID:Garth619,项目名称:Femi9,代码行数:31,代码来源:textarea.php


示例6: render_content

    public function render_content()
    {
        ?>
		<label>
			<span class="customize-control-title"><?php 
        echo esc_html($this->label);
        ?>
</span>

			<?php 
        if (!empty($this->description)) {
            ?>
				<span class="description customize-control-description"><?php 
            echo $this->description;
            ?>
</span>
			<?php 
        }
        ?>

			<textarea class="large-text" cols="20" rows="5" <?php 
        $this->link();
        ?>
>
				<?php 
        echo esc_textarea($this->value());
        ?>
			</textarea>
		</label>
		<?php 
    }
开发者ID:sayedwp,项目名称:marvy,代码行数:31,代码来源:class-wp-customize-control.php


示例7: sendMail

/**
 * Validate data and send mail.
 *
 * @see http://codex.wordpress.org/Function_Reference/wp_mail
 * @return {int} Status of message:
 * -2 => Invalid data
 * -1 => Failed to send
 *  1 => OK
 */
function sendMail()
{
    header("Content-Type: application/json");
    $response = array('status' => -2, 'errors' => array());
    if (!isset($_POST['name']) || !isset($_POST['email']) || !isset($_POST['message'])) {
        echo json_encode($response);
        die;
    }
    $name = esc_attr($_POST['name']);
    $email = sanitize_email($_POST['email']);
    $message = esc_textarea($_POST['message']);
    if (!strlen($name)) {
        $response['errors']['name'] = "C'mon, what's your name?";
    }
    if (!is_email($email)) {
        $response['errors']['email'] = "Please, give us valid email.";
    }
    if (!strlen($message)) {
        $response['errors']['message'] = "No message, huh?";
    }
    if (empty($response['errors'])) {
        $to = get_bloginfo('admin_email');
        $subject = 'Contact from ' . get_bloginfo('name');
        $headers[] = "From: {$name} <{$email}>";
        $isSent = wp_mail($to, $subject, $message, $headers);
        $response['status'] = $isSent ? 1 : -1;
    }
    echo json_encode($response);
    die;
}
开发者ID:sachsy,项目名称:snippets-1,代码行数:39,代码来源:wp.sendMail.php


示例8: ts_essentials_escape

function ts_essentials_escape($str = '', $type = '', $context = '')
{
    if (trim($str)) {
        if ($type == 'strip') {
            if ($context == 'widget_before_after') {
                return strip_tags($str, '<div><ul><li>');
            } elseif ($context == 'widget_title_before_after') {
                return strip_tags($str, '<div><ul><li><h3><h4><h5><h6><strong><em><i><b><span>');
            } elseif (substr($context, 0, 1) == '<') {
                return strip_tags($str, $context);
            } else {
                return strip_tags($str);
            }
        } elseif ($type == 'bal' || $type == 'balance') {
            return balanceTags($str);
        } elseif ($type == 'attr') {
            return esc_attr($str);
        } elseif ($type == 'html') {
            return esc_html($str);
        } elseif ($type == 'url') {
            return esc_url($str);
        } elseif ($type == 'js') {
            return esc_js($str);
        } elseif ($type == 'textarea') {
            return esc_textarea($str);
        } elseif ($type == 'sql') {
            return esc_sql($str);
        } elseif ($type == 'post') {
            return wp_kses_post($str);
        }
    }
    return $str;
}
开发者ID:estvmachine,项目名称:nicowp,代码行数:33,代码来源:functions.php


示例9: Grafik_MetaFooter_Callback

function Grafik_MetaFooter_Callback($entry)
{
    // Get Stored Meta Values...
    $PREFILL = array('grafik-meta-footer-noglobal' => (int) get_post_meta($entry->ID, 'grafik-meta-footer-noglobal', true), 'grafik-meta-footer-notype' => (int) get_post_meta($entry->ID, 'grafik-meta-footer-notype', true), 'grafik-meta-footer-tl' => stripslashes(esc_textarea(base64_decode(get_post_meta($entry->ID, 'grafik-meta-footer-tl', true)))), 'grafik-meta-footer-tr' => stripslashes(esc_textarea(base64_decode(get_post_meta($entry->ID, 'grafik-meta-footer-tr', true)))), 'grafik-meta-footer-ml' => stripslashes(esc_textarea(base64_decode(get_post_meta($entry->ID, 'grafik-meta-footer-ml', true)))), 'grafik-meta-footer-mr' => stripslashes(esc_textarea(base64_decode(get_post_meta($entry->ID, 'grafik-meta-footer-mr', true)))), 'grafik-meta-footer-bl' => stripslashes(esc_textarea(base64_decode(get_post_meta($entry->ID, 'grafik-meta-footer-bl', true)))), 'grafik-meta-footer-br' => stripslashes(esc_textarea(base64_decode(get_post_meta($entry->ID, 'grafik-meta-footer-br', true)))));
    // Output Meta Controls...
    echo '<div class="grafik-metabox">' . wp_nonce_field('grafik-nonce-metafooter', 'grafik-nonce-metafooter', true, false) . '<table>' . '<tr>' . '<td colspan="2">' . '<p>By default, each post/page inherits the global and corresponding type footer. If you would like this post/page to not inherit these assets, you can disable them here.</p>' . '<p>' . '<input type="checkbox" name="grafik-meta-footer-noglobal" id="grafik-meta-footer-noglobal" ' . ($PREFILL['grafik-meta-footer-noglobal'] == 1 ? 'checked="checked"' : null) . '/>' . '<label for="grafik-meta-footer-noglobal">Do Not Use Global Footer</label>' . '</p>' . '<p>' . '<input type="checkbox" name="grafik-meta-footer-notype" id="grafik-meta-footer-notype" ' . ($PREFILL['grafik-meta-footer-notype'] == 1 ? 'checked="checked"' : null) . '/>' . '<label for="grafik-meta-footer-notype">Do Not Use Type Footer</label>' . '</p>' . '</td>' . '</tr>' . '<tr>' . '<td>' . '<strong>Footer Top Left:</strong>' . '<p><textarea name="grafik-meta-footer-tl">' . $PREFILL['grafik-meta-footer-tl'] . '</textarea></p>' . '</td>' . '<td>' . '<strong>Footer Top Right:</strong>' . '<p><textarea name="grafik-meta-footer-tr">' . $PREFILL['grafik-meta-footer-tr'] . '</textarea></p>' . '</td>' . '</tr>' . '<tr>' . '<td>' . '<strong>Footer Top Left:</strong>' . '<p><textarea name="grafik-meta-footer-ml">' . $PREFILL['grafik-meta-footer-ml'] . '</textarea></p>' . '</td>' . '<td>' . '<strong>Footer Top Right:</strong>' . '<p><textarea name="grafik-meta-footer-mr">' . $PREFILL['grafik-meta-footer-mr'] . '</textarea></p>' . '</td>' . '</tr>' . '<tr>' . '<td>' . '<strong>Footer Top Left:</strong>' . '<p><textarea name="grafik-meta-footer-bl">' . $PREFILL['grafik-meta-footer-bl'] . '</textarea></p>' . '</td>' . '<td>' . '<strong>Footer Top Right:</strong>' . '<p><textarea name="grafik-meta-footer-br">' . $PREFILL['grafik-meta-footer-br'] . '</textarea></p>' . '</td>' . '</tr>' . '</table>' . '</div>';
}
开发者ID:GrafikMatthew,项目名称:Grafik-Engine-Alpha,代码行数:7,代码来源:footers.php


示例10: render_content

        public function render_content()
        {
            switch ($this->type) {
                case 'textarea':
                    echo '<div class="' . $this->type . '-pro-feature">';
                    echo '<span class="pro-badge">PRO</span>';
                    ?>
		           <label>
		                <span class="customize-control-title"><?php 
                    echo esc_html($this->label);
                    ?>
</span>
		                  <textarea class="large-text" cols="20" rows="5" <?php 
                    $this->link();
                    ?>
 disabled >
		                    <?php 
                    echo esc_textarea($this->value());
                    ?>
		                  </textarea>
		            </label>
		         <?php 
                    echo '</div><!--/pro-feature-->';
                    break;
                case 'input':
                    ?>



		        <?php 
                    break;
            }
            // end SWITCH statement
        }
开发者ID:web-way,项目名称:web-way,代码行数:34,代码来源:custom-controls.php


示例11: deliver_mail

function deliver_mail()
{
    // if the submit button is clicked, send the email
    if (isset($_POST['cf-submitted']) && $_POST["cf-url"] == '') {
        // sanitize form values
        $name = sanitize_text_field($_POST["cf-name"]);
        $email = sanitize_email($_POST["cf-email"]);
        $subject = 'Website Contact and Prayer Request Form Submission';
        $message = esc_textarea($_POST["cf-message"]);
        // get the blog administrator's email address
        $to = get_field('main_campus_email', 'options');
        //$to = '[email protected]';
        $headers = "From: {$name} <{$email}>" . "\r\n";
        // If email has been process for sending, display a success message
        if (wp_mail($to, $subject, $message, $headers)) {
            echo '<div>';
            echo '<p class="success">Thanks for getting in touch with us. Your request has been submitted.</p>';
            echo '</div>';
        } else {
            echo '<div>';
            echo '<p class="error">We\'re terribly sorry, but it looks like an error occurred. Please make sure all fields are filled out and try submitting your request again.</p>';
            echo '</div>';
        }
    }
}
开发者ID:KrissieV,项目名称:LBC-multisite,代码行数:25,代码来源:contact.php


示例12: Grafik_MetaPreviews_Callback

function Grafik_MetaPreviews_Callback($entry)
{
    // Get Stored Meta Values...
    $PREFILL = array('grafik-meta-preview-desktop' => stripslashes(esc_textarea(base64_decode(get_post_meta($entry->ID, 'grafik-meta-preview-desktop', true)))), 'grafik-meta-preview-tablet' => stripslashes(esc_textarea(base64_decode(get_post_meta($entry->ID, 'grafik-meta-preview-tablet', true)))), 'grafik-meta-preview-phone' => stripslashes(esc_textarea(base64_decode(get_post_meta($entry->ID, 'grafik-meta-preview-phone', true)))));
    // Output Meta Controls...
    echo wp_nonce_field('grafik-nonce-metapreviews', 'grafik-nonce-metapreviews', true, false) . '<table>' . '<tr>' . '<th><label for="grafik-meta-preview-desktop">Desktop:</label></th>' . '<td><input type="text" name="grafik-meta-preview-desktop" value="' . $PREFILL['grafik-meta-preview-desktop'] . '" id="grafik-meta-preview-desktop" /></td>' . '</tr>' . '<tr>' . '<th><label for="grafik-meta-preview-tablet">Tablet:</label></th>' . '<td><input type="text" name="grafik-meta-preview-tablet" value="' . $PREFILL['grafik-meta-preview-tablet'] . '" id="grafik-meta-preview-tablet" /></td>' . '</tr>' . '<tr>' . '<th><label for="grafik-meta-preview-phone">Phone:</label></th>' . '<td><input type="text" name="grafik-meta-preview-phone" value="' . $PREFILL['grafik-meta-preview-phone'] . '" id="grafik-meta-preview-phone" /></td>' . '</tr>' . '</table>';
}
开发者ID:GrafikMatthew,项目名称:Grafik-Engine-Alpha,代码行数:7,代码来源:previews.php


示例13: Patterns_Main_Meta_Box_Save

 /**
  * Save the meta when the post is saved.
  *
  * @param int $post_id The ID of the post being saved.
  */
 public function Patterns_Main_Meta_Box_Save($post_id)
 {
     /*
      * We need to verify this came from the our screen and with proper authorization,
      * because save_post can be triggered at other times.
      */
     // Check if our nonce is set.
     if (!isset($_POST['patterns_main_inner_custom_box_nonce'])) {
         return $post_id;
     }
     $nonce = $_POST['patterns_main_inner_custom_box_nonce'];
     // Verify that the nonce is valid.
     if (!wp_verify_nonce($nonce, 'patterns_main_inner_custom_box')) {
         return $post_id;
     }
     // If this is an autosave, our form has not been submitted,
     //     so we don't want to do anything.
     if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
         return $post_id;
     }
     // Check the user's permissions.
     if (!current_user_can('edit_post', $post_id)) {
         return $post_id;
     }
     /* OK, its safe for us to save the data now. */
     // Sanitize the user input.
     $code_data = esc_html($_POST['patterns_code_content']);
     $desc_data = esc_textarea($_POST['patterns_code_desc']);
     // Update the meta field.
     update_post_meta($post_id, '_Patterns__Main_code_value', $code_data);
     update_post_meta($post_id, '_Patterns__Main_desc_value', $desc_data);
 }
开发者ID:emaildano,项目名称:patterns,代码行数:37,代码来源:class-patterns-meta-boxes.php


示例14: render_content

    public function render_content()
    {
        ?>
		<label>
			<span class="customize-control-title">
				<?php 
        echo esc_html($this->label);
        ?>
				<?php 
        if (!empty($this->description)) {
            ?>
					<span class="description customize-control-description"><?php 
            echo $this->description;
            ?>
</span>
				<?php 
        }
        ?>
			</span>
			<input type="text" data-palette="<?php 
        echo esc_textarea($this->palette);
        ?>
" data-default-color="<?php 
        echo esc_attr($this->default);
        ?>
" value="<?php 
        echo esc_attr($this->value());
        ?>
" class="kirki-color-control" <?php 
        $this->link();
        ?>
  />
		</label>
	<?php 
    }
开发者ID:vulinhpc,项目名称:kirki,代码行数:35,代码来源:class-kirki-controls-color-alpha-control.php


示例15: saga_save_theme_settings

function saga_save_theme_settings()
{
    global $pagenow;
    $settings = get_option("saga_theme_settings");
    if ($pagenow == 'themes.php' && $_GET['page'] == 'theme-settings') {
        if (isset($_GET['tab'])) {
            $tab = $_GET['tab'];
        } else {
            $tab = 'homepage';
        }
        switch ($tab) {
            case 'general':
                $settings['saga_tag_class'] = $_POST['saga_tag_class'];
                $settings['saga_deal_week'] = $_POST['saga_deal_week'];
                $settings['saga_deal_week_name'] = $_POST['saga_deal_week_name'];
                $settings['saga_deal_week_link'] = $_POST['saga_deal_week_link'];
                $settings['saga_post_gallery'] = $_POST['saga_post_gallery'];
                break;
            case 'footer':
                $settings['saga_ga'] = $_POST['saga_ga'];
                break;
        }
    }
    if (!current_user_can('unfiltered_html')) {
        if ($settings['saga_ga']) {
            $settings['saga_ga'] = stripslashes(esc_textarea(wp_filter_post_kses($settings['saga_ga'])));
        }
        if ($settings['saga_intro']) {
            $settings['saga_intro'] = stripslashes(esc_textarea(wp_filter_post_kses($settings['saga_intro'])));
        }
    }
    $updated = update_option("saga_theme_settings", $settings);
}
开发者ID:nueue,项目名称:sagaplex,代码行数:33,代码来源:settings.php


示例16: test_esc_textarea_charset_utf_8

 function test_esc_textarea_charset_utf_8()
 {
     add_filter('pre_option_blog_charset', array($this, '_charset_utf_8'));
     $utf8 = 'Fran' . chr(195) . chr(167) . 'ais';
     $this->assertEquals($utf8, esc_textarea($utf8));
     remove_filter('pre_option_blog_charset', array($this, '_charset_utf_8'));
 }
开发者ID:boonebgorges,项目名称:develop.wordpress,代码行数:7,代码来源:EscTextarea.php


示例17: setup_form

    /**
     * Displays the setup form
     *
     * @access public
     * @since 3.9
     * @uses WPSC_Checkout_Form::get()
     * @uses WPSC_Checkout_Form::field_drop_down_options()
     * @uses WPSC_Checkout_Form::get_field_id_by_unique_name()
     * @uses WPSC_Payment_Gateway_Setting::get()
     *
     * @return void
     */
    public function setup_form()
    {
        ?>
		<tr>
			<td colspan="2">
				<p>
					<label for="wpsc-manual-gateway-setup"><?php 
        _e('Instructions', 'wpsc');
        ?>
</label><br />
					<textarea id="wpsc-manual-gateway-setup" cols='' rows='10' name='<?php 
        echo esc_attr($this->setting->get_field_name('payment_instructions'));
        ?>
'><?php 
        echo esc_textarea(wp_unslash($this->setting->get('payment_instructions')));
        ?>
</textarea><br />
					<small><?php 
        _e('Enter the payment instructions that you wish to display to your customers when they make a purchase.', 'wpsc');
        ?>
</small><br />
					<small><?php 
        _e('For example, this is where you the Shop Owner might enter your bank account details or address so that your customer can make their manual payment.', 'wpsc');
        ?>
</small>
				</p>
			</td>
		</tr>
		<?php 
    }
开发者ID:RJHanson292,项目名称:WP-e-Commerce,代码行数:42,代码来源:manual.php


示例18: form

    public function form($instance)
    {
        $instance = wp_parse_args((array) $instance, array('title' => __('Contacts', 'prodo'), 'text' => '', 'phone' => '', 'location' => '', 'email' => ''));
        $title = strip_tags($instance['title']);
        $text = esc_textarea($instance['text']);
        $phone = strip_tags($instance['phone']);
        $location = strip_tags($instance['location']);
        $email = strip_tags($instance['email']);
        echo '
		<p>
			<label for="' . $this->get_field_id('title') . '">' . __('Title:', 'prodo') . '</label> 
			<input class="widefat" id="' . $this->get_field_id('title') . '" name="' . $this->get_field_name('title') . '" type="text" value="' . esc_attr($title) . '" />
		</p>
		<textarea class="widefat" rows="6" cols="20" id="' . $this->get_field_id('text') . '" name="' . $this->get_field_name('text') . '">' . $text . '</textarea>
		<p>
			<label for="' . $this->get_field_id('phone') . '">' . __('Phone:', 'prodo') . '</label> 
			<input class="widefat" id="' . $this->get_field_id('phone') . '" name="' . $this->get_field_name('phone') . '" type="text" value="' . esc_attr($phone) . '" />
		</p>
		<p>
			<label for="' . $this->get_field_id('location') . '">' . __('Location:', 'prodo') . '</label> 
			<input class="widefat" id="' . $this->get_field_id('location') . '" name="' . $this->get_field_name('location') . '" type="text" value="' . esc_attr($location) . '" />
		</p>
		<p>
			<label for="' . $this->get_field_id('email') . '">' . __('Email:', 'prodo') . '</label> 
			<input class="widefat" id="' . $this->get_field_id('email') . '" name="' . $this->get_field_name('email') . '" type="text" value="' . esc_attr($email) . '" />
		</p>
		<p>
			<input class="checkbox" id="' . $this->get_field_id('location_as_url') . '" name="' . $this->get_field_name('location_as_url') . '" type="checkbox" ' . checked(isset($instance['location_as_url']) ? $instance['location_as_url'] : 0, true, false) . ' />
			<label for="' . $this->get_field_id('location_as_url') . '">' . __('Display Location as link', 'prodo') . '</label><br>

			<input class="checkbox" id="' . $this->get_field_id('email_as_url') . '" name="' . $this->get_field_name('email_as_url') . '" type="checkbox" ' . checked(isset($instance['email_as_url']) ? $instance['email_as_url'] : 0, true, false) . '>
			<label for="' . $this->get_field_id('email_as_url') . '">' . __('Display Email as link', 'prodo') . '</label>
		</p>';
    }
开发者ID:jamestrevorlees,项目名称:odd-web-v1.00,代码行数:34,代码来源:contact.php


示例19: textarea

 /**
  * Settings Page
  * Outputs a textarea for setting 'scripts_in_head'.
  */
 static function textarea($args)
 {
     extract($args);
     $options = get_option($setting);
     $value = isset($options[$label_for]) ? $options[$label_for] : '';
     $output = '';
     if (isset($wrap_class)) {
         $output .= '<div class="' . $wrap_class . '">';
     }
     $output .= '<textarea';
     $output .= $style ? ' style="' . $style . '"' : '';
     $output .= $class ? ' class="' . $class . '"' : '';
     $output .= $rows ? ' rows="' . $rows . '"' : '';
     $output .= $cols ? ' cols="' . $cols . '"' : '';
     $output .= ' name="' . $setting . '[' . $label_for . ']"';
     $output .= ' id="' . $label_for . '">';
     $output .= esc_textarea($value) . '</textarea>';
     if (isset($wrap_class)) {
         $output .= '</div>';
     }
     if ($description) {
         $output .= $description;
     }
     echo $output;
 }
开发者ID:jimdough,项目名称:Roadmaster,代码行数:29,代码来源:class-sns-form.php


示例20: gs_inpost_scripts_box

/**
 * Callback for in-post scripts meta box.
 *
 * Echoes out HTML.
 *
 * @category Genesis
 * @package Admin
 * @subpackage Inpost-Metaboxes
 *
 */
function gs_inpost_scripts_box()
{
    wp_nonce_field('gs_inpost_scripts_save', 'gs_inpost_scripts_nonce');
    ?>
	
	<p><label for="genesis_redirect"><b><?php 
    _e('Custom Redirect URI', 'genesis');
    ?>
</b> <a href="http://www.google.com/support/webmasters/bin/answer.py?hl=en&amp;answer=93633" target="_blank" title="301 Redirect">[?]</a></label></p>
	<p><input class="large-text" type="text" name="genesis_scripts[redirect]" id="genesis_redirect" value="<?php 
    echo esc_url(genesis_get_custom_field('redirect'));
    ?>
" /></p>
	
	<p><label for="genesis_header_scripts"><b><?php 
    _e('Scripts', 'genesis');
    ?>
</b></label></p>
	<p><textarea class="large-text" rows="4" cols="6" name="genesis_scripts[_genesis_scripts]" id="genesis_header_scripts"><?php 
    echo esc_textarea(genesis_get_custom_field('_genesis_scripts'));
    ?>
</textarea></p>
	
	<p><label for="genesis_footer_scripts"><b><?php 
    _e('Footer Scripts', 'genesis');
    ?>
</b></label></p>
	<p><textarea class="large-text" rows="4" cols="6" name="genesis_scripts[_genesis_footer_scripts]" id="genesis_footer_scripts"><?php 
    echo esc_textarea(genesis_get_custom_field('_genesis_footer_scripts'));
    ?>
</textarea></p>
	<?php 
}
开发者ID:freezvd,项目名称:Genesis-Sandbox,代码行数:43,代码来源:gs-inpost-functions.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP esc_url函数代码示例发布时间:2022-05-15
下一篇:
PHP esc_sql函数代码示例发布时间: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