本文整理汇总了PHP中wp_htmledit_pre函数 的典型用法代码示例。如果您正苦于以下问题:PHP wp_htmledit_pre函数的具体用法?PHP wp_htmledit_pre怎么用?PHP wp_htmledit_pre使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wp_htmledit_pre函数 的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: copy_from_original_fields
/**
* Gets the content of a post, its excerpt as well as its title and returns it as an array
*
* @param string $content_type
* @param string $excerpt_type
* @param int $trid
* @param string $lang
*
* @return array containing all the fields information
*/
public static function copy_from_original_fields($content_type, $excerpt_type, $trid, $lang)
{
global $wpdb;
$post_id = $wpdb->get_var($wpdb->prepare("SELECT element_id FROM {$wpdb->prefix}icl_translations WHERE trid=%d AND language_code=%s", $trid, $lang));
$post = get_post($post_id);
$fields_to_copy = array('content' => 'post_content', 'title' => 'post_title', 'excerpt' => 'post_excerpt');
$fields_contents = array();
if (!empty($post)) {
foreach ($fields_to_copy as $editor_key => $editor_field) {
//loops over the three fields to be inserted into the array
if ($editor_key === 'content' || $editor_key === 'excerpt') {
//
if ($editor_key === 'content') {
$editor_var = $content_type;
//these variables are supplied by a javascript call in scripts.js icl_copy_from_original(lang, trid)
} elseif ($editor_key === 'excerpt') {
$editor_var = $excerpt_type;
}
if ($editor_var === 'rich') {
$html_pre = wp_richedit_pre($post->{$editor_field});
} else {
$html_pre = wp_htmledit_pre($post->{$editor_field});
}
$fields_contents[$editor_key] = htmlspecialchars_decode($html_pre);
} elseif ($editor_key === 'title') {
$fields_contents[$editor_key] = strip_tags($post->{$editor_field});
}
}
$fields_contents['customfields'] = apply_filters('wpml_copy_from_original_custom_fields', self::copy_from_original_custom_fields($post));
} else {
$fields_contents['error'] = __('Post not found', 'sitepress');
}
do_action('icl_copy_from_original', $post_id);
return $fields_contents;
}
开发者ID:edgarter, 项目名称:wecare, 代码行数:45, 代码来源:wpml-post-edit-ajax.class.php
示例2: test_wp_htmledit_pre_charset_utf_8
function test_wp_htmledit_pre_charset_utf_8()
{
add_filter('pre_option_blog_charset', array($this, '_charset_utf_8'));
$utf8 = 'Fran' . chr(195) . chr(167) . 'ais';
$this->assertEquals($utf8, wp_htmledit_pre($utf8));
remove_filter('pre_option_blog_charset', array($this, '_charset_utf_8'));
}
开发者ID:boonebgorges, 项目名称:develop.wordpress, 代码行数:7, 代码来源:WpHtmlEditPre.php
示例3: vrev_post_meta
function vrev_post_meta()
{
global $post_ID;
if (!current_user_can('edit_post', $post_ID)) {
return;
}
$meta = get_post_meta($post_ID, '_ice_revisions_content');
$meta = (string) array_pop($meta);
$meta = wp_htmledit_pre($meta);
?>
<div class="hidden"><textarea name="ice-revisions-content" id="ice-revisions-content"><?php
echo $meta;
?>
</textarea></div>
<?php
wp_enqueue_script('mce-revisions', plugin_dir_url(__FILE__) . 'js/mce-revisions.js', array('jquery'), '1.0', true);
}
开发者ID:BharatDPatel, 项目名称:ice, 代码行数:17, 代码来源:mce-revisions.php
示例4: network_step2
//.........这里部分代码省略.........
echo $hostname;
?>
' );
define( 'PATH_CURRENT_SITE', '<?php
echo $base;
?>
' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );</textarea>
<?php
$keys_salts = array('AUTH_KEY' => '', 'SECURE_AUTH_KEY' => '', 'LOGGED_IN_KEY' => '', 'NONCE_KEY' => '', 'AUTH_SALT' => '', 'SECURE_AUTH_SALT' => '', 'LOGGED_IN_SALT' => '', 'NONCE_SALT' => '');
foreach ($keys_salts as $c => $v) {
if (defined($c)) {
unset($keys_salts[$c]);
}
}
if (!empty($keys_salts)) {
$from_api = wp_remote_get('https://api.wordpress.org/secret-key/1.1/salt/');
if (is_wp_error($from_api)) {
foreach ($keys_salts as $c => $v) {
$keys_salts[$c] = wp_generate_password(64, true, true);
}
} else {
$from_api = explode("\n", wp_remote_retrieve_body($from_api));
foreach ($keys_salts as $c => $v) {
$keys_salts[$c] = substr(array_shift($from_api), 28, 64);
}
}
$num_keys_salts = count($keys_salts);
?>
<p><?php
echo _n('This unique authentication key is also missing from your <code>wp-config.php</code> file.', 'These unique authentication keys are also missing from your <code>wp-config.php</code> file.', $num_keys_salts);
?>
<?php
_e('To make your installation more secure, you should also add:');
?>
</p>
<textarea class="code" readonly="readonly" cols="100" rows="<?php
echo $num_keys_salts;
?>
"><?php
foreach ($keys_salts as $c => $v) {
echo "\ndefine( '{$c}', '{$v}' );";
}
?>
</textarea>
<?php
}
?>
</li>
<?php
// Construct an htaccess file.
$htaccess_file = 'RewriteEngine On
RewriteBase ' . $base . '
RewriteRule ^index\\.php$ - [L]
# uploaded files
RewriteRule ^' . ($vhost ? '' : '([_0-9a-zA-Z-]+/)?') . 'files/(.+) wp-includes/ms-files.php?file=$' . ($vhost ? 1 : 2) . ' [L]' . "\n";
if (!$vhost) {
$htaccess_file .= "\n# add a trailing slash to /wp-admin\n" . 'RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]' . "\n";
}
$htaccess_file .= "\n" . 'RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]';
// @todo custom content dir.
if (!$vhost) {
$htaccess_file .= "\n" . 'RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\\.php)$ $2 [L]';
}
$htaccess_file .= "\nRewriteRule . index.php [L]";
?>
<li><p><?php
printf(__('Add the following to your <code>.htaccess</code> file in <code>%s</code>, replacing other WordPress rules:'), ABSPATH);
?>
</p>
<textarea class="code" readonly="readonly" cols="100" rows="<?php
echo $vhost ? 11 : 16;
?>
">
<?php
echo wp_htmledit_pre($htaccess_file);
?>
</textarea></li>
</ol>
<?php
if (!is_multisite()) {
?>
<p><?php
printf(__('Once you complete these steps, your network is enabled and configured.'));
?>
<a href="<?php
echo esc_url(admin_url());
?>
"><?php
_e('Return to Dashboard');
?>
</a></p>
<?php
}
}
开发者ID:beaucollins, 项目名称:wp, 代码行数:101, 代码来源:network.php
示例5: display_setting
public function display_setting($args = array())
{
extract($args);
$options = get_option('ds106banker_options');
if (!isset($options[$id]) && $type != 'checkbox') {
$options[$id] = $std;
} elseif (!isset($options[$id])) {
$options[$id] = 0;
}
$options['new_types'] = 'New Type Name';
// always reset
$field_class = '';
if ($class != '') {
$field_class = ' ' . $class;
}
switch ($type) {
case 'heading':
echo '</td></tr><tr valign="top"><td colspan="2"><h4 style="margin-bottom:0;">' . $desc . '</h4><p style="margin-top:0">' . $std . '</p>';
break;
case 'checkbox':
echo '<input class="checkbox' . $field_class . '" type="checkbox" id="' . $id . '" name="ds106banker_options[' . $id . ']" value="1" ' . checked($options[$id], 1, false) . ' /> <label for="' . $id . '">' . $desc . '</label>';
break;
case 'select':
echo '<select class="select' . $field_class . '" name="ds106banker_options[' . $id . ']">';
foreach ($choices as $value => $label) {
echo '<option value="' . esc_attr($value) . '"' . selected($options[$id], $value, false) . '>' . $label . '</option>';
}
echo '</select>';
if ($desc != '') {
echo '<br /><span class="description">' . $desc . '</span>';
}
break;
case 'radio':
$i = 0;
foreach ($choices as $value => $label) {
echo '<input class="radio' . $field_class . '" type="radio" name="ds106banker_options[' . $id . ']" id="' . $id . $i . '" value="' . esc_attr($value) . '" ' . checked($options[$id], $value, false) . '> <label for="' . $id . $i . '">' . $label . '</label>';
if ($i < count($options) - 1) {
echo '<br />';
}
$i++;
}
if ($desc != '') {
echo '<br /><span class="description">' . $desc . '</span>';
}
break;
case 'textarea':
echo '<textarea class="' . $field_class . '" id="' . $id . '" name="ds106banker_options[' . $id . ']" placeholder="' . $std . '" rows="5" cols="30">' . wp_htmledit_pre($options[$id]) . '</textarea>';
if ($desc != '') {
echo '<br /><span class="description">' . $desc . '</span>';
}
break;
case 'medialoader':
echo '<div id="uploader_' . $id . '">';
if (strpos($options[$id], 'http') !== false) {
echo '<img id="previewimage_' . $id . '" src="' . $options[$id] . '" width="' . THUMBW . '" height="' . THUMBH . '" alt="default thumbnail" />';
} else {
echo '<img id="previewimage_' . $id . '" src="http://placehold.it/' . THUMBW . 'x' . THUMBH . '" alt="default thumbnail" />';
}
echo '<input type="hidden" name="ds106banker_options[' . $id . ']" id="' . $id . '" value="' . esc_attr($options[$id]) . '" />
<br /><input type="button" class="upload_image_button button-primary" name="_ds106banker_button' . $id . '" id="_ds106banker_button' . $id . '" data-options_id="' . $id . '" data-uploader_title="Set ' . THINGNAME . ' Thumbnail" data-uploader_button_text="Select Thumbnail" value="Set/Change Thumbnail" />
</div><!-- uploader -->';
if ($desc != '') {
echo '<br /><span class="description">' . $desc . '</span>';
}
break;
case 'password':
echo '<input class="regular-text' . $field_class . '" type="password" id="' . $id . '" name="ds106banker_options[' . $id . ']" value="' . esc_attr($options[$id]) . '" />';
if ($desc != '') {
echo '<br /><span class="description">' . $desc . '</span>';
}
break;
case 'text':
default:
echo '<input class="regular-text' . $field_class . '" type="text" id="' . $id . '" name="ds106banker_options[' . $id . ']" placeholder="' . $std . '" value="' . esc_attr($options[$id]) . '" />';
if ($desc != '') {
if ($id == 'def_thumb') {
$desc .= '<br /><a href="' . $options[$id] . '" target="_blank"><img src="' . $options[$id] . '" style="overflow: hidden;" width="' . $options["index_thumb_w"] . '"></a>';
}
echo '<br /><span class="description">' . $desc . '</span>';
}
break;
}
}
开发者ID:sallyie, 项目名称:sallyie, 代码行数:83, 代码来源:class.ds106bank-theme-options.php
示例6: filter_excerpt_field_content_copy
function filter_excerpt_field_content_copy($elements)
{
if ($elements['post_type'] == 'product') {
$elements['excerpt']['editor_type'] = 'editor';
}
if (function_exists('format_for_editor')) {
// WordPress 4.3 uses format_for_editor
$elements['excerpt']['value'] = htmlspecialchars_decode(format_for_editor($elements['excerpt']['value'], $_POST['excerpt_type']));
} else {
// Backwards compatible for WordPress < 4.3
if ($_POST['excerpt_type'] == 'rich') {
$elements['excerpt']['value'] = htmlspecialchars_decode(wp_richedit_pre($elements['excerpt']['value']));
} else {
$elements['excerpt']['value'] = htmlspecialchars_decode(wp_htmledit_pre($elements['excerpt']['value']));
}
}
return $elements;
}
开发者ID:heaptrace, 项目名称:onlineshop, 代码行数:18, 代码来源:products.class.php
示例7: esc_attr
$options_to_update[] = $option->option_name;
$class = 'all-options';
} else {
$value = 'SERIALIZED DATA';
$disabled = true;
$class = 'all-options disabled';
}
} else {
$value = $option->option_value;
$options_to_update[] = $option->option_name;
$class = 'all-options';
}
$name = esc_attr($option->option_name);
echo "\n<tr>\n\t<th scope='row'><label for='{$name}'>" . esc_html($option->option_name) . "</label></th>\n<td>";
if (strpos($value, "\n") !== false) {
echo "<textarea class='{$class}' name='{$name}' id='{$name}' cols='30' rows='5'>" . wp_htmledit_pre($value) . "</textarea>";
} else {
echo "<input class='regular-text {$class}' type='text' name='{$name}' id='{$name}' value='" . esc_attr($value) . "'" . disabled($disabled, true, false) . " />";
}
echo "</td>\n</tr>";
}
?>
</table>
<p class="submit"><input type="hidden" name="page_options" value="<?php
echo esc_attr(implode(',', $options_to_update));
?>
" /><input type="submit" name="Update" value="<?php
esc_attr_e('Save Changes');
?>
" class="button-primary" /></p>
</form>
开发者ID:google-code-backups, 项目名称:pumpmyvote, 代码行数:31, 代码来源:options.php
示例8: _e
</textarea>
<br />
<?php
_e('The first page on a new site.');
?>
</td>
</tr>
<tr valign="top">
<th scope="row"><label for="first_comment"><?php
_e('First Comment');
?>
</label></th>
<td>
<textarea name="first_comment" id="first_comment" rows="5" cols="45" class="large-text">
<?php
echo wp_htmledit_pre(stripslashes(get_site_option('first_comment')));
?>
</textarea>
<br />
<?php
_e('The first comment on a new site.');
?>
</td>
</tr>
<tr valign="top">
<th scope="row"><label for="first_comment_author"><?php
_e('First Comment Author');
?>
</label></th>
<td>
<input type="text" size="40" name="first_comment_author" id="first_comment_author" value="<?php
开发者ID:junxuan, 项目名称:wordpress, 代码行数:31, 代码来源:settings.php
示例9: create_field
function create_field($field)
{
global $wp_version;
// vars
$id = 'wysiwyg-' . $field['id'] . '-' . uniqid();
?>
<div id="wp-<?php
echo $id;
?>
-wrap" class="acf_wysiwyg wp-editor-wrap"
data-toolbar="<?php
echo $field['toolbar'];
?>
" data-upload="<?php
echo $field['media_upload'];
?>
">
<?php
if (user_can_richedit() && $field['media_upload'] == 'yes') {
?>
<?php
if (version_compare($wp_version, '3.3', '<')) {
?>
<div id="editor-toolbar">
<div id="media-buttons" class="hide-if-no-js">
<?php
do_action('media_buttons');
?>
</div>
</div>
<?php
} else {
?>
<div id="wp-<?php
echo $id;
?>
-editor-tools" class="wp-editor-tools">
<div id="wp-<?php
echo $id;
?>
-media-buttons" class="hide-if-no-js wp-media-buttons">
<?php
do_action('media_buttons');
?>
</div>
</div>
<?php
}
?>
<?php
}
?>
<div id="wp-<?php
echo $id;
?>
-editor-container" class="wp-editor-container">
<textarea id="<?php
echo $id;
?>
" class="wp-editor-area" name="<?php
echo $field['name'];
?>
"><?php
if (user_can_richedit()) {
echo wp_richedit_pre($field['value']);
} else {
echo wp_htmledit_pre($field['value']);
}
?>
</textarea>
</div>
</div>
<?php
}
开发者ID:ajspencer, 项目名称:NCSSM-SG-WordPress, 代码行数:75, 代码来源:wysiwyg.php
示例10: display_setting
public function display_setting($args = array(), $options)
{
extract($args);
$do_return = false;
switch ($type) {
case 'heading':
if (!empty($desc)) {
echo '<h3>' . $desc . '</h3>';
}
$do_return = true;
break;
case 'expand_begin':
if (!empty($desc)) {
echo '<h3>' . $desc . '</h3>';
}
echo '<a id="' . $this->get_field_id($id) . '" style="cursor:pointer;" onclick="jQuery( \'div#' . $this->get_field_id($id) . '\' ) . slideToggle();">' . __('Expand/Collapse', 'testimonials-widget') . ' »</a>';
echo '<div id="' . $this->get_field_id($id) . '" style="display:none">';
$do_return = true;
break;
case 'expand_end':
echo '</div>';
$do_return = true;
break;
default:
break;
}
if ($do_return) {
return;
}
if (!isset($options[$id]) && $type != 'checkbox') {
$options[$id] = $std;
} elseif (!isset($options[$id])) {
$options[$id] = 0;
}
$field_class = '';
if (!empty($class)) {
$field_class = ' ' . $class;
}
echo '<p>';
switch ($type) {
case 'checkbox':
echo '<input class="checkbox' . $field_class . '" type="checkbox" id="' . $this->get_field_id($id) . '" name="' . $this->get_field_name($id) . '" value="1" ' . checked($options[$id], 1, false) . ' /> ';
echo '<label for="' . $this->get_field_id($id) . '">' . $title . '</label>';
break;
case 'select':
echo '<label for="' . $this->get_field_id($id) . '">' . $title . '</label>';
echo '<select id="' . $this->get_field_id($id) . '"class="select' . $field_class . '" name="' . $this->get_field_name($id) . '">';
foreach ($choices as $value => $label) {
echo '<option value="' . esc_attr($value) . '"' . selected($options[$id], $value, false) . '>' . $label . '</option>';
}
echo '</select>';
break;
case 'radio':
$i = 0;
$count_options = count($options) - 1;
foreach ($choices as $value => $label) {
echo '<input class="radio' . $field_class . '" type="radio" name="' . $this->get_field_name($id) . '" id="' . $this->get_field_name($id . $i) . '" value="' . esc_attr($value) . '" ' . checked($options[$id], $value, false) . '> <label for="' . $this->get_field_name($id . $i) . '">' . $label . '</label>';
if ($i < $count_options) {
echo '<br />';
}
$i++;
}
echo '<label for="' . $this->get_field_id($id) . '">' . $title . '</label>';
break;
case 'textarea':
echo '<label for="' . $this->get_field_id($id) . '">' . $title . '</label>';
echo '<textarea class="widefat' . $field_class . '" id="' . $this->get_field_id($id) . '" name="' . $this->get_field_name($id) . '" placeholder="' . $std . '" rows="5" cols="30">' . wp_htmledit_pre($options[$id]) . '</textarea>';
break;
case 'password':
echo '<label for="' . $this->get_field_id($id) . '">' . $title . '</label>';
echo '<input class="widefat' . $field_class . '" type="password" id="' . $this->get_field_id($id) . '" name="' . $this->get_field_name($id) . '" value="' . esc_attr($options[$id]) . '" />';
break;
case 'readonly':
echo '<label for="' . $this->get_field_id($id) . '">' . $title . '</label>';
echo '<input class="widefat' . $field_class . '" type="text" id="' . $this->get_field_id($id) . '" name="' . $this->get_field_name($id) . '" value="' . esc_attr($options[$id]) . '" readonly="readonly" />';
break;
case 'text':
echo '<label for="' . $this->get_field_id($id) . '">' . $title . '</label>';
echo '<input class="widefat' . $field_class . '" type="text" id="' . $this->get_field_id($id) . '" name="' . $this->get_field_name($id) . '" placeholder="' . $std . '" value="' . esc_attr($options[$id]) . '" />';
break;
default:
break;
}
if (!empty($desc)) {
echo '<br /><span class="setting-description"><small>' . $desc . '</small></span>';
}
echo '</p>';
}
开发者ID:josh73, 项目名称:docker, 代码行数:88, 代码来源:testimonials-widget-widget.php
示例11: esc_attr
?>
</th>
<td><textarea class="<?php
echo $class;
?>
" rows="5" cols="40" name="option[<?php
echo esc_attr($option->option_name);
?>
]" id="<?php
echo esc_attr($option->option_name);
?>
"<?php
disabled($disabled);
?>
><?php
wp_htmledit_pre($option->option_value);
?>
</textarea></td>
</tr>
<?php
} else {
?>
<tr class="form-field">
<th scope="row"><?php
esc_html_e(ucwords(str_replace("_", " ", $option->option_name)));
?>
</th>
<?php
if ($is_main_site && in_array($option->option_name, array('siteurl', 'home'))) {
?>
<td><code><?php
开发者ID:beaucollins, 项目名称:wp, 代码行数:31, 代码来源:ms-sites.php
示例12: esc
/**
* Escape string to prevent against nasty things.
*
* This is a wrapper function to add some additional measures for making
* sure users don't break things
*
* @since 3.0.3.3
* @param string $string The string to be escaped
* @param string $type The type of escaping to do
* @return string
*/
function esc($string, $type = 'js')
{
global $wp_filter, $merged_filters;
// Some themes and plugins hook into these filters and muck things up
// Remove all filters attached and then restore afterwards
$filters = compact($wp_filter, $merged_filters);
remove_all_filters('js_escape');
remove_all_filters('htmledit_pre');
remove_all_filters('attribute_escape');
$string = strip_tags($string);
switch ($type) {
case 'attr':
$string = esc_attr($string);
break;
case 'htmledit':
$string = wp_htmledit_pre($string);
break;
case 'js':
default:
$string = esc_js($string);
break;
}
// Restore filters that were removed above
extract($filters);
return $string;
}
开发者ID:statesman, 项目名称:photoblog.statesman.com, 代码行数:37, 代码来源:shadowbox-js.php
示例13: display_setting
/**
* HTML output callback for fields
*
* @since 1.0
*/
public function display_setting($args = array())
{
extract($args);
$options = get_option($this->options_name);
if (!isset($options[$id]) && $type != 'checkbox') {
$options[$id] = $std;
} elseif (!isset($options[$id])) {
$options[$id] = 0;
}
$field_class = '';
if ($class != '') {
$field_class = ' ' . $class;
}
switch ($type) {
case 'heading':
echo '</td></tr><tr valign="top"><td colspan="2" class="' . $class . '"><h2>' . $std . '</h2>';
echo '<p>' . $desc . '</p>';
break;
case 'paragraph':
echo '<p>' . $desc . '</p>';
break;
case 'checkbox':
if (!empty($choices)) {
if (!is_array($options[$id]) && is_array($std)) {
$options[$id] = array();
foreach ($std as $default) {
$options[$id][$default] = 1;
}
}
foreach ($choices as $val => $label) {
echo '<input class="checkbox' . $field_class . '" type="checkbox" id="' . $id . '" name="' . $this->options_name . '[' . $id . '][' . $val . ']" value="1" ' . @checked($options[$id][$val], 1, false) . ' /> <label for="' . $id . '">' . $label . '</label><br>';
}
} else {
echo '<input class="checkbox' . $field_class . '" type="checkbox" id="' . $id . '" name="' . $this->options_name . '[' . $id . ']" value="1" ' . checked($options[$id], 1, false) . ' /> <label for="' . $id . '">' . $desc . '</label>';
}
if ($desc != '') {
echo '<span class="description">' . $desc . '</span>';
}
break;
case 'select':
echo '<select class="select' . $field_class . '" name="' . $this->options_name . '[' . $id . ']"';
if ($disabled == 'yes') {
echo ' disabled="disabled" ';
}
echo '>';
foreach ($choices as $value => $label) {
echo '<option value="' . esc_attr($value) . '"' . selected($options[$id], $value, false) . '>' . $label . '</option>';
}
echo '</select>';
if ($desc != '') {
echo '<br /><span class="description">' . $desc . '</span>';
}
break;
case 'radio':
$i = 0;
foreach ($choices as $value => $label) {
echo '<input class="radio' . $field_class . '" type="radio" name="' . $this->options_name . '[' . $id . ']" id="' . $id . $i . '" value="' . esc_attr($value) . '" ' . checked($options[$id], $value, false) . '> <label for="' . $id . $i . '">' . $label . '</label>';
if ($i < count($options) - 1) {
echo '<br />';
}
$i++;
}
if ($desc != '') {
echo '<br /><span class="description">' . $desc . '</span>';
}
break;
case 'textarea':
echo '<textarea class="' . $field_class . '" id="' . $id . '" name="' . $this->options_name . '[' . $id . ']" placeholder="' . $std . '" rows="5" cols="30"';
if ($disabled == 'yes') {
echo ' disabled="disabled" ';
}
echo '>' . wp_htmledit_pre($options[$id]) . '</textarea>';
if ($desc != '') {
echo '<br /><span class="description">' . $desc . '</span>';
}
break;
case 'html':
$text = $options[$id] == '' ? $std : $options[$id];
wp_editor(apply_filters('the_content', html_entity_decode($text)), $id, array('textarea_name' => $this->options_name . '[' . $id . ']', 'media_buttons' => false, 'quicktags' => false, 'textarea_rows' => 15));
if ($desc != '') {
echo '<br /><span class="description">' . $desc . '</span>';
}
break;
case 'disabled':
echo '<textarea class="' . $field_class . '" id="' . $id . '" name="' . $this->options_name . '[' . $id . ']" disabled="disabled" rows="5" cols="30">' . $std . '</textarea>';
if ($desc != '') {
echo '<br /><span class="description">' . $desc . '</span>';
}
break;
case 'password':
echo '<input class="regular-text' . $field_class . '" type="password" id="' . $id . '" name="' . $this->options_name . '[' . $id . ']" value="' . esc_attr($options[$id]) . '"';
if ($disabled == 'yes') {
echo ' disabled="disabled" ';
}
echo ' />';
//.........这里部分代码省略.........
开发者ID:EliasGoldberg, 项目名称:troop-sim, 代码行数:101, 代码来源:WPEFI_Admin_Base.php
示例14: _e
</textarea>
<br />
<?php
_e('If you want to limit site registrations to certain domains. One domain per line.');
?>
</td>
</tr>
<tr valign="top">
<th scope="row"><label for="banned_email_domains"><?php
_e('Banned Email Domains');
?>
</label></th>
<td>
<textarea name="banned_email_domains" id="banned_email_domains" cols="45" rows="5"><?php
echo wp_htmledit_pre(get_site_option('banned_email_domains') == '' ? '' : implode("\n", (array) get_site_option('banned_email_domains')));
?>
</textarea>
<br />
<?php
_e('If you want to ban domains from site registrations. One domain per line.');
?>
</td>
</tr>
</table>
<h3><?php
_e('New Site Settings');
?>
</h3>
<table class="form-table">
开发者ID:beaucollins, 项目名称:wp, 代码行数:31, 代码来源:ms-options.php
示例15: buildOptions
//.........这里部分代码省略.........
echo '<span class="description">' . $desc . '</span>';
}
break;
case 'radio':
$i = 0;
foreach ($choices as $value => $label) {
echo '<input class="radio' . $field_class . '" type="radio" name="fullscreen_options[' . $id . ']" id="' . $id . $i . '" value="' . esc_attr($value) . '" ' . checked($options[$id], $value, false) . '> <label for="' . $id . $i . '">' . $label . '</label>';
//if ( $i < count( $options ) - 1 )
echo '<br />';
$i++;
}
if ($desc != '') {
echo '<span class="description">' . $desc . '</span>';
}
break;
case 'radio_img':
echo '<fieldset>';
$i = 0;
$i++;
foreach ($choices as $k => $v) {
$selected = checked($options[$id], $k, false) != '' ? ' gpp-radio-img-selected' : '';
echo '<label class="gpp-radio-img' . $selected . ' gpp-radio-img-' . $options[$id] . '" for="' . $id . '_' . $i . '">';
echo '<input type="radio" id="' . $id . '_' . $i . '" name="fullscreen_options[' . $id . ']" ' . $field_class . ' value="' . $k . '" ' . checked($options[$id], $k, false) . '/>';
echo '<img src="' . $v['img'] . '" alt="' . $v['title'] . '" onclick="jQuery:gpp_radio_img_select(\'' . $id . '_' . $i . '\', \'' . $options[$id] . '\');" />';
echo '<br/><span>' . $v['title'] . '</span>';
echo '</label>';
$i++;
}
//foreach
echo isset($options[$desc]) && !empty($options[$desc]) ? '<br/><span class="description">' . $options[$desc] . '</span>' : '';
echo '</fieldset>';
break;
case 'textarea':
echo '<textarea class="' . $field_class . '" id="' . $id . '" name="fullscreen_options[' . $id . ']" placeholder="' . $std . '" rows="5" cols="30">' . wp_htmledit_pre($options[$id]) . '</textarea>';
if ($desc != '') {
echo '<span class="description">' . $desc . '</span>';
}
break;
case 'password':
echo '<input class="regular-text' . $field_class . '" type="password" id="' . $id . '" name="fullscreen_options[' . $id . ']" value="' . esc_attr($options[$id]) . '" autocomplete="off" />';
if ($desc != '') {
echo '<span class="description">' . $desc . '</span>';
}
break;
case 'upload':
echo '<input id="' . $id . '" class="upload-url' . $field_class . '" type="hidden" name="fullscreen_options[' . $id . ']" value="' . esc_attr($options[$id]) . '" /><div class="imgpreview">';
if ($options[$id] != '') {
echo '<img class="gpp-screenshot" id="gpp-screenshot-' . $id . '" src="' . esc_attr($options[$id]) . '" />';
}
echo "</div>";
if ($options[$id] == '') {
$remove = ' style="display:none;"';
$upload = '';
} else {
$remove = '';
$upload = ' style="display:none;"';
}
echo '<a href="javascript:void(0);" class="upload_button button-secondary"' . $upload . ' rel-id="' . $id . '">' . __('Browse', 'fullscreen') . '</a>';
echo '<a href="javascript:void(0);" class="upload_button_remove"' . $remove . ' rel-id="' . $id . '">' . __('Remove Upload', 'fullscreen') . '</a>';
if ($desc != '') {
echo '<span class="description">' . $desc . '</span>';
}
break;
case 'html':
echo $html;
break;
开发者ID:lruelasvgim, 项目名称:vgimwebsite, 代码行数:67, 代码来源:class-theme-options.php
示例16: oxygen_theme_meta_box
//.........这里部分代码省略.........
</option>
</select>
<span class="description"><?php
_e('The base font size in pixels.', hybrid_get_parent_textdomain());
?>
</span>
</td>
</tr>
<!-- Link color -->
<tr>
<th>
<label for="<?php
echo hybrid_settings_field_id('oxygen_link_color');
?>
"><?php
_e('Link color:', hybrid_get_parent_textdomain());
?>
</label>
</th>
<td>
<input type="text" id="<?php
echo hybrid_settings_field_id('oxygen_link_color');
?>
" name="<?php
echo hybrid_settings_field_name('oxygen_link_color');
?>
" size="8" value="<?php
echo hybrid_get_setting('oxygen_link_color') ? esc_attr(hybrid_get_setting('oxygen_link_color')) : '#0da4d3';
?>
" data-hex="true" />
<div id="colorpicker_link_color"></div>
<span class="description"><?php
_e('Set the theme link color.', hybrid_get_parent_textdomain());
?>
</span>
</td>
</tr>
<!-- Slider Timeout -->
<tr>
<th>
<label for="<?php
echo hybrid_settings_field_id('oxygen_slider_timeout');
?>
"><?php
_e('Slider Timeout:', hybrid_get_parent_textdomain());
?>
</label>
</th>
<td>
<input type="text" id="<?php
echo hybrid_settings_field_id('oxygen_slider_timeout');
?>
" name="<?php
echo hybrid_settings_field_name('oxygen_slider_timeout');
?>
" value="<?php
echo hybrid_get_setting('oxygen_slider_timeout') ? esc_attr(hybrid_get_setting('oxygen_slider_timeout')) : '6000';
?>
" />
<span class="description"><?php
_e('The time interval between slides in milliseconds.', hybrid_get_parent_textdomain());
?>
</span>
</td>
</tr>
<!-- Custom CSS -->
<tr>
<th>
<label for="<?php
echo hybrid_settings_field_id('oxygen_custom_css');
?>
"><?php
_e('Custom CSS:', hybrid_get_parent_textdomain());
?>
</label>
</th>
<td>
<textarea id="<?php
echo hybrid_settings_field_id('oxygen_custom_css');
?>
" name="<?php
echo hybrid_settings_field_name('oxygen_custom_css');
?>
" cols="60" rows="8"><?php
echo wp_htmledit_pre(stripslashes(hybrid_get_setting('oxygen_custom_css')));
?>
</textarea>
<span class="description"><?php
_e('Add your custom CSS here. It would overwrite any default or custom theme settings.', hybrid_get_parent_textdomain());
?>
</span>
</td>
</tr>
<!-- End custom form elements. -->
</table><!-- .form-table --><?php
}
开发者ID:nukulb, 项目名称:bugsbounty-blog, 代码行数:101, 代码来源:functions-admin.php
solegalli/feature-selection-for-machine-learning: Code repository for the online
阅读:904| 2022-08-18
tianli/matlab_offscreen: Matlab offscreen rendering toolbox.
阅读:1039| 2022-08-17
win7系统电脑使用过程中有不少朋友表示遇到过win7系统重装系统初始设置的状况,当出现
阅读:824| 2022-11-06
底的笔顺怎么写?底的笔顺笔画顺序是什么?聊聊底字的笔画顺序怎么写了解到好多的写字朋
阅读:933| 2022-07-30
これがマストドンだ! 使い方からインスタンスの作り方まで | 電子書籍とプリントオン
阅读:834| 2022-08-17
raichen/LinuxServerCodes: Linux高性能服务器编程源码
阅读:405| 2022-08-15
; not allowed before ELSEElSE前不允许有“;” clause not allowed in OLE automatio
阅读:651| 2022-07-18
由于人们消费水平的提高,人们越来越多的追求美的享受,瓷砖美缝就是一种让瓷砖缝隙变
阅读:602| 2022-11-06
@fastify/bearer-auth is a Fastify plugin to require bearer Authorization headers
阅读:791| 2022-07-29
evijit/material-chess-android: An opensource Material Design Chess Game for Andr
阅读:696| 2022-08-17
请发表评论