WordPress.org

Make WordPress Core

Changeset 6200


Ignore:
Timestamp:
10/07/07 07:31:14 (8 years ago)
Author:
westi
Message:

Add documentation of _wp_filter_build_unique_id(). Fixed #5053 props darkdragon.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/plugin.php

    r6026 r6200  
    284284} 
    285285 
     286/** 
     287 * @access private 
     288 * 
     289 * _wp_filter_build_unique_id() - Build Unique ID for storage and retrieval 
     290 * 
     291 * This function is used to fix the issue where serialized, when used with  
     292 * classes that updated their properties, wouldn't be able to remove actions. 
     293 * 
     294 * How it works is that it first checks if the $function parameter is a string 
     295 * and passes it through, untouched. Functions won't need to be changed, since 
     296 * there can only be one declared. 
     297 *  
     298 * The second type that will be passed through untouched, is for static methods 
     299 * in classes. They don't need to be changed since they are much like functions 
     300 * in that you can only call one of them. 
     301 * 
     302 * The main purpose of this function is for classes, which can have more than 
     303 * one declared and you want to add more than one hook for each one that is  
     304 * declared, or want to change properties internal of the class that you declared 
     305 * the hook. 
     306 * 
     307 * @global $wp_filter 
     308 * @param string $tag Used in counting how many hooks were applied 
     309 * @param string|array $function Used for creating unique id 
     310 * @param int $priority Used in counting how many hooks were applied 
     311 * @return string Unique ID for usage as array key 
     312 */ 
    286313function _wp_filter_build_unique_id($tag, $function, $priority = 10) 
    287314{ 
Note: See TracChangeset for help on using the changeset viewer.