mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-21 14:05:11 +00:00
Grouped backports to the 3.7 branch.
- Posts, Post Types: Escape output within `the_meta()`. - General: Ensure bookmark query limits are numeric. - Plugins: Escape output in error messages. Merges [53958-53960] to the 3.7 branch. Props tykoted, martinkrcho, xknown, dd32, peterwilsoncc, paulkevan, timothyblynjacobs. Built from https://develop.svn.wordpress.org/branches/3.7@53986 git-svn-id: http://core.svn.wordpress.org/branches/3.7@53545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ef39233c64
commit
cd1be7b95f
@ -372,7 +372,7 @@ require_once(ABSPATH . 'wp-admin/admin-header.php');
|
||||
$invalid = validate_active_plugins();
|
||||
if ( !empty($invalid) )
|
||||
foreach ( $invalid as $plugin_file => $error )
|
||||
echo '<div id="message" class="error"><p>' . sprintf(__('The plugin <code>%s</code> has been <strong>deactivated</strong> due to an error: %s'), esc_html($plugin_file), $error->get_error_message()) . '</p></div>';
|
||||
echo '<div id="message" class="error"><p>' . sprintf(__('The plugin <code>%s</code> has been <strong>deactivated</strong> due to an error: %s'), esc_html($plugin_file), esc_html( $error->get_error_message() ) ) . '</p></div>';
|
||||
?>
|
||||
|
||||
<?php if ( isset($_GET['error']) ) :
|
||||
@ -397,7 +397,7 @@ if ( !empty($invalid) )
|
||||
delete_transient('plugins_delete_result'); //Delete it once we're done.
|
||||
|
||||
if ( is_wp_error($delete_result) ) : ?>
|
||||
<div id="message" class="updated"><p><?php printf( __('Plugin could not be deleted due to an error: %s'), $delete_result->get_error_message() ); ?></p></div>
|
||||
<div id="message" class="updated"><p><?php printf( __('Plugin could not be deleted due to an error: %s'), esc_html( $delete_result->get_error_message() ) ); ?></p></div>
|
||||
<?php else : ?>
|
||||
<div id="message" class="updated"><p><?php _e('The selected plugins have been <strong>deleted</strong>.'); ?></p></div>
|
||||
<?php endif; ?>
|
||||
|
@ -256,7 +256,7 @@ function get_bookmarks($args = '') {
|
||||
$query .= " $exclusions $inclusions $search";
|
||||
$query .= " ORDER BY $orderby $order";
|
||||
if ($limit != -1)
|
||||
$query .= " LIMIT $limit";
|
||||
$query .= ' LIMIT ' . absint( $limit );
|
||||
|
||||
$results = $wpdb->get_results($query);
|
||||
|
||||
|
@ -731,11 +731,12 @@ function post_custom( $key = '' ) {
|
||||
/**
|
||||
* Display list of post custom fields.
|
||||
*
|
||||
* @internal This will probably change at some point...
|
||||
* @since 1.2.0
|
||||
* @uses apply_filters() Calls 'the_meta_key' on list item HTML content, with key and value as separate parameters.
|
||||
*
|
||||
* @deprecated 6.0.2 Use get_post_meta() to retrieve post meta and render manually.
|
||||
*/
|
||||
function the_meta() {
|
||||
_deprecated_function( __FUNCTION__, '6.0.2', 'get_post_meta()' );
|
||||
if ( $keys = get_post_custom_keys() ) {
|
||||
echo "<ul class='post-meta'>\n";
|
||||
foreach ( (array) $keys as $key ) {
|
||||
@ -744,7 +745,7 @@ function the_meta() {
|
||||
continue;
|
||||
$values = array_map('trim', get_post_custom_values($key));
|
||||
$value = implode($values,', ');
|
||||
echo apply_filters('the_meta_key', "<li><span class='post-meta-key'>$key:</span> $value</li>\n", $key, $value);
|
||||
echo apply_filters('the_meta_key', "<li><span class='post-meta-key'>" . esc_html( $key ) . ":</span> " . esc_html( $value ) . "</li>\n", $key, $value);
|
||||
}
|
||||
echo "</ul>\n";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user