Make WordPress Core


Ignore:
Timestamp:
10/15/2024 11:39:38 PM (3 weeks ago)
Author:
peterwilsoncc
Message:

Networks and Sites: Relocate defintion of absint().

Relocate the defintion of absint() to load.php to allow it to be available to get_current_blog_id() and get_current_network_id(). These functions may be called by caching drop-ins, prior to the loading of functions.php.

Props flixos90, geekofshire, johnjamesjacoby, sergeybiryukov, wonderboymusic.
Fixes #40682.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r59192 r59242  
    54785478
    54795479/**
    5480  * Converts a value to non-negative integer.
    5481  *
    5482  * @since 2.5.0
    5483  *
    5484  * @param mixed $maybeint Data you wish to have converted to a non-negative integer.
    5485  * @return int A non-negative integer.
    5486  */
    5487 function absint( $maybeint ) {
    5488     return abs( (int) $maybeint );
    5489 }
    5490 
    5491 /**
    54925480 * Marks a function as deprecated and inform when it has been used.
    54935481 *
Note: See TracChangeset for help on using the changeset viewer.