Make WordPress Core

Ticket #7918: final-corrections.diff

File final-corrections.diff, 13.8 KB (added by jacobsantos, 17 years ago)

Final corrections patch 1.

  • wp-admin/includes/plugin-install.php

     
    156156        echo wp_generate_tag_cloud($tags, array( 'single_text' => __('%d plugin'), 'multiple_text' => __('%d plugins') ) );
    157157}
    158158
    159 function install_search_form($after_submit = '') {
     159/**
     160 * Display search form for searching plugins.
     161 *
     162 * @since 2.7.0
     163 */
     164function install_search_form(){
    160165        $type = isset($_REQUEST['type']) ? $_REQUEST['type'] : '';
    161166        $term = isset($_REQUEST['s']) ? $_REQUEST['s'] : '';
    162167
  • wp-includes/functions.php

     
    646646/**
    647647 * Saves and restores user interface settings stored in a cookie.
    648648 *
     649 * Checks if the current user-settings cookie is updated and stores it. When no
     650 * cookie exists (different browser used), adds the last saved cookie restoring
     651 * the settings.
     652 *
    649653 * @package WordPress
    650654 * @subpackage Option
    651655 * @since 2.7.0
    652  *
    653  * Checks if the current user-settings cookie is updated and stores it.
    654  * When no cookie exists (different browser used), adds the last saved cookie restoring the settings.
    655656 */
    656657function wp_user_settings() {
    657658
     
    690691 *
    691692 * @package WordPress
    692693 * @subpackage Option
    693  * @since 2.7.0 
    694  *   
     694 * @since 2.7.0
     695 *
    695696 * @param string $name The name of the setting.
    696697 * @param string $default Optional default value to return when $name is not set.
    697698 * @return mixed the last saved user setting or the default value/false if it doesn't exist.
     
    706707/**
    707708 * Delete user interface settings.
    708709 *
     710 * Deleting settings would reset them to the defaults.
     711 *
    709712 * @package WordPress
    710713 * @subpackage Option
    711714 * @since 2.7.0
    712715 *
    713  * Deleting settings would reset them to the defaults.
    714  *
    715716 * @param mixed $names The name or array of names of the setting to be deleted.
    716717 */
    717718function delete_user_setting( $names ) {
     
    763764        return array();
    764765}
    765766
     767/**
     768 * Delete the user settings of the current user.
     769 *
     770 * @package WordPress
     771 * @subpackage Option
     772 * @since 2.7.0
     773 */
    766774function delete_all_user_settings() {
    767775        if ( ! $user = wp_get_current_user() )
    768776                return;
  • wp-includes/functions.wp-scripts.php

     
    3434        return $wp_scripts->do_items( $handles );
    3535}
    3636
     37/**
     38 * Register new JavaScript file.
     39 *
     40 * @since r16
     41 * @see WP_Scripts::add() For parameter information.
     42 */
    3743function wp_register_script( $handle, $src, $deps = array(), $ver = false ) {
    3844        global $wp_scripts;
    3945        if ( !is_a($wp_scripts, 'WP_Scripts') )
     
    4349}
    4450
    4551/**
    46  * Localizes a script
     52 * Localizes a script.
    4753 *
    48  * Localizes only if script has already been added
     54 * Localizes only if script has already been added.
    4955 *
     56 * @since r16
    5057 * @see WP_Script::localize()
    5158 */
    5259function wp_localize_script( $handle, $object_name, $l10n ) {
     
    5764        return $wp_scripts->localize( $handle, $object_name, $l10n );
    5865}
    5966
     67/**
     68 * Remove a registered script.
     69 *
     70 * @since r16
     71 * @see WP_Scripts::remove() For parameter information.
     72 */
    6073function wp_deregister_script( $handle ) {
    6174        global $wp_scripts;
    6275        if ( !is_a($wp_scripts, 'WP_Scripts') )
     
    6679}
    6780
    6881/**
    69  * Equeues script
     82 * Enqueues script.
    7083 *
    7184 * Registers the script if src provided (does NOT overwrite) and enqueues.
    7285 *
     86 * @since r16
    7387 * @see WP_Script::add(), WP_Script::enqueue()
    7488*/
    7589function wp_enqueue_script( $handle, $src = false, $deps = array(), $ver = false ) {
  • wp-includes/functions.wp-styles.php

     
    77 */
    88
    99/**
    10  * {@internal Missing Short Description}}
     10 * Display styles that are in the queue or part of $handles.
    1111 *
    1212 * @since r79
     13 * @uses do_action() Calls 'wp_print_styles' hook.
     14 * @global object $wp_styles The WP_Styles object for printing styles.
    1315 *
    14  * @param mixed $handles See {@link WP_Styles::do_items()} for information.
    15  * @return mixed See {@link WP_Styles::do_items()} for information.
     16 * @param array $handles (optional) Styles to be printed.  (void) prints queue, (string) prints that style, (array of strings) prints those styles.
     17 * @return bool True on success, false on failure.
    1618 */
    1719function wp_print_styles( $handles = false ) {
    1820        do_action( 'wp_print_styles' );
     
    3032        return $wp_styles->do_items( $handles );
    3133}
    3234
     35/**
     36 * Register CSS style file.
     37 *
     38 * @since r79
     39 * @see WP_Styles::add() For parameter and additional information.
     40 */
    3341function wp_register_style( $handle, $src, $deps = array(), $ver = false, $media = false ) {
    3442        global $wp_styles;
    3543        if ( !is_a($wp_styles, 'WP_Styles') )
     
    3846        $wp_styles->add( $handle, $src, $deps, $ver, $media );
    3947}
    4048
     49/**
     50 * Remove a registered CSS file.
     51 *
     52 * @since r79
     53 * @see WP_Styles::remove() For parameter and additional information.
     54 */
    4155function wp_deregister_style( $handle ) {
    4256        global $wp_styles;
    4357        if ( !is_a($wp_styles, 'WP_Styles') )
     
    4660        $wp_styles->remove( $handle );
    4761}
    4862
     63/**
     64 * Enqueue a CSS style file.
     65 *
     66 * @since r79
     67 * @see WP_Styles::add(), WP_Styles::enqueue()
     68 */
    4969function wp_enqueue_style( $handle, $src = false, $deps = array(), $ver = false, $media = false ) {
    5070        global $wp_styles;
    5171        if ( !is_a($wp_styles, 'WP_Styles') )
  • wp-includes/general-template.php

     
    9393                load_template( get_theme_root() . '/default/sidebar.php');
    9494}
    9595
     96/**
     97 * Display search form.
     98 *
     99 * Will first attempt to locate the searchform.php file in either the child or
     100 * the parent, then load it. If it doesn't exist, then the default search form
     101 * will be displayed.
     102 *
     103 * @since 2.7.0
     104 */
    96105function get_search_form() {
    97106        do_action( 'get_search_form' );
    98107
  • wp-includes/link-template.php

     
    2828 * @since 2.2.0
    2929 * @uses $wp_rewrite
    3030 *
    31  * @param $string string a URL with or without a trailing slash
    32  * @param $type_of_url string the type of URL being considered (e.g. single, category, etc) for use in the filter
     31 * @param $string String a URL with or without a trailing slash
     32 * @param $type_of_url String the type of URL being considered (e.g. single, category, etc) for use in the filter
    3333 * @return string
    3434 */
    3535function user_trailingslashit($string, $type_of_url = '') {
     
    439439 * @subpackage Feed
    440440 * @since 2.5.0
    441441 *
    442  * @param string $link_text Descriptive text
     442 * @param string $link_text Descriptive text.
    443443 * @param int $post_id Optional post ID.  Default to current post.
    444  * @param string $feed Optional. {@internal Missing Description}}
    445  * @return string Link to the comment feed for the current post
     444 * @param string $feed Optional. Feed format.
     445 * @return string Link to the comment feed for the current post.
    446446*/
    447447function post_comments_feed_link( $link_text = '', $post_id = '', $feed = '' ) {
    448448        $url = get_post_comments_feed_link($post_id, $feed);
  • wp-includes/pluggable.php

     
    426426}
    427427endif;
    428428
     429if ( !function_exists('wp_authenticate') ) :
    429430/**
    430431 * Checks a user's login information and logs them in if it checks out.
    431432 *
    432  * @since 2.5
     433 * @since 2.5.0
    433434 *
    434435 * @param string $username User's username
    435436 * @param string $password User's password
    436437 * @return WP_Error|WP_User WP_User object if login successful, otherwise WP_Error object.
    437438 */
    438 if ( !function_exists('wp_authenticate') ) :
    439439function wp_authenticate($username, $password) {
    440440        $username = sanitize_user($username);
    441441
     
    467467}
    468468endif;
    469469
     470if ( !function_exists('wp_logout') ) :
    470471/**
    471472 * Log the current user out.
    472473 *
    473  * @since 2.5
     474 * @since 2.5.0
    474475 */
    475 if ( !function_exists('wp_logout') ) :
    476476function wp_logout() {
    477477        wp_clear_auth_cookie();
    478478        do_action('wp_logout');
  • wp-includes/rss.php

     
    1717 */
    1818do_action('load_feed_engine');
    1919
    20 
     20/** RSS feed constant. */
    2121define('RSS', 'RSS');
    2222define('ATOM', 'Atom');
    2323define('MAGPIE_USER_AGENT', 'WordPress/' . $GLOBALS['wp_version']);
  • wp-includes/script-loader.php

     
    298298 *
    299299 * @param object $styles
    300300 */
    301 
    302301function wp_default_styles( &$styles ) {
    303302        // This checks to see if site_url() returns something and if it does not
    304303        // then it assigns $guess_url to wp_guess_url(). Strange format, but it works.
     
    346345 * @param array $js_array JavaScript scripst array
    347346 * @return array Reordered array, if needed.
    348347 */
    349 
    350348function wp_prototype_before_jquery( $js_array ) {
    351349        if ( false === $jquery = array_search( 'jquery', $js_array ) )
    352350                return $js_array;
  • wp-settings.php

     
    1717
    1818
    1919/**
    20  * wp_unregister_GLOBALS() - Turn register globals off
     20 * Turn register globals off.
    2121 *
    2222 * @access private
    2323 * @since 2.1.0
     
    142142        die( /*WP_I18N_OLD_MYSQL*/'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.'/*/WP_I18N_OLD_MYSQL*/ );
    143143
    144144/**
    145  * timer_start() - PHP 4 standard microtime start capture
     145 * PHP 4 standard microtime start capture.
    146146 *
    147147 * @access private
    148148 * @since 0.71
    149  * @global int $timestart Seconds and Microseconds added together from when function is called
    150  * @return bool Always returns true
     149 * @global int $timestart Seconds and Microseconds added together from when function is called.
     150 * @return bool Always returns true.
    151151 */
    152152function timer_start() {
    153153        global $timestart;
     
    158158}
    159159
    160160/**
    161  * timer_stop() - Return and/or display the time from the page start to when function is called.
     161 * Return and/or display the time from the page start to when function is called.
    162162 *
    163163 * You can get the results and print them by doing:
    164164 * <code>
     
    315315/**
    316316 * Allows for the plugins directory to be moved from the default location.
    317317 *
    318  * @since 2.6
     318 * @since 2.6.0
    319319 */
    320320if ( !defined('WP_PLUGIN_DIR') )
    321321        define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' ); // full path, no trailing slash
     322
     323/**
     324 * Allows for the plugins directory to be moved from the default location.
     325 *
     326 * @since 2.6.0
     327 */
    322328if ( !defined('WP_PLUGIN_URL') )
    323329        define( 'WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins' ); // full url, no trailing slash
     330
     331/**
     332 * Allows for the plugins directory to be moved from the default location.
     333 *
     334 * @since 2.1.0
     335 */
    324336if ( !defined('PLUGINDIR') )
    325337        define( 'PLUGINDIR', 'wp-content/plugins' ); // Relative to ABSPATH.  For back compat.
    326338
     
    336348
    337349/**
    338350 * Should be exactly the same as the default value of SECRET_KEY in wp-config-sample.php
    339  * @since 2.5
     351 * @since 2.5.0
    340352 */
    341353$wp_default_secret_key = 'put your unique phrase here';
    342354
     
    356368
    357369/**
    358370 * It is possible to define this in wp-config.php
    359  * @since 2.5
     371 * @since 2.5.0
    360372 */
    361373if ( !defined('AUTH_COOKIE') )
    362374        define('AUTH_COOKIE', 'wordpress_' . COOKIEHASH);
    363375
    364376/**
    365377 * It is possible to define this in wp-config.php
    366  * @since 2.6
     378 * @since 2.6.0
    367379 */
    368380if ( !defined('SECURE_AUTH_COOKIE') )
    369381        define('SECURE_AUTH_COOKIE', 'wordpress_sec_' . COOKIEHASH);
    370382
    371383/**
    372384 * It is possible to define this in wp-config.php
    373  * @since 2.6
     385 * @since 2.6.0
    374386 */
    375387if ( !defined('LOGGED_IN_COOKIE') )
    376388        define('LOGGED_IN_COOKIE', 'wordpress_logged_in_' . COOKIEHASH);
     
    398410
    399411/**
    400412 * It is possible to define this in wp-config.php
    401  * @since 2.6
     413 * @since 2.6.0
    402414 */
    403415if ( !defined('ADMIN_COOKIE_PATH') )
    404416        define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . 'wp-admin' );
    405417
    406418/**
    407419 * It is possible to define this in wp-config.php
    408  * @since 2.6
     420 * @since 2.6.0
    409421 */
    410422if ( !defined('PLUGINS_COOKIE_PATH') )
    411423        define( 'PLUGINS_COOKIE_PATH', preg_replace('|https?://[^/]+|i', '', WP_PLUGIN_URL)  );
     
    419431
    420432/**
    421433 * It is possible to define this in wp-config.php
    422  * @since 2.6
     434 * @since 2.6.0
    423435 */
    424436if ( !defined('FORCE_SSL_ADMIN') )
    425437        define('FORCE_SSL_ADMIN', false);
     
    427439
    428440/**
    429441 * It is possible to define this in wp-config.php
    430  * @since 2.6
     442 * @since 2.6.0
    431443 */
    432444if ( !defined('FORCE_SSL_LOGIN') )
    433445        define('FORCE_SSL_LOGIN', false);
     
    529541
    530542/**
    531543 * Web Path to the current active template directory
    532  * @since 1.5
     544 * @since 1.5.0
    533545 */
    534546define('TEMPLATEPATH', get_template_directory());
    535547
    536548/**
    537549 * Web Path to the current active template stylesheet directory
    538  * @since 2.1
     550 * @since 2.1.0
    539551 */
    540552define('STYLESHEETPATH', get_stylesheet_directory());
    541553
     
    568580        include(TEMPLATEPATH . '/functions.php');
    569581
    570582/**
    571  * shutdown_action_hook() - Runs just before PHP shuts down execution.
     583 * Runs just before PHP shuts down execution.
    572584 *
    573585 * @access private
    574  * @since 1.2
     586 * @since 1.2.0
    575587 */
    576588function shutdown_action_hook() {
    577589        do_action('shutdown');