Edit File by line
/home/barbar84/www/wp-inclu...
File: deprecated.php
[2000] Fix | Delete
$innerHTML = esc_attr($post->post_title);
[2001] Fix | Delete
[2002] Fix | Delete
return apply_filters('attachment_innerHTML', $innerHTML, $post->ID);
[2003] Fix | Delete
}
[2004] Fix | Delete
[2005] Fix | Delete
/**
[2006] Fix | Delete
* Retrieves bookmark data based on ID.
[2007] Fix | Delete
*
[2008] Fix | Delete
* @since 2.0.0
[2009] Fix | Delete
* @deprecated 2.1.0 Use get_bookmark()
[2010] Fix | Delete
* @see get_bookmark()
[2011] Fix | Delete
*
[2012] Fix | Delete
* @param int $bookmark_id ID of link
[2013] Fix | Delete
* @param string $output Optional. Type of output. Accepts OBJECT, ARRAY_N, or ARRAY_A.
[2014] Fix | Delete
* Default OBJECT.
[2015] Fix | Delete
* @param string $filter Optional. How to filter the link for output. Accepts 'raw', 'edit',
[2016] Fix | Delete
* 'attribute', 'js', 'db', or 'display'. Default 'raw'.
[2017] Fix | Delete
* @return object|array Bookmark object or array, depending on the type specified by `$output`.
[2018] Fix | Delete
*/
[2019] Fix | Delete
function get_link( $bookmark_id, $output = OBJECT, $filter = 'raw' ) {
[2020] Fix | Delete
_deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmark()' );
[2021] Fix | Delete
return get_bookmark($bookmark_id, $output, $filter);
[2022] Fix | Delete
}
[2023] Fix | Delete
[2024] Fix | Delete
/**
[2025] Fix | Delete
* Performs esc_url() for database or redirect usage.
[2026] Fix | Delete
*
[2027] Fix | Delete
* @since 2.3.1
[2028] Fix | Delete
* @deprecated 2.8.0 Use esc_url_raw()
[2029] Fix | Delete
* @see esc_url_raw()
[2030] Fix | Delete
*
[2031] Fix | Delete
* @param string $url The URL to be cleaned.
[2032] Fix | Delete
* @param array $protocols An array of acceptable protocols.
[2033] Fix | Delete
* @return string The cleaned URL.
[2034] Fix | Delete
*/
[2035] Fix | Delete
function sanitize_url( $url, $protocols = null ) {
[2036] Fix | Delete
_deprecated_function( __FUNCTION__, '2.8.0', 'esc_url_raw()' );
[2037] Fix | Delete
return esc_url_raw( $url, $protocols );
[2038] Fix | Delete
}
[2039] Fix | Delete
[2040] Fix | Delete
/**
[2041] Fix | Delete
* Checks and cleans a URL.
[2042] Fix | Delete
*
[2043] Fix | Delete
* A number of characters are removed from the URL. If the URL is for displaying
[2044] Fix | Delete
* (the default behaviour) ampersands are also replaced. The 'clean_url' filter
[2045] Fix | Delete
* is applied to the returned cleaned URL.
[2046] Fix | Delete
*
[2047] Fix | Delete
* @since 1.2.0
[2048] Fix | Delete
* @deprecated 3.0.0 Use esc_url()
[2049] Fix | Delete
* @see esc_url()
[2050] Fix | Delete
*
[2051] Fix | Delete
* @param string $url The URL to be cleaned.
[2052] Fix | Delete
* @param array $protocols Optional. An array of acceptable protocols.
[2053] Fix | Delete
* @param string $context Optional. How the URL will be used. Default is 'display'.
[2054] Fix | Delete
* @return string The cleaned $url after the {@see 'clean_url'} filter is applied.
[2055] Fix | Delete
*/
[2056] Fix | Delete
function clean_url( $url, $protocols = null, $context = 'display' ) {
[2057] Fix | Delete
if ( $context == 'db' )
[2058] Fix | Delete
_deprecated_function( 'clean_url( $context = \'db\' )', '3.0.0', 'esc_url_raw()' );
[2059] Fix | Delete
else
[2060] Fix | Delete
_deprecated_function( __FUNCTION__, '3.0.0', 'esc_url()' );
[2061] Fix | Delete
return esc_url( $url, $protocols, $context );
[2062] Fix | Delete
}
[2063] Fix | Delete
[2064] Fix | Delete
/**
[2065] Fix | Delete
* Escape single quotes, specialchar double quotes, and fix line endings.
[2066] Fix | Delete
*
[2067] Fix | Delete
* The filter {@see 'js_escape'} is also applied by esc_js().
[2068] Fix | Delete
*
[2069] Fix | Delete
* @since 2.0.4
[2070] Fix | Delete
* @deprecated 2.8.0 Use esc_js()
[2071] Fix | Delete
* @see esc_js()
[2072] Fix | Delete
*
[2073] Fix | Delete
* @param string $text The text to be escaped.
[2074] Fix | Delete
* @return string Escaped text.
[2075] Fix | Delete
*/
[2076] Fix | Delete
function js_escape( $text ) {
[2077] Fix | Delete
_deprecated_function( __FUNCTION__, '2.8.0', 'esc_js()' );
[2078] Fix | Delete
return esc_js( $text );
[2079] Fix | Delete
}
[2080] Fix | Delete
[2081] Fix | Delete
/**
[2082] Fix | Delete
* Legacy escaping for HTML blocks.
[2083] Fix | Delete
*
[2084] Fix | Delete
* @deprecated 2.8.0 Use esc_html()
[2085] Fix | Delete
* @see esc_html()
[2086] Fix | Delete
*
[2087] Fix | Delete
* @param string $string String to escape.
[2088] Fix | Delete
* @param string $quote_style Unused.
[2089] Fix | Delete
* @param false|string $charset Unused.
[2090] Fix | Delete
* @param false $double_encode Whether to double encode. Unused.
[2091] Fix | Delete
* @return string Escaped `$string`.
[2092] Fix | Delete
*/
[2093] Fix | Delete
function wp_specialchars( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) {
[2094] Fix | Delete
_deprecated_function( __FUNCTION__, '2.8.0', 'esc_html()' );
[2095] Fix | Delete
if ( func_num_args() > 1 ) { // Maintain back-compat for people passing additional arguments.
[2096] Fix | Delete
return _wp_specialchars( $string, $quote_style, $charset, $double_encode );
[2097] Fix | Delete
} else {
[2098] Fix | Delete
return esc_html( $string );
[2099] Fix | Delete
}
[2100] Fix | Delete
}
[2101] Fix | Delete
[2102] Fix | Delete
/**
[2103] Fix | Delete
* Escaping for HTML attributes.
[2104] Fix | Delete
*
[2105] Fix | Delete
* @since 2.0.6
[2106] Fix | Delete
* @deprecated 2.8.0 Use esc_attr()
[2107] Fix | Delete
* @see esc_attr()
[2108] Fix | Delete
*
[2109] Fix | Delete
* @param string $text
[2110] Fix | Delete
* @return string
[2111] Fix | Delete
*/
[2112] Fix | Delete
function attribute_escape( $text ) {
[2113] Fix | Delete
_deprecated_function( __FUNCTION__, '2.8.0', 'esc_attr()' );
[2114] Fix | Delete
return esc_attr( $text );
[2115] Fix | Delete
}
[2116] Fix | Delete
[2117] Fix | Delete
/**
[2118] Fix | Delete
* Register widget for sidebar with backward compatibility.
[2119] Fix | Delete
*
[2120] Fix | Delete
* Allows $name to be an array that accepts either three elements to grab the
[2121] Fix | Delete
* first element and the third for the name or just uses the first element of
[2122] Fix | Delete
* the array for the name.
[2123] Fix | Delete
*
[2124] Fix | Delete
* Passes to wp_register_sidebar_widget() after argument list and backward
[2125] Fix | Delete
* compatibility is complete.
[2126] Fix | Delete
*
[2127] Fix | Delete
* @since 2.2.0
[2128] Fix | Delete
* @deprecated 2.8.0 Use wp_register_sidebar_widget()
[2129] Fix | Delete
* @see wp_register_sidebar_widget()
[2130] Fix | Delete
*
[2131] Fix | Delete
* @param string|int $name Widget ID.
[2132] Fix | Delete
* @param callable $output_callback Run when widget is called.
[2133] Fix | Delete
* @param string $classname Optional. Classname widget option. Default empty.
[2134] Fix | Delete
* @param mixed ...$params Widget parameters.
[2135] Fix | Delete
*/
[2136] Fix | Delete
function register_sidebar_widget($name, $output_callback, $classname = '', ...$params) {
[2137] Fix | Delete
_deprecated_function( __FUNCTION__, '2.8.0', 'wp_register_sidebar_widget()' );
[2138] Fix | Delete
// Compat.
[2139] Fix | Delete
if ( is_array( $name ) ) {
[2140] Fix | Delete
if ( count( $name ) === 3 ) {
[2141] Fix | Delete
$name = sprintf( $name[0], $name[2] );
[2142] Fix | Delete
} else {
[2143] Fix | Delete
$name = $name[0];
[2144] Fix | Delete
}
[2145] Fix | Delete
}
[2146] Fix | Delete
[2147] Fix | Delete
$id = sanitize_title( $name );
[2148] Fix | Delete
$options = array();
[2149] Fix | Delete
if ( ! empty( $classname ) && is_string( $classname ) ) {
[2150] Fix | Delete
$options['classname'] = $classname;
[2151] Fix | Delete
}
[2152] Fix | Delete
[2153] Fix | Delete
wp_register_sidebar_widget( $id, $name, $output_callback, $options, ...$params );
[2154] Fix | Delete
}
[2155] Fix | Delete
[2156] Fix | Delete
/**
[2157] Fix | Delete
* Serves as an alias of wp_unregister_sidebar_widget().
[2158] Fix | Delete
*
[2159] Fix | Delete
* @since 2.2.0
[2160] Fix | Delete
* @deprecated 2.8.0 Use wp_unregister_sidebar_widget()
[2161] Fix | Delete
* @see wp_unregister_sidebar_widget()
[2162] Fix | Delete
*
[2163] Fix | Delete
* @param int|string $id Widget ID.
[2164] Fix | Delete
*/
[2165] Fix | Delete
function unregister_sidebar_widget($id) {
[2166] Fix | Delete
_deprecated_function( __FUNCTION__, '2.8.0', 'wp_unregister_sidebar_widget()' );
[2167] Fix | Delete
return wp_unregister_sidebar_widget($id);
[2168] Fix | Delete
}
[2169] Fix | Delete
[2170] Fix | Delete
/**
[2171] Fix | Delete
* Registers widget control callback for customizing options.
[2172] Fix | Delete
*
[2173] Fix | Delete
* Allows $name to be an array that accepts either three elements to grab the
[2174] Fix | Delete
* first element and the third for the name or just uses the first element of
[2175] Fix | Delete
* the array for the name.
[2176] Fix | Delete
*
[2177] Fix | Delete
* Passes to wp_register_widget_control() after the argument list has
[2178] Fix | Delete
* been compiled.
[2179] Fix | Delete
*
[2180] Fix | Delete
* @since 2.2.0
[2181] Fix | Delete
* @deprecated 2.8.0 Use wp_register_widget_control()
[2182] Fix | Delete
* @see wp_register_widget_control()
[2183] Fix | Delete
*
[2184] Fix | Delete
* @param int|string $name Sidebar ID.
[2185] Fix | Delete
* @param callable $control_callback Widget control callback to display and process form.
[2186] Fix | Delete
* @param int $width Widget width.
[2187] Fix | Delete
* @param int $height Widget height.
[2188] Fix | Delete
* @param mixed ...$params Widget parameters.
[2189] Fix | Delete
*/
[2190] Fix | Delete
function register_widget_control($name, $control_callback, $width = '', $height = '', ...$params) {
[2191] Fix | Delete
_deprecated_function( __FUNCTION__, '2.8.0', 'wp_register_widget_control()' );
[2192] Fix | Delete
// Compat.
[2193] Fix | Delete
if ( is_array( $name ) ) {
[2194] Fix | Delete
if ( count( $name ) === 3 ) {
[2195] Fix | Delete
$name = sprintf( $name[0], $name[2] );
[2196] Fix | Delete
} else {
[2197] Fix | Delete
$name = $name[0];
[2198] Fix | Delete
}
[2199] Fix | Delete
}
[2200] Fix | Delete
[2201] Fix | Delete
$id = sanitize_title( $name );
[2202] Fix | Delete
$options = array();
[2203] Fix | Delete
if ( ! empty( $width ) ) {
[2204] Fix | Delete
$options['width'] = $width;
[2205] Fix | Delete
}
[2206] Fix | Delete
if ( ! empty( $height ) ) {
[2207] Fix | Delete
$options['height'] = $height;
[2208] Fix | Delete
}
[2209] Fix | Delete
[2210] Fix | Delete
wp_register_widget_control( $id, $name, $control_callback, $options, ...$params );
[2211] Fix | Delete
}
[2212] Fix | Delete
[2213] Fix | Delete
/**
[2214] Fix | Delete
* Alias of wp_unregister_widget_control().
[2215] Fix | Delete
*
[2216] Fix | Delete
* @since 2.2.0
[2217] Fix | Delete
* @deprecated 2.8.0 Use wp_unregister_widget_control()
[2218] Fix | Delete
* @see wp_unregister_widget_control()
[2219] Fix | Delete
*
[2220] Fix | Delete
* @param int|string $id Widget ID.
[2221] Fix | Delete
*/
[2222] Fix | Delete
function unregister_widget_control($id) {
[2223] Fix | Delete
_deprecated_function( __FUNCTION__, '2.8.0', 'wp_unregister_widget_control()' );
[2224] Fix | Delete
return wp_unregister_widget_control($id);
[2225] Fix | Delete
}
[2226] Fix | Delete
[2227] Fix | Delete
/**
[2228] Fix | Delete
* Remove user meta data.
[2229] Fix | Delete
*
[2230] Fix | Delete
* @since 2.0.0
[2231] Fix | Delete
* @deprecated 3.0.0 Use delete_user_meta()
[2232] Fix | Delete
* @see delete_user_meta()
[2233] Fix | Delete
*
[2234] Fix | Delete
* @param int $user_id User ID.
[2235] Fix | Delete
* @param string $meta_key Metadata key.
[2236] Fix | Delete
* @param mixed $meta_value Optional. Metadata value. Default empty.
[2237] Fix | Delete
* @return bool True deletion completed and false if user_id is not a number.
[2238] Fix | Delete
*/
[2239] Fix | Delete
function delete_usermeta( $user_id, $meta_key, $meta_value = '' ) {
[2240] Fix | Delete
_deprecated_function( __FUNCTION__, '3.0.0', 'delete_user_meta()' );
[2241] Fix | Delete
global $wpdb;
[2242] Fix | Delete
if ( !is_numeric( $user_id ) )
[2243] Fix | Delete
return false;
[2244] Fix | Delete
$meta_key = preg_replace('|[^a-z0-9_]|i', '', $meta_key);
[2245] Fix | Delete
[2246] Fix | Delete
if ( is_array($meta_value) || is_object($meta_value) )
[2247] Fix | Delete
$meta_value = serialize($meta_value);
[2248] Fix | Delete
$meta_value = trim( $meta_value );
[2249] Fix | Delete
[2250] Fix | Delete
$cur = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s", $user_id, $meta_key) );
[2251] Fix | Delete
[2252] Fix | Delete
if ( $cur && $cur->umeta_id )
[2253] Fix | Delete
do_action( 'delete_usermeta', $cur->umeta_id, $user_id, $meta_key, $meta_value );
[2254] Fix | Delete
[2255] Fix | Delete
if ( ! empty($meta_value) )
[2256] Fix | Delete
$wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s AND meta_value = %s", $user_id, $meta_key, $meta_value) );
[2257] Fix | Delete
else
[2258] Fix | Delete
$wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s", $user_id, $meta_key) );
[2259] Fix | Delete
[2260] Fix | Delete
clean_user_cache( $user_id );
[2261] Fix | Delete
wp_cache_delete( $user_id, 'user_meta' );
[2262] Fix | Delete
[2263] Fix | Delete
if ( $cur && $cur->umeta_id )
[2264] Fix | Delete
do_action( 'deleted_usermeta', $cur->umeta_id, $user_id, $meta_key, $meta_value );
[2265] Fix | Delete
[2266] Fix | Delete
return true;
[2267] Fix | Delete
}
[2268] Fix | Delete
[2269] Fix | Delete
/**
[2270] Fix | Delete
* Retrieve user metadata.
[2271] Fix | Delete
*
[2272] Fix | Delete
* If $user_id is not a number, then the function will fail over with a 'false'
[2273] Fix | Delete
* boolean return value. Other returned values depend on whether there is only
[2274] Fix | Delete
* one item to be returned, which be that single item type. If there is more
[2275] Fix | Delete
* than one metadata value, then it will be list of metadata values.
[2276] Fix | Delete
*
[2277] Fix | Delete
* @since 2.0.0
[2278] Fix | Delete
* @deprecated 3.0.0 Use get_user_meta()
[2279] Fix | Delete
* @see get_user_meta()
[2280] Fix | Delete
*
[2281] Fix | Delete
* @param int $user_id User ID
[2282] Fix | Delete
* @param string $meta_key Optional. Metadata key. Default empty.
[2283] Fix | Delete
* @return mixed
[2284] Fix | Delete
*/
[2285] Fix | Delete
function get_usermeta( $user_id, $meta_key = '' ) {
[2286] Fix | Delete
_deprecated_function( __FUNCTION__, '3.0.0', 'get_user_meta()' );
[2287] Fix | Delete
global $wpdb;
[2288] Fix | Delete
$user_id = (int) $user_id;
[2289] Fix | Delete
[2290] Fix | Delete
if ( !$user_id )
[2291] Fix | Delete
return false;
[2292] Fix | Delete
[2293] Fix | Delete
if ( !empty($meta_key) ) {
[2294] Fix | Delete
$meta_key = preg_replace('|[^a-z0-9_]|i', '', $meta_key);
[2295] Fix | Delete
$user = wp_cache_get($user_id, 'users');
[2296] Fix | Delete
// Check the cached user object.
[2297] Fix | Delete
if ( false !== $user && isset($user->$meta_key) )
[2298] Fix | Delete
$metas = array($user->$meta_key);
[2299] Fix | Delete
else
[2300] Fix | Delete
$metas = $wpdb->get_col( $wpdb->prepare("SELECT meta_value FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s", $user_id, $meta_key) );
[2301] Fix | Delete
} else {
[2302] Fix | Delete
$metas = $wpdb->get_col( $wpdb->prepare("SELECT meta_value FROM $wpdb->usermeta WHERE user_id = %d", $user_id) );
[2303] Fix | Delete
}
[2304] Fix | Delete
[2305] Fix | Delete
if ( empty($metas) ) {
[2306] Fix | Delete
if ( empty($meta_key) )
[2307] Fix | Delete
return array();
[2308] Fix | Delete
else
[2309] Fix | Delete
return '';
[2310] Fix | Delete
}
[2311] Fix | Delete
[2312] Fix | Delete
$metas = array_map('maybe_unserialize', $metas);
[2313] Fix | Delete
[2314] Fix | Delete
if ( count($metas) == 1 )
[2315] Fix | Delete
return $metas[0];
[2316] Fix | Delete
else
[2317] Fix | Delete
return $metas;
[2318] Fix | Delete
}
[2319] Fix | Delete
[2320] Fix | Delete
/**
[2321] Fix | Delete
* Update metadata of user.
[2322] Fix | Delete
*
[2323] Fix | Delete
* There is no need to serialize values, they will be serialized if it is
[2324] Fix | Delete
* needed. The metadata key can only be a string with underscores. All else will
[2325] Fix | Delete
* be removed.
[2326] Fix | Delete
*
[2327] Fix | Delete
* Will remove the metadata, if the meta value is empty.
[2328] Fix | Delete
*
[2329] Fix | Delete
* @since 2.0.0
[2330] Fix | Delete
* @deprecated 3.0.0 Use update_user_meta()
[2331] Fix | Delete
* @see update_user_meta()
[2332] Fix | Delete
*
[2333] Fix | Delete
* @param int $user_id User ID
[2334] Fix | Delete
* @param string $meta_key Metadata key.
[2335] Fix | Delete
* @param mixed $meta_value Metadata value.
[2336] Fix | Delete
* @return bool True on successful update, false on failure.
[2337] Fix | Delete
*/
[2338] Fix | Delete
function update_usermeta( $user_id, $meta_key, $meta_value ) {
[2339] Fix | Delete
_deprecated_function( __FUNCTION__, '3.0.0', 'update_user_meta()' );
[2340] Fix | Delete
global $wpdb;
[2341] Fix | Delete
if ( !is_numeric( $user_id ) )
[2342] Fix | Delete
return false;
[2343] Fix | Delete
$meta_key = preg_replace('|[^a-z0-9_]|i', '', $meta_key);
[2344] Fix | Delete
[2345] Fix | Delete
/** @todo Might need fix because usermeta data is assumed to be already escaped */
[2346] Fix | Delete
if ( is_string($meta_value) )
[2347] Fix | Delete
$meta_value = stripslashes($meta_value);
[2348] Fix | Delete
$meta_value = maybe_serialize($meta_value);
[2349] Fix | Delete
[2350] Fix | Delete
if (empty($meta_value)) {
[2351] Fix | Delete
return delete_usermeta($user_id, $meta_key);
[2352] Fix | Delete
}
[2353] Fix | Delete
[2354] Fix | Delete
$cur = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->usermeta WHERE user_id = %d AND meta_key = %s", $user_id, $meta_key) );
[2355] Fix | Delete
[2356] Fix | Delete
if ( $cur )
[2357] Fix | Delete
do_action( 'update_usermeta', $cur->umeta_id, $user_id, $meta_key, $meta_value );
[2358] Fix | Delete
[2359] Fix | Delete
if ( !$cur )
[2360] Fix | Delete
$wpdb->insert($wpdb->usermeta, compact('user_id', 'meta_key', 'meta_value') );
[2361] Fix | Delete
elseif ( $cur->meta_value != $meta_value )
[2362] Fix | Delete
$wpdb->update($wpdb->usermeta, compact('meta_value'), compact('user_id', 'meta_key') );
[2363] Fix | Delete
else
[2364] Fix | Delete
return false;
[2365] Fix | Delete
[2366] Fix | Delete
clean_user_cache( $user_id );
[2367] Fix | Delete
wp_cache_delete( $user_id, 'user_meta' );
[2368] Fix | Delete
[2369] Fix | Delete
if ( !$cur )
[2370] Fix | Delete
do_action( 'added_usermeta', $wpdb->insert_id, $user_id, $meta_key, $meta_value );
[2371] Fix | Delete
else
[2372] Fix | Delete
do_action( 'updated_usermeta', $cur->umeta_id, $user_id, $meta_key, $meta_value );
[2373] Fix | Delete
[2374] Fix | Delete
return true;
[2375] Fix | Delete
}
[2376] Fix | Delete
[2377] Fix | Delete
/**
[2378] Fix | Delete
* Get users for the site.
[2379] Fix | Delete
*
[2380] Fix | Delete
* For setups that use the multisite feature. Can be used outside of the
[2381] Fix | Delete
* multisite feature.
[2382] Fix | Delete
*
[2383] Fix | Delete
* @since 2.2.0
[2384] Fix | Delete
* @deprecated 3.1.0 Use get_users()
[2385] Fix | Delete
* @see get_users()
[2386] Fix | Delete
*
[2387] Fix | Delete
* @global wpdb $wpdb WordPress database abstraction object.
[2388] Fix | Delete
*
[2389] Fix | Delete
* @param int $id Site ID.
[2390] Fix | Delete
* @return array List of users that are part of that site ID
[2391] Fix | Delete
*/
[2392] Fix | Delete
function get_users_of_blog( $id = '' ) {
[2393] Fix | Delete
_deprecated_function( __FUNCTION__, '3.1.0', 'get_users()' );
[2394] Fix | Delete
[2395] Fix | Delete
global $wpdb;
[2396] Fix | Delete
if ( empty( $id ) ) {
[2397] Fix | Delete
$id = get_current_blog_id();
[2398] Fix | Delete
}
[2399] Fix | Delete
$blog_prefix = $wpdb->get_blog_prefix($id);
[2400] Fix | Delete
$users = $wpdb->get_results( "SELECT user_id, user_id AS ID, user_login, display_name, user_email, meta_value FROM $wpdb->users, $wpdb->usermeta WHERE {$wpdb->users}.ID = {$wpdb->usermeta}.user_id AND meta_key = '{$blog_prefix}capabilities' ORDER BY {$wpdb->usermeta}.user_id" );
[2401] Fix | Delete
return $users;
[2402] Fix | Delete
}
[2403] Fix | Delete
[2404] Fix | Delete
/**
[2405] Fix | Delete
* Enable/disable automatic general feed link outputting.
[2406] Fix | Delete
*
[2407] Fix | Delete
* @since 2.8.0
[2408] Fix | Delete
* @deprecated 3.0.0 Use add_theme_support()
[2409] Fix | Delete
* @see add_theme_support()
[2410] Fix | Delete
*
[2411] Fix | Delete
* @param bool $add Optional. Add or remove links. Default true.
[2412] Fix | Delete
*/
[2413] Fix | Delete
function automatic_feed_links( $add = true ) {
[2414] Fix | Delete
_deprecated_function( __FUNCTION__, '3.0.0', "add_theme_support( 'automatic-feed-links' )" );
[2415] Fix | Delete
[2416] Fix | Delete
if ( $add )
[2417] Fix | Delete
add_theme_support( 'automatic-feed-links' );
[2418] Fix | Delete
else
[2419] Fix | Delete
remove_action( 'wp_head', 'feed_links_extra', 3 ); // Just do this yourself in 3.0+.
[2420] Fix | Delete
}
[2421] Fix | Delete
[2422] Fix | Delete
/**
[2423] Fix | Delete
* Retrieve user data based on field.
[2424] Fix | Delete
*
[2425] Fix | Delete
* @since 1.5.0
[2426] Fix | Delete
* @deprecated 3.0.0 Use get_the_author_meta()
[2427] Fix | Delete
* @see get_the_author_meta()
[2428] Fix | Delete
*
[2429] Fix | Delete
* @param string $field User meta field.
[2430] Fix | Delete
* @param false|int $user Optional. User ID to retrieve the field for. Default false (current user).
[2431] Fix | Delete
* @return string The author's field from the current author's DB object.
[2432] Fix | Delete
*/
[2433] Fix | Delete
function get_profile( $field, $user = false ) {
[2434] Fix | Delete
_deprecated_function( __FUNCTION__, '3.0.0', 'get_the_author_meta()' );
[2435] Fix | Delete
if ( $user ) {
[2436] Fix | Delete
$user = get_user_by( 'login', $user );
[2437] Fix | Delete
$user = $user->ID;
[2438] Fix | Delete
}
[2439] Fix | Delete
return get_the_author_meta( $field, $user );
[2440] Fix | Delete
}
[2441] Fix | Delete
[2442] Fix | Delete
/**
[2443] Fix | Delete
* Retrieves the number of posts a user has written.
[2444] Fix | Delete
*
[2445] Fix | Delete
* @since 0.71
[2446] Fix | Delete
* @deprecated 3.0.0 Use count_user_posts()
[2447] Fix | Delete
* @see count_user_posts()
[2448] Fix | Delete
*
[2449] Fix | Delete
* @param int $userid User to count posts for.
[2450] Fix | Delete
* @return int Number of posts the given user has written.
[2451] Fix | Delete
*/
[2452] Fix | Delete
function get_usernumposts( $userid ) {
[2453] Fix | Delete
_deprecated_function( __FUNCTION__, '3.0.0', 'count_user_posts()' );
[2454] Fix | Delete
return count_user_posts( $userid );
[2455] Fix | Delete
}
[2456] Fix | Delete
[2457] Fix | Delete
/**
[2458] Fix | Delete
* Callback used to change %uXXXX to &#YYY; syntax
[2459] Fix | Delete
*
[2460] Fix | Delete
* @since 2.8.0
[2461] Fix | Delete
* @access private
[2462] Fix | Delete
* @deprecated 3.0.0
[2463] Fix | Delete
*
[2464] Fix | Delete
* @param array $matches Single Match
[2465] Fix | Delete
* @return string An HTML entity
[2466] Fix | Delete
*/
[2467] Fix | Delete
function funky_javascript_callback($matches) {
[2468] Fix | Delete
return "&#".base_convert($matches[1],16,10).";";
[2469] Fix | Delete
}
[2470] Fix | Delete
[2471] Fix | Delete
/**
[2472] Fix | Delete
* Fixes JavaScript bugs in browsers.
[2473] Fix | Delete
*
[2474] Fix | Delete
* Converts unicode characters to HTML numbered entities.
[2475] Fix | Delete
*
[2476] Fix | Delete
* @since 1.5.0
[2477] Fix | Delete
* @deprecated 3.0.0
[2478] Fix | Delete
*
[2479] Fix | Delete
* @global $is_macIE
[2480] Fix | Delete
* @global $is_winIE
[2481] Fix | Delete
*
[2482] Fix | Delete
* @param string $text Text to be made safe.
[2483] Fix | Delete
* @return string Fixed text.
[2484] Fix | Delete
*/
[2485] Fix | Delete
function funky_javascript_fix($text) {
[2486] Fix | Delete
_deprecated_function( __FUNCTION__, '3.0.0' );
[2487] Fix | Delete
// Fixes for browsers' JavaScript bugs.
[2488] Fix | Delete
global $is_macIE, $is_winIE;
[2489] Fix | Delete
[2490] Fix | Delete
if ( $is_winIE || $is_macIE )
[2491] Fix | Delete
$text = preg_replace_callback("/\%u([0-9A-F]{4,4})/",
[2492] Fix | Delete
"funky_javascript_callback",
[2493] Fix | Delete
$text);
[2494] Fix | Delete
[2495] Fix | Delete
return $text;
[2496] Fix | Delete
}
[2497] Fix | Delete
[2498] Fix | Delete
/**
[2499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function