_deprecated_function [ WordPress Function ]
| Access: |
|
| Parameters: |
|
| Uses: | |
| Defined at: |
|
Marks a function as deprecated and informs when it has been used.
There is a hook deprecated_function_run that will be called that can be used to get the backtrace up to what file and function called the deprecated function.
The current behavior is to trigger a user error if WP_DEBUG is true.
This function is to be used in every function that is deprecated.
Source
<?php
function _deprecated_function( $function, $version, $replacement = null ) {
do_action( 'deprecated_function_run', $function, $replacement, $version );
// Allow plugin to filter the output error trigger
if ( WP_DEBUG && apply_filters( 'deprecated_function_trigger_error', true ) ) {
if ( ! is_null($replacement) )
trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.'), $function, $version, $replacement ) );
else
trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.'), $function, $version ) );
}
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- _deprecated_function (WordPress Function) - WPSeek.com
WordPress lookup for _deprecated_function, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers and theme authors.
wpseek.com - Deprecation - Wikipedia, the free encyclopedia
The GNU C Library. GNU. http://www.gnu.org/software/libc/manual/html_node/ Line-Input.html#Line-Input. Retrieved 2008-08-02. "Deprecated function: char ...
en.wikipedia.org - <?php /** * Deprecated functions that should be avoided in favor of ...
"\n"; echo apply_atomic( 'doctype', $doctype ); } /** * @since 0.4.0 * @deprecated 1.0.0 */ function hybrid_meta_content_type() { _deprecated_function( ...
svn.locallylost.com - <?php /** * These are for backwards compatibility with the free The ...
Deprecated in favor of return tribe_ */ function sp_get_option($optionName, $ default = '') { _deprecated_function( __FUNCTION__, '2.0', 'tribe_get_option()' ) ...
plugins.svn.wordpress.org