本文整理匯總了PHP中GF_Field::deprecation_notice_fired方法的典型用法代碼示例。如果您正苦於以下問題:PHP GF_Field::deprecation_notice_fired方法的具體用法?PHP GF_Field::deprecation_notice_fired怎麽用?PHP GF_Field::deprecation_notice_fired使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類GF_Field
的用法示例。
在下文中一共展示了GF_Field::deprecation_notice_fired方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: maybe_fire_array_access_deprecation_notice
private function maybe_fire_array_access_deprecation_notice($offset)
{
if (self::SUPPRESS_DEPRECATION_NOTICE) {
return;
}
if (!self::$deprecation_notice_fired) {
_deprecated_function('Array access to the field object is now deprecated. Further notices will be suppressed. Offset: ' . $offset, '1.9', 'the object operator e.g. $field->' . $offset);
self::$deprecation_notice_fired = true;
}
}
示例2: maybe_fire_array_access_deprecation_notice
/**
* Fires the deprecation notice only once per page. Not fired during AJAX requests.
*
* @param string $offset The array key being accessed.
*/
private function maybe_fire_array_access_deprecation_notice($offset)
{
if (self::SUPPRESS_DEPRECATION_NOTICE) {
return;
}
if (defined('DOING_AJAX') && DOING_AJAX) {
return;
}
if (!self::$deprecation_notice_fired) {
_deprecated_function("Array access to the field object is now deprecated. Further notices will be suppressed. \$field['" . $offset . "']", '2.0', 'the object operator e.g. $field->' . $offset);
self::$deprecation_notice_fired = true;
}
}