Ticket #18560: 18560.wp-includes.diff
| File 18560.wp-includes.diff, 35.7 KB (added by duck_, 21 months ago) |
|---|
-
wp-includes/plugin.php
251 251 * @param string $tag The filter hook to which the function to be removed is hooked. 252 252 * @param callback $function_to_remove The name of the function which should be removed. 253 253 * @param int $priority optional. The priority of the function (default: 10). 254 * @param int $accepted_args optional. The number of arguments the function acc pets (default: 1).254 * @param int $accepted_args optional. The number of arguments the function accepts (default: 1). 255 255 * @return boolean Whether the function existed before it was removed. 256 256 */ 257 257 function remove_filter($tag, $function_to_remove, $priority = 10, $accepted_args = 1) { … … 520 520 * @param string $tag The action hook to which the function to be removed is hooked. 521 521 * @param callback $function_to_remove The name of the function which should be removed. 522 522 * @param int $priority optional The priority of the function (default: 10). 523 * @param int $accepted_args optional. The number of arguments the function acc pets (default: 1).523 * @param int $accepted_args optional. The number of arguments the function accepts (default: 1). 524 524 * @return boolean Whether the function is removed. 525 525 */ 526 526 function remove_action($tag, $function_to_remove, $priority = 10, $accepted_args = 1) { … … 745 745 * @param string $tag Used in counting how many hooks were applied 746 746 * @param callback $function Used for creating unique id 747 747 * @param int|bool $priority Used in counting how many hooks were applied. If === false and $function is an object reference, we return the unique id only if it already has one, false otherwise. 748 * @return string|bool Unique ID for usage as array key or false if $priority === false and $function is an object reference, and it does not already have a uniq e id.748 * @return string|bool Unique ID for usage as array key or false if $priority === false and $function is an object reference, and it does not already have a unique id. 749 749 */ 750 750 function _wp_filter_build_unique_id($tag, $function, $priority) { 751 751 global $wp_filter; -
wp-includes/locale.php
65 65 /** 66 66 * Stores the translated strings for 'am' and 'pm'. 67 67 * 68 * Also the cap alized versions.68 * Also the capitalized versions. 69 69 * 70 70 * @since 2.1.0 71 71 * @var array -
wp-includes/taxonomy.php
266 266 * query_var - false to prevent queries, or string to customize query var 267 267 * (?$query_var=$term); default will use $taxonomy as query var. 268 268 * 269 * public - If the taxonomy should be public ally queryable; //@TODO not implemented.269 * public - If the taxonomy should be publicly queryable; //@TODO not implemented. 270 270 * defaults to true. 271 271 * 272 272 * show_ui - If the WordPress UI admin tags UI should apply to this taxonomy; … … 276 276 * Defaults to public. 277 277 * 278 278 * show_tagcloud - false to prevent the taxonomy being listed in the Tag Cloud Widget; 279 * defaults to show_ui which defa lts to public.279 * defaults to show_ui which defaults to public. 280 280 * 281 281 * labels - An array of labels for this taxonomy. You can see accepted values in {@link get_taxonomy_labels()}. By default tag labels are used for non-hierarchical types and category labels for hierarchical ones. 282 282 * … … 369 369 * Builds an object with all taxonomy labels out of a taxonomy object 370 370 * 371 371 * Accepted keys of the label array in the taxonomy object: 372 * - name - general name for the taxonomy, usually plural. The same as and overrid en by $tax->label. Default is Post Tags/Categories372 * - name - general name for the taxonomy, usually plural. The same as and overridden by $tax->label. Default is Post Tags/Categories 373 373 * - singular_name - name for one object of this taxonomy. Default is Post Tag/Category 374 374 * - search_items - Default is Search Tags/Search Categories 375 375 * - popular_items - This string isn't used on hierarchical taxonomies. Default is Popular Tags … … 1496 1496 /** 1497 1497 * Sanitize Term all fields. 1498 1498 * 1499 * Rel ys on sanitize_term_field() to sanitize the term. The difference is that1499 * Relies on sanitize_term_field() to sanitize the term. The difference is that 1500 1500 * this function will sanitize <strong>all</strong> fields. The context is based 1501 1501 * on sanitize_term_field(). 1502 1502 * … … 1785 1785 * @uses wp_delete_term() 1786 1786 * 1787 1787 * @param int $cat_ID 1788 * @return mixed Returns true if completes delete action; false if term doesn t exist;1788 * @return mixed Returns true if completes delete action; false if term doesn't exist; 1789 1789 * Zero on attempted deletion of default Category; WP_Error object is also a possibility. 1790 1790 */ 1791 1791 function wp_delete_category( $cat_ID ) { … … 1810 1810 * 'all_with_object_id'. 1811 1811 * 1812 1812 * The fields argument also decides what will be returned. If 'all' or 1813 * 'all_with_object_id' is cho osen or the default kept intact, then all matching1813 * 'all_with_object_id' is chosen or the default kept intact, then all matching 1814 1814 * terms objects will be returned. If either 'ids' or 'names' is used, then an 1815 1815 * array of all matching term ids or term names will be returned respectively. 1816 1816 * … … 1918 1918 /** 1919 1919 * Adds a new term to the database. Optionally marks it as an alias of an existing term. 1920 1920 * 1921 * Error handling is assigned for the nonexist ance of the $taxonomy and $term1921 * Error handling is assigned for the nonexistence of the $taxonomy and $term 1922 1922 * parameters before inserting. If both the term id and taxonomy exist 1923 1923 * previously, then an array will be returned that contains the term id and the 1924 1924 * contents of what is returned. The keys of the array are 'term_id' and … … 2179 2179 * hierarchical and has a parent, it will append that parent to the $slug. 2180 2180 * 2181 2181 * If that still doesn't return an unique slug, then it try to append a number 2182 * until it finds a number that is tru ely unique.2182 * until it finds a number that is truly unique. 2183 2183 * 2184 2184 * The only purpose for $term is for appending a parent, if one exists. 2185 2185 * … … 2385 2385 /** 2386 2386 * Updates the amount of terms in taxonomy. 2387 2387 * 2388 * If there is a taxonomy callback appl yed, then it will be called for updating2388 * If there is a taxonomy callback applied, then it will be called for updating 2389 2389 * the count. 2390 2390 * 2391 2391 * The default action is to count what the amount of terms have the relationship -
wp-includes/class-http.php
222 222 /** 223 223 * Dispatches a HTTP request to a supporting transport. 224 224 * 225 * Tests each transport in order to find a transport which matches the request argu ements.225 * Tests each transport in order to find a transport which matches the request arguments. 226 226 * Also caches the transport instance to be used later. 227 227 * 228 228 * The order for blocking requests is cURL, Streams, and finally Fsockopen. … … 631 631 632 632 $endDelay = time(); 633 633 634 // If the delay is greater than the timeout then fsockopen should 't be used, because it will634 // If the delay is greater than the timeout then fsockopen shouldn't be used, because it will 635 635 // cause a long delay. 636 636 $elapseDelay = ($endDelay-$startDelay) > $r['timeout']; 637 637 if ( true === $elapseDelay ) … … 915 915 else 916 916 $processedHeaders = WP_Http::processHeaders($meta['wrapper_data']); 917 917 918 // Streams does not provide an error code which we can use to see why the request stream stop ed.918 // Streams does not provide an error code which we can use to see why the request stream stopped. 919 919 // We can however test to see if a location header is present and return based on that. 920 920 if ( isset($processedHeaders['headers']['location']) && 0 !== $args['_redirection'] ) 921 921 return new WP_Error('http_request_failed', __('Too many redirects.')); … … 1031 1031 1032 1032 1033 1033 // CURLOPT_TIMEOUT and CURLOPT_CONNECTTIMEOUT expect integers. Have to use ceil since 1034 // a value of 0 will allow an u limited timeout.1034 // a value of 0 will allow an unlimited timeout. 1035 1035 $timeout = (int) ceil( $r['timeout'] ); 1036 1036 curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, $timeout ); 1037 1037 curl_setopt( $handle, CURLOPT_TIMEOUT, $timeout ); … … 1679 1679 } 1680 1680 1681 1681 /** 1682 * What enco nding the content used when it was compressed to send in the headers.1682 * What encoding the content used when it was compressed to send in the headers. 1683 1683 * 1684 1684 * @since 2.8 1685 1685 * -
wp-includes/post.php
1155 1155 * Builds an object with all post type labels out of a post type object 1156 1156 * 1157 1157 * Accepted keys of the label array in the post type object: 1158 * - name - general name for the post type, usually plural. The same and overrid en by $post_type_object->label. Default is Posts/Pages1158 * - name - general name for the post type, usually plural. The same and overridden by $post_type_object->label. Default is Posts/Pages 1159 1159 * - singular_name - name for one object of this post type. Default is Post/Page 1160 1160 * - add_new - Default is Add New for both hierarchical and non-hierarchical types. When internationalizing this string, please use a {@link http://codex.wordpress.org/I18n_for_WordPress_Developers#Disambiguation_by_context gettext context} matching your post type. Example: <code>_x('Add New', 'product');</code> 1161 1161 * - add_new_item - Default is Add New Post/Add New Page … … 1249 1249 * 'excerpt', 'page-attributes', 'thumbnail', and 'custom-fields'. 1250 1250 * 1251 1251 * Additionally, the 'revisions' feature dictates whether the post type will store revisions, 1252 * and the 'comments' feature dic ates whether the comments count will show on the edit screen.1252 * and the 'comments' feature dictates whether the comments count will show on the edit screen. 1253 1253 * 1254 1254 * @since 3.0.0 1255 1255 * @param string $post_type The post type for which to add the feature … … 3269 3269 3270 3270 /** 3271 3271 * function to traverse and return all the nested children post names of a root page. 3272 * $children contains parent-chil ren relations3272 * $children contains parent-children relations 3273 3273 * 3274 3274 * @since 2.9.0 3275 3275 */ … … 3911 3911 } 3912 3912 } 3913 3913 3914 if ( empty($url) ) //If any of the above options failed, Fallback on the GUID as used pre-2.7, not recom ended to rely upon this.3914 if ( empty($url) ) //If any of the above options failed, Fallback on the GUID as used pre-2.7, not recommended to rely upon this. 3915 3915 $url = get_the_guid( $post->ID ); 3916 3916 3917 3917 $url = apply_filters( 'wp_get_attachment_url', $url, $post->ID ); … … 4466 4466 /** 4467 4467 * Will clean the attachment in the cache. 4468 4468 * 4469 * Cleaning means delete from the cache. Optional y will clean the term4469 * Cleaning means delete from the cache. Optionally will clean the term 4470 4470 * object cache associated with the attachment ID. 4471 4471 * 4472 4472 * This function will not run if $_wp_suspend_cache_invalidation is not empty. See … … 4664 4664 * Determines which fields of posts are to be saved in revisions. 4665 4665 * 4666 4666 * Does two things. If passed a post *array*, it will return a post array ready 4667 * to be ins terted into the posts table as a post revision. Otherwise, returns4667 * to be inserted into the posts table as a post revision. Otherwise, returns 4668 4668 * an array whose keys are the post fields to be saved for post revisions. 4669 4669 * 4670 4670 * @package WordPress -
wp-includes/js/tinymce/plugins/wpdialogs/js/popup.dev.js
67 67 * Returns a window argument/parameter by name. 68 68 * 69 69 * @method getWindowArg 70 * @param {String} n Name of the window argument to retri ve.70 * @param {String} n Name of the window argument to retrieve. 71 71 * @param {String} dv Optional default value to return. 72 72 * @return {String} Argument value or default value if it wasn't found. 73 73 */ … … 81 81 * Returns a editor parameter/config option value. 82 82 * 83 83 * @method getParam 84 * @param {String} n Name of the editor config option to retri ve.84 * @param {String} n Name of the editor config option to retrieve. 85 85 * @param {String} dv Optional default value to return. 86 86 * @return {String} Parameter value or default value if it wasn't found. 87 87 */ -
wp-includes/theme.php
469 469 * 470 470 * @since 2.9.0 471 471 * 472 * @return array|string An arr y of theme roots keyed by template/stylesheet or a single theme root if all themes have the same root.472 * @return array|string An array of theme roots keyed by template/stylesheet or a single theme root if all themes have the same root. 473 473 */ 474 474 function get_theme_roots() { 475 475 global $wp_theme_directories; -
wp-includes/functions.php
20 20 * @param string $dateformatstring Either 'G', 'U', or php date format. 21 21 * @param string $mysqlstring Time from mysql DATETIME field. 22 22 * @param bool $translate Optional. Default is true. Will switch format to locale. 23 * @return string Date format ed by $dateformatstring or locale (if available).23 * @return string Date formatted by $dateformatstring or locale (if available). 24 24 */ 25 25 function mysql2date( $dateformatstring, $mysqlstring, $translate = true ) { 26 26 $m = $mysqlstring; … … 3586 3586 /* First we check if the DOMDocument class exists. If it does not exist, 3587 3587 * which is the case for PHP 4.X, then we cannot easily update the xml configuration file, 3588 3588 * hence we just bail out and tell user that pretty permalinks cannot be used. 3589 * This is not a big issue because PHP 4.X is going to be depr icated and for IIS it3589 * This is not a big issue because PHP 4.X is going to be deprecated and for IIS it 3590 3590 * is recommended to use PHP 5.X NTS. 3591 3591 * Next we check if the URL Rewrite Module 1.1 is loaded and enabled for the web site. When 3592 3592 * URL Rewrite 1.1 is loaded it always sets a server variable called 'IIS_UrlRewriteModule'. -
wp-includes/l10n.php
398 398 * @param string $domain Unique identifier for retrieving translated strings 399 399 * @param string $abs_rel_path Optional. Relative path to ABSPATH of a folder, 400 400 * where the .mo file resides. Deprecated, but still functional until 2.7 401 * @param string $plugin_rel_path Optional. Relative path to WP_PLUGIN_DIR. This is the preferred argument to use. It takes prece ndence over $abs_rel_path401 * @param string $plugin_rel_path Optional. Relative path to WP_PLUGIN_DIR. This is the preferred argument to use. It takes precedence over $abs_rel_path 402 402 */ 403 403 function load_plugin_textdomain( $domain, $abs_rel_path = false, $plugin_rel_path = false ) { 404 404 $locale = apply_filters( 'plugin_locale', get_locale(), $domain ); … … 532 532 } 533 533 534 534 return $languages; 535 } 536 No newline at end of file 535 } -
wp-includes/comment-template.php
362 362 * Retrieve the comment date of the current comment. 363 363 * 364 364 * @since 1.5.0 365 * @uses apply_filters() Calls 'get_comment_date' hook with the format ed date and the $d parameter respectively365 * @uses apply_filters() Calls 'get_comment_date' hook with the formatted date and the $d parameter respectively 366 366 * @uses $comment 367 367 * 368 368 * @param string $d The format of the date (defaults to user's config) … … 832 832 * 833 833 * The $file path is passed through a filter hook called, 'comments_template' 834 834 * which includes the TEMPLATEPATH and $file combined. Tries the $filtered path 835 * first and if it fails it will require the default comment t hemplate from the835 * first and if it fails it will require the default comment template from the 836 836 * default theme. If either does not exist, then the WordPress process will be 837 837 * halted. It is advised for that reason, that the default theme is not deleted. 838 838 * -
wp-includes/shortcodes.php
157 157 * The regular expression combines the shortcode tags in the regular expression 158 158 * in a regex class. 159 159 * 160 * The regular expres ion contains 6 different sub matches to help with parsing.160 * The regular expression contains 6 different sub matches to help with parsing. 161 161 * 162 162 * 1/6 - An extra [ or ] to allow for escaping shortcodes with double [[]] 163 163 * 2 - The shortcode name … … 295 295 296 296 add_filter('the_content', 'do_shortcode', 11); // AFTER wpautop() 297 297 298 ?> 299 No newline at end of file 298 ?> -
wp-includes/user.php
1444 1444 * A simpler way of inserting an user into the database. 1445 1445 * 1446 1446 * Creates a new user with just the username, password, and email. For a more 1447 * detail creation of a user, use wp_insert_user() to specify more info mation.1447 * detail creation of a user, use wp_insert_user() to specify more information. 1448 1448 * 1449 1449 * @since 2.0.0 1450 1450 * @see wp_insert_user() More complete way to create a new user -
wp-includes/media.php
260 260 } 261 261 262 262 /** 263 * Calculates the new dimen tions for a downsampled image.263 * Calculates the new dimensions for a downsampled image. 264 264 * 265 265 * If either width or height are empty, no constraint is applied on 266 266 * that dimension. … … 305 305 $h = intval( $current_height * $ratio ); 306 306 307 307 // Sometimes, due to rounding, we'll end up with a result like this: 465x700 in a 177x177 box is 117x176... a pixel short 308 // We also have issues with recursive calls resulting in an ever-changing result. Con training to the result of a constraint should yield the original result.308 // We also have issues with recursive calls resulting in an ever-changing result. Constraining to the result of a constraint should yield the original result. 309 309 // Thus we look for dimensions that are one pixel shy of the max value and bump them up 310 310 if ( $did_width && $w == $max_width - 1 ) 311 311 $w = $max_width; // Round it up … … 1144 1144 * @uses update_post_meta() 1145 1145 * 1146 1146 * @param array $attr Shortcode attributes. 1147 * @param string $url The URL attempting to be embed ed.1147 * @param string $url The URL attempting to be embedded. 1148 1148 * @return string The embed HTML on success, otherwise the original URL. 1149 1149 */ 1150 1150 function shortcode( $attr, $url = '' ) { … … 1372 1372 * @uses _wp_oembed_get_object() 1373 1373 * @uses WP_oEmbed::get_html() 1374 1374 * 1375 * @param string $url The URL that should be embed ed.1375 * @param string $url The URL that should be embedded. 1376 1376 * @param array $args Addtional arguments and parameters. 1377 1377 * @return string The original URL on failure or the embed HTML on success. 1378 1378 */ … … 1438 1438 return apply_filters( 'embed_googlevideo', '<embed type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docid=' . esc_attr($matches[2]) . '&hl=en&fs=true" style="width:' . esc_attr($width) . 'px;height:' . esc_attr($height) . 'px" allowFullScreen="true" allowScriptAccess="always" />', $matches, $attr, $url, $rawattr ); 1439 1439 } 1440 1440 1441 ?> 1442 No newline at end of file 1441 ?> -
wp-includes/class-wp-xmlrpc-server.php
8 8 /** 9 9 * WordPress XMLRPC server implementation. 10 10 * 11 * Implements compat ability for Blogger API, MetaWeblog API, MovableType, and11 * Implements compatibility for Blogger API, MetaWeblog API, MovableType, and 12 12 * pingback. Additional WordPress API for managing comments, pages, posts, 13 13 * options, etc. 14 14 * … … 747 747 ORDER BY ID 748 748 "); 749 749 750 // The date needs to be format ed properly.750 // The date needs to be formatted properly. 751 751 $num_pages = count($page_list); 752 752 for ( $i = 0; $i < $num_pages; $i++ ) { 753 753 $post_date = mysql2date('Ymd\TH:i:s', $page_list[$i]->post_date, false); … … 1551 1551 * - username 1552 1552 * - password 1553 1553 * - attachment_id 1554 * @return array. Assoc ciative array containing:1554 * @return array. Associative array containing: 1555 1555 * - 'date_created_gmt' 1556 1556 * - 'parent' 1557 1557 * - 'link' … … 1661 1661 } 1662 1662 1663 1663 /** 1664 * Retri ves a list of post formats used by the site1664 * Retrieves a list of post formats used by the site 1665 1665 * 1666 1666 * @since 3.1 1667 1667 * … … 3445 3445 } elseif ( isset($urltest['fragment']) ) { 3446 3446 // an #anchor is there, it's either... 3447 3447 if ( intval($urltest['fragment']) ) { 3448 // ...an integer #XXXX (simpl iest case)3448 // ...an integer #XXXX (simplest case) 3449 3449 $post_ID = (int) $urltest['fragment']; 3450 3450 $way = 'from the fragment (numeric)'; 3451 3451 } elseif ( preg_match('/post-[0-9]+/',$urltest['fragment']) ) { -
wp-includes/class-phpass.php
49 49 50 50 $this->portable_hashes = $portable_hashes; 51 51 52 $this->random_state = microtime() . uniqid(rand(), TRUE); // removed getmypid() for compa bility reasons52 $this->random_state = microtime() . uniqid(rand(), TRUE); // removed getmypid() for compatibility reasons 53 53 } 54 54 55 55 function get_random_bytes($count) -
wp-includes/cache.php
9 9 */ 10 10 11 11 /** 12 * Adds data to the cache, if the cache key doesn't al eady exist.12 * Adds data to the cache, if the cache key doesn't already exist. 13 13 * 14 14 * @since 2.0.0 15 15 * @uses $wp_object_cache Object Cache Class … … 31 31 * Closes the cache. 32 32 * 33 33 * This function has ceased to do anything since WordPress 2.5. The 34 * functionality was removed along with the rest of the persist ant cache. This34 * functionality was removed along with the rest of the persistent cache. This 35 35 * does not mean that plugins can't implement this function when they need to 36 36 * make sure that the cache is cleaned up after WordPress no longer needs it. 37 37 * … … 282 282 * 283 283 * @uses WP_Object_Cache::get Checks to see if the cache already has data. 284 284 * @uses WP_Object_Cache::set Sets the data after the checking the cache 285 * contents exist ance.285 * contents existence. 286 286 * 287 287 * @since 2.0.0 288 288 * -
wp-includes/query.php
2137 2137 if ( intval($q['comments_popup']) ) 2138 2138 $q['p'] = absint($q['comments_popup']); 2139 2139 2140 // If an attachment is requested by number, let it super cede any post number.2140 // If an attachment is requested by number, let it supersede any post number. 2141 2141 if ( $q['attachment_id'] ) 2142 2142 $q['p'] = absint($q['attachment_id']); 2143 2143 … … 2288 2288 if ( $q['author_name'][ count($q['author_name'])-1 ] ) { 2289 2289 $q['author_name'] = $q['author_name'][count($q['author_name'])-1]; // no trailing slash 2290 2290 } else { 2291 $q['author_name'] = $q['author_name'][count($q['author_name'])-2]; // there was a trail ling slash2291 $q['author_name'] = $q['author_name'][count($q['author_name'])-2]; // there was a trailing slash 2292 2292 } 2293 2293 } 2294 2294 $q['author_name'] = sanitize_title_for_query( $q['author_name'] ); -
wp-includes/link-template.php
2415 2415 } 2416 2416 2417 2417 /** 2418 * Inject rel=s ortlink into head if a shortlink is defined for the current page.2418 * Inject rel=shortlink into head if a shortlink is defined for the current page. 2419 2419 * 2420 2420 * Attached to the wp_head action. 2421 2421 * -
wp-includes/wp-db.php
640 640 * Returns an array of WordPress tables. 641 641 * 642 642 * Also allows for the CUSTOM_USER_TABLE and CUSTOM_USER_META_TABLE to 643 * override the WordPress users and user smeta tables that would otherwise643 * override the WordPress users and usermeta tables that would otherwise 644 644 * be determined by the prefix. 645 645 * 646 646 * The scope argument can take one of the following: … … 1289 1289 * @param string $output Optional. one of ARRAY_A | ARRAY_N | OBJECT constants. Return an associative array (column => value, ...), 1290 1290 * a numerically indexed array (0 => value, ...) or an object ( ->column = value ), respectively. 1291 1291 * @param int $y Optional. Row to return. Indexed from 0. 1292 * @return mixed Database query result in format specif ed by $output or null on failure1292 * @return mixed Database query result in format specified by $output or null on failure 1293 1293 */ 1294 1294 function get_row( $query = null, $output = OBJECT, $y = 0 ) { 1295 1295 $this->func_call = "\$db->get_row(\"$query\",$output,$y)"; -
wp-includes/formatting.php
2228 2228 * Checks and cleans a URL. 2229 2229 * 2230 2230 * A number of characters are removed from the URL. If the URL is for displaying 2231 * (the default behaviour) ampers tands are also replaced. The 'clean_url' filter2231 * (the default behaviour) ampersands are also replaced. The 'clean_url' filter 2232 2232 * is applied to the returned cleaned URL. 2233 2233 * 2234 2234 * @since 2.8.0 -
wp-includes/author-template.php
38 38 * still use the old behavior will also pass the value from get_the_author(). 39 39 * 40 40 * The normal, expected behavior of this function is to echo the author and not 41 * return it. However, backwards compati ability has to be maintained.41 * return it. However, backwards compatibility has to be maintained. 42 42 * 43 43 * @since 0.71 44 44 * @see get_the_author() -
wp-includes/canonical.php
14 14 * 15 15 * Search engines consider www.somedomain.com and somedomain.com to be two 16 16 * different URLs when they both go to the same location. This SEO enhancement 17 * prevents penal ity for duplicate content by redirecting all incoming links to17 * prevents penalty for duplicate content by redirecting all incoming links to 18 18 * one or the other. 19 19 * 20 20 * Prevents redirection for feeds, trackbacks, searches, comment popup, and … … 175 175 176 176 // Create the destination url for this taxonomy 177 177 $tax_url = parse_url($tax_url); 178 if ( ! empty($tax_url['query']) ) { // Taxonomy access able via ?taxonomy=..&term=.. or any custom qv..178 if ( ! empty($tax_url['query']) ) { // Taxonomy accessible via ?taxonomy=..&term=.. or any custom qv.. 179 179 parse_str($tax_url['query'], $query_vars); 180 180 $redirect['query'] = add_query_arg($query_vars, $redirect['query']); 181 } else { // Taxonomy is access able via a "pretty-URL"181 } else { // Taxonomy is accessible via a "pretty-URL" 182 182 $redirect['path'] = $tax_url['path']; 183 183 } 184 184 -
wp-includes/capabilities.php
524 524 } 525 525 526 526 /** 527 * Magic method for checking the exist ance of a certain custom field527 * Magic method for checking the existence of a certain custom field 528 528 * 529 529 * @since 3.3.0 530 530 */ … … 827 827 * 828 828 * This is useful for looking up whether the user has a specific role 829 829 * assigned to the user. The second optional parameter can also be used to 830 * check for capabilities against a spec fic post.830 * check for capabilities against a specific post. 831 831 * 832 832 * @since 2.0.0 833 833 * @access public -
wp-includes/class-wp.php
569 569 * 570 570 * @access public 571 571 * @param string $subject subject 572 * @param array $matches data used for subs itution572 * @param array $matches data used for substitution 573 573 * @return string 574 574 */ 575 575 function apply($subject, $matches) { -
wp-includes/class-oembed.php
28 28 function __construct() { 29 29 // List out some popular sites that support oEmbed. 30 30 // The WP_Embed class disables discovery for non-unfiltered_html users, so only providers in this array will be used for them. 31 // Add to this list using the wp_oembed_add_provider() function (see it 's PHPDoc for details).31 // Add to this list using the wp_oembed_add_provider() function (see its PHPDoc for details). 32 32 $this->providers = apply_filters( 'oembed_providers', array( 33 33 '#http://(www\.)?youtube.com/watch.*#i' => array( 'http://www.youtube.com/oembed', true ), 34 34 'http://youtu.be/*' => array( 'http://www.youtube.com/oembed', false ), … … 292 292 return $wp_oembed; 293 293 } 294 294 295 ?> 296 No newline at end of file 295 ?> -
wp-includes/deprecated.php
2073 2073 * Checks and cleans a URL. 2074 2074 * 2075 2075 * A number of characters are removed from the URL. If the URL is for displaying 2076 * (the default behaviour) ampers tands are also replaced. The 'clean_url' filter2076 * (the default behaviour) ampersands are also replaced. The 'clean_url' filter 2077 2077 * is applied to the returned cleaned URL. 2078 2078 * 2079 2079 * @since 1.2.0 -
wp-includes/pluggable.php
1086 1086 $comment = get_comment($comment_id); 1087 1087 $post = get_post($comment->comment_post_ID); 1088 1088 $user = get_userdata( $post->post_author ); 1089 // Send to the administ ation and to the post author if the author can modify the comment.1089 // Send to the administration and to the post author if the author can modify the comment. 1090 1090 $email_to = array( get_option('admin_email') ); 1091 1091 if ( user_can($user->ID, 'edit_comment', $comment_id) && !empty($user->user_email) && ( get_option('admin_email') != $user->user_email) ) 1092 1092 $email_to[] = $user->user_email; … … 1432 1432 * 1433 1433 * Maintains compatibility between old version and the new cookie authentication 1434 1434 * protocol using PHPass library. The $hash parameter is the encrypted password 1435 * and the function compares the plain text password when enc ypted similarly1435 * and the function compares the plain text password when encrypted similarly 1436 1436 * against the already encrypted password to see if they match. 1437 1437 * 1438 1438 * For integration with other applications, this function can be overwritten to -
wp-includes/widgets.php
139 139 } 140 140 141 141 if ( $empty ) { 142 // If there are none, we register the widget's exist ance with a142 // If there are none, we register the widget's existence with a 143 143 // generic template 144 144 $this->_set(1); 145 145 $this->_register_one(); … … 297 297 $settings = array(); 298 298 299 299 if ( !array_key_exists('_multiwidget', $settings) ) { 300 // old format, conver if single widget300 // old format, convert if single widget 301 301 $settings = wp_convert_widget_settings($this->id_base, $this->option_name, $settings); 302 302 } 303 303 … … 461 461 * The default for the name is "Sidebar #", with '#' being replaced with the 462 462 * number the sidebar is currently when greater than one. If first sidebar, the 463 463 * name will be just "Sidebar". The default for id is "sidebar-" followed by the 464 * number the sidebar creation is currently at. If the id is provided, and mu tliple464 * number the sidebar creation is currently at. If the id is provided, and multiple 465 465 * sidebars are being defined, the id will have "-2" appended, and so on. 466 466 * 467 467 * @since 2.2.0 -
wp-includes/script-loader.php
159 159 if ( empty($max_upload_size) ) 160 160 $max_upload_size = __('not configured'); 161 161 162 // error messag oe for both plupload and swfupload162 // error message for both plupload and swfupload 163 163 $uploader_l10n = array( 164 164 'queue_limit_exceeded' => __('You have attempted to queue too many files.'), 165 165 'file_exceeds_size_limit' => __('This file exceeds the maximum upload size for this site.'), … … 439 439 * 440 440 * @since 2.3.1 441 441 * 442 * @param array $js_array JavaScript scrip starray442 * @param array $js_array JavaScript scripts array 443 443 * @return array Reordered array, if needed. 444 444 */ 445 445 function wp_prototype_before_jquery( $js_array ) { -
wp-includes/http.php
130 130 * 131 131 * @param array $response 132 132 * @param string $header Header name to retrieve value from. 133 * @return string The header value. Empty string on if incorrect parameter given, or if the header doesn t exist.133 * @return string The header value. Empty string on if incorrect parameter given, or if the header doesn't exist. 134 134 */ 135 135 function wp_remote_retrieve_header(&$response, $header) { 136 136 if ( is_wp_error($response) || ! isset($response['headers']) || ! is_array($response['headers'])) -
wp-includes/class-wp-error.php
70 70 * @since 2.1.0 71 71 * @access public 72 72 * 73 * @return array List of error codes, if avai able.73 * @return array List of error codes, if available. 74 74 */ 75 75 function get_error_codes() { 76 76 if ( empty($this->errors) ) … … 102 102 * @since 2.1.0 103 103 * 104 104 * @param string|int $code Optional. Retrieve messages matching code, if exists. 105 * @return array Error strings on success, or empty array on failure (if using code eparameter).105 * @return array Error strings on success, or empty array on failure (if using code parameter). 106 106 */ 107 107 function get_error_messages($code = '') { 108 108 // Return all messages if no code specified. … … 209 209 return false; 210 210 } 211 211 212 ?> 213 No newline at end of file 212 ?>
