WordPress.org

Make WordPress Core

Ticket #5053: plugin.6159.phpdoc.patch

File plugin.6159.phpdoc.patch, 1.5 KB (added by darkdragon, 7 years ago)

Adds phpdoc documentation to last function in file.

  • plugin.php

     
    283283        add_action('deactivate_' . $file, $function); 
    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{ 
    288315        global $wp_filter;