Example #1
0
/**
 * Check if we're
 * viewing from
 * local machine
 *
 * @deprecated 1.6.0
 *
 * @since 1.0.0
 */
function is_localhost()
{
    __deprecated(__FUNCTION__, 'This function will be removed as of 2.0.0');
    $hosts = array('127.0.0.1', '::1', 'localhost');
    $hosts = BP\Filters::apply('is_localhost', $hosts);
    return in_array($_SERVER['REMOTE_ADDR'], $hosts);
}
Example #2
0
 /**
  * @brief Shorthand for new ImageFont(name,size)
  *
  * @param string $fontname The name of the font to load
  * @param integer $fontsize The size of the font to load
  * @return Font The font
  */
 function createFont($fontname, $fontsize)
 {
     __deprecated('canvas::createFont()', 'new TruetypeFont()');
     return new TruetypeFont($fontname, $fontsize);
 }
Example #3
0
 /**
  * Find a user in the database. Deprecated in favor of User::find()
  *
  * @deprecated since 1.0.0
  * @param string $username
  * @return UserRecord The user record if any. Null otherwise.
  */
 static function findUser($username)
 {
     __deprecated('user::findUser', 'user::find');
     return user::find($username);
 }