mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-03 22:27:04 +00:00
After [33891], get_comment() returns global $comment if no args are passed and the global is set (after setting the default to null here). This allows us to ditch global comment imports.
See #33638. git-svn-id: https://develop.svn.wordpress.org/trunk@33963 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -169,7 +169,7 @@ function get_approved_comments( $post_id, $args = array() ) {
|
||||
* @param string $output Optional. OBJECT or ARRAY_A or ARRAY_N constants.
|
||||
* @return WP_Comment|array|null Depends on $output value.
|
||||
*/
|
||||
function get_comment(&$comment, $output = OBJECT) {
|
||||
function get_comment( &$comment = null, $output = OBJECT ) {
|
||||
if ( empty( $comment ) && isset( $GLOBALS['comment'] ) ) {
|
||||
$comment = $GLOBALS['comment'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user