Edit File by line
/home/barbar84/www/wp-inclu...
File: plugin.php
[500] Fix | Delete
if ( ! isset( $wp_actions[ $tag ] ) ) {
[501] Fix | Delete
return 0;
[502] Fix | Delete
}
[503] Fix | Delete
[504] Fix | Delete
return $wp_actions[ $tag ];
[505] Fix | Delete
}
[506] Fix | Delete
[507] Fix | Delete
/**
[508] Fix | Delete
* Calls the callback functions that have been added to an action hook, specifying arguments in an array.
[509] Fix | Delete
*
[510] Fix | Delete
* @since 2.1.0
[511] Fix | Delete
*
[512] Fix | Delete
* @see do_action() This function is identical, but the arguments passed to the
[513] Fix | Delete
* functions hooked to `$tag` are supplied using an array.
[514] Fix | Delete
*
[515] Fix | Delete
* @global WP_Hook[] $wp_filter Stores all of the filters and actions.
[516] Fix | Delete
* @global int[] $wp_actions Stores the number of times each action was triggered.
[517] Fix | Delete
* @global string[] $wp_current_filter Stores the list of current filters with the current one last.
[518] Fix | Delete
*
[519] Fix | Delete
* @param string $tag The name of the action to be executed.
[520] Fix | Delete
* @param array $args The arguments supplied to the functions hooked to `$tag`.
[521] Fix | Delete
*/
[522] Fix | Delete
function do_action_ref_array( $tag, $args ) {
[523] Fix | Delete
global $wp_filter, $wp_actions, $wp_current_filter;
[524] Fix | Delete
[525] Fix | Delete
if ( ! isset( $wp_actions[ $tag ] ) ) {
[526] Fix | Delete
$wp_actions[ $tag ] = 1;
[527] Fix | Delete
} else {
[528] Fix | Delete
++$wp_actions[ $tag ];
[529] Fix | Delete
}
[530] Fix | Delete
[531] Fix | Delete
// Do 'all' actions first.
[532] Fix | Delete
if ( isset( $wp_filter['all'] ) ) {
[533] Fix | Delete
$wp_current_filter[] = $tag;
[534] Fix | Delete
$all_args = func_get_args(); // phpcs:ignore PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection
[535] Fix | Delete
_wp_call_all_hook( $all_args );
[536] Fix | Delete
}
[537] Fix | Delete
[538] Fix | Delete
if ( ! isset( $wp_filter[ $tag ] ) ) {
[539] Fix | Delete
if ( isset( $wp_filter['all'] ) ) {
[540] Fix | Delete
array_pop( $wp_current_filter );
[541] Fix | Delete
}
[542] Fix | Delete
return;
[543] Fix | Delete
}
[544] Fix | Delete
[545] Fix | Delete
if ( ! isset( $wp_filter['all'] ) ) {
[546] Fix | Delete
$wp_current_filter[] = $tag;
[547] Fix | Delete
}
[548] Fix | Delete
[549] Fix | Delete
$wp_filter[ $tag ]->do_action( $args );
[550] Fix | Delete
[551] Fix | Delete
array_pop( $wp_current_filter );
[552] Fix | Delete
}
[553] Fix | Delete
[554] Fix | Delete
/**
[555] Fix | Delete
* Checks if any action has been registered for a hook.
[556] Fix | Delete
*
[557] Fix | Delete
* When using the `$function_to_check` argument, this function may return a non-boolean value
[558] Fix | Delete
* that evaluates to false (e.g. 0), so use the `===` operator for testing the return value.
[559] Fix | Delete
*
[560] Fix | Delete
* @since 2.5.0
[561] Fix | Delete
*
[562] Fix | Delete
* @see has_filter() has_action() is an alias of has_filter().
[563] Fix | Delete
*
[564] Fix | Delete
* @param string $tag The name of the action hook.
[565] Fix | Delete
* @param callable|false $function_to_check Optional. The callback to check for. Default false.
[566] Fix | Delete
* @return bool|int If `$function_to_check` is omitted, returns boolean for whether the hook has
[567] Fix | Delete
* anything registered. When checking a specific function, the priority of that
[568] Fix | Delete
* hook is returned, or false if the function is not attached.
[569] Fix | Delete
*/
[570] Fix | Delete
function has_action( $tag, $function_to_check = false ) {
[571] Fix | Delete
return has_filter( $tag, $function_to_check );
[572] Fix | Delete
}
[573] Fix | Delete
[574] Fix | Delete
/**
[575] Fix | Delete
* Removes a function from a specified action hook.
[576] Fix | Delete
*
[577] Fix | Delete
* This function removes a function attached to a specified action hook. This
[578] Fix | Delete
* method can be used to remove default functions attached to a specific filter
[579] Fix | Delete
* hook and possibly replace them with a substitute.
[580] Fix | Delete
*
[581] Fix | Delete
* @since 1.2.0
[582] Fix | Delete
*
[583] Fix | Delete
* @param string $tag The action hook to which the function to be removed is hooked.
[584] Fix | Delete
* @param callable $function_to_remove The name of the function which should be removed.
[585] Fix | Delete
* @param int $priority Optional. The priority of the function. Default 10.
[586] Fix | Delete
* @return bool Whether the function is removed.
[587] Fix | Delete
*/
[588] Fix | Delete
function remove_action( $tag, $function_to_remove, $priority = 10 ) {
[589] Fix | Delete
return remove_filter( $tag, $function_to_remove, $priority );
[590] Fix | Delete
}
[591] Fix | Delete
[592] Fix | Delete
/**
[593] Fix | Delete
* Remove all of the hooks from an action.
[594] Fix | Delete
*
[595] Fix | Delete
* @since 2.7.0
[596] Fix | Delete
*
[597] Fix | Delete
* @param string $tag The action to remove hooks from.
[598] Fix | Delete
* @param int|false $priority The priority number to remove them from. Default false.
[599] Fix | Delete
* @return true True when finished.
[600] Fix | Delete
*/
[601] Fix | Delete
function remove_all_actions( $tag, $priority = false ) {
[602] Fix | Delete
return remove_all_filters( $tag, $priority );
[603] Fix | Delete
}
[604] Fix | Delete
[605] Fix | Delete
/**
[606] Fix | Delete
* Fires functions attached to a deprecated filter hook.
[607] Fix | Delete
*
[608] Fix | Delete
* When a filter hook is deprecated, the apply_filters() call is replaced with
[609] Fix | Delete
* apply_filters_deprecated(), which triggers a deprecation notice and then fires
[610] Fix | Delete
* the original filter hook.
[611] Fix | Delete
*
[612] Fix | Delete
* Note: the value and extra arguments passed to the original apply_filters() call
[613] Fix | Delete
* must be passed here to `$args` as an array. For example:
[614] Fix | Delete
*
[615] Fix | Delete
* // Old filter.
[616] Fix | Delete
* return apply_filters( 'wpdocs_filter', $value, $extra_arg );
[617] Fix | Delete
*
[618] Fix | Delete
* // Deprecated.
[619] Fix | Delete
* return apply_filters_deprecated( 'wpdocs_filter', array( $value, $extra_arg ), '4.9.0', 'wpdocs_new_filter' );
[620] Fix | Delete
*
[621] Fix | Delete
* @since 4.6.0
[622] Fix | Delete
*
[623] Fix | Delete
* @see _deprecated_hook()
[624] Fix | Delete
*
[625] Fix | Delete
* @param string $tag The name of the filter hook.
[626] Fix | Delete
* @param array $args Array of additional function arguments to be passed to apply_filters().
[627] Fix | Delete
* @param string $version The version of WordPress that deprecated the hook.
[628] Fix | Delete
* @param string $replacement Optional. The hook that should have been used. Default empty.
[629] Fix | Delete
* @param string $message Optional. A message regarding the change. Default empty.
[630] Fix | Delete
*/
[631] Fix | Delete
function apply_filters_deprecated( $tag, $args, $version, $replacement = '', $message = '' ) {
[632] Fix | Delete
if ( ! has_filter( $tag ) ) {
[633] Fix | Delete
return $args[0];
[634] Fix | Delete
}
[635] Fix | Delete
[636] Fix | Delete
_deprecated_hook( $tag, $version, $replacement, $message );
[637] Fix | Delete
[638] Fix | Delete
return apply_filters_ref_array( $tag, $args );
[639] Fix | Delete
}
[640] Fix | Delete
[641] Fix | Delete
/**
[642] Fix | Delete
* Fires functions attached to a deprecated action hook.
[643] Fix | Delete
*
[644] Fix | Delete
* When an action hook is deprecated, the do_action() call is replaced with
[645] Fix | Delete
* do_action_deprecated(), which triggers a deprecation notice and then fires
[646] Fix | Delete
* the original hook.
[647] Fix | Delete
*
[648] Fix | Delete
* @since 4.6.0
[649] Fix | Delete
*
[650] Fix | Delete
* @see _deprecated_hook()
[651] Fix | Delete
*
[652] Fix | Delete
* @param string $tag The name of the action hook.
[653] Fix | Delete
* @param array $args Array of additional function arguments to be passed to do_action().
[654] Fix | Delete
* @param string $version The version of WordPress that deprecated the hook.
[655] Fix | Delete
* @param string $replacement Optional. The hook that should have been used. Default empty.
[656] Fix | Delete
* @param string $message Optional. A message regarding the change. Default empty.
[657] Fix | Delete
*/
[658] Fix | Delete
function do_action_deprecated( $tag, $args, $version, $replacement = '', $message = '' ) {
[659] Fix | Delete
if ( ! has_action( $tag ) ) {
[660] Fix | Delete
return;
[661] Fix | Delete
}
[662] Fix | Delete
[663] Fix | Delete
_deprecated_hook( $tag, $version, $replacement, $message );
[664] Fix | Delete
[665] Fix | Delete
do_action_ref_array( $tag, $args );
[666] Fix | Delete
}
[667] Fix | Delete
[668] Fix | Delete
//
[669] Fix | Delete
// Functions for handling plugins.
[670] Fix | Delete
//
[671] Fix | Delete
[672] Fix | Delete
/**
[673] Fix | Delete
* Gets the basename of a plugin.
[674] Fix | Delete
*
[675] Fix | Delete
* This method extracts the name of a plugin from its filename.
[676] Fix | Delete
*
[677] Fix | Delete
* @since 1.5.0
[678] Fix | Delete
*
[679] Fix | Delete
* @global array $wp_plugin_paths
[680] Fix | Delete
*
[681] Fix | Delete
* @param string $file The filename of plugin.
[682] Fix | Delete
* @return string The name of a plugin.
[683] Fix | Delete
*/
[684] Fix | Delete
function plugin_basename( $file ) {
[685] Fix | Delete
global $wp_plugin_paths;
[686] Fix | Delete
[687] Fix | Delete
// $wp_plugin_paths contains normalized paths.
[688] Fix | Delete
$file = wp_normalize_path( $file );
[689] Fix | Delete
[690] Fix | Delete
arsort( $wp_plugin_paths );
[691] Fix | Delete
foreach ( $wp_plugin_paths as $dir => $realdir ) {
[692] Fix | Delete
if ( strpos( $file, $realdir ) === 0 ) {
[693] Fix | Delete
$file = $dir . substr( $file, strlen( $realdir ) );
[694] Fix | Delete
}
[695] Fix | Delete
}
[696] Fix | Delete
[697] Fix | Delete
$plugin_dir = wp_normalize_path( WP_PLUGIN_DIR );
[698] Fix | Delete
$mu_plugin_dir = wp_normalize_path( WPMU_PLUGIN_DIR );
[699] Fix | Delete
[700] Fix | Delete
// Get relative path from plugins directory.
[701] Fix | Delete
$file = preg_replace( '#^' . preg_quote( $plugin_dir, '#' ) . '/|^' . preg_quote( $mu_plugin_dir, '#' ) . '/#', '', $file );
[702] Fix | Delete
$file = trim( $file, '/' );
[703] Fix | Delete
return $file;
[704] Fix | Delete
}
[705] Fix | Delete
[706] Fix | Delete
/**
[707] Fix | Delete
* Register a plugin's real path.
[708] Fix | Delete
*
[709] Fix | Delete
* This is used in plugin_basename() to resolve symlinked paths.
[710] Fix | Delete
*
[711] Fix | Delete
* @since 3.9.0
[712] Fix | Delete
*
[713] Fix | Delete
* @see wp_normalize_path()
[714] Fix | Delete
*
[715] Fix | Delete
* @global array $wp_plugin_paths
[716] Fix | Delete
*
[717] Fix | Delete
* @param string $file Known path to the file.
[718] Fix | Delete
* @return bool Whether the path was able to be registered.
[719] Fix | Delete
*/
[720] Fix | Delete
function wp_register_plugin_realpath( $file ) {
[721] Fix | Delete
global $wp_plugin_paths;
[722] Fix | Delete
[723] Fix | Delete
// Normalize, but store as static to avoid recalculation of a constant value.
[724] Fix | Delete
static $wp_plugin_path = null, $wpmu_plugin_path = null;
[725] Fix | Delete
if ( ! isset( $wp_plugin_path ) ) {
[726] Fix | Delete
$wp_plugin_path = wp_normalize_path( WP_PLUGIN_DIR );
[727] Fix | Delete
$wpmu_plugin_path = wp_normalize_path( WPMU_PLUGIN_DIR );
[728] Fix | Delete
}
[729] Fix | Delete
[730] Fix | Delete
$plugin_path = wp_normalize_path( dirname( $file ) );
[731] Fix | Delete
$plugin_realpath = wp_normalize_path( dirname( realpath( $file ) ) );
[732] Fix | Delete
[733] Fix | Delete
if ( $plugin_path === $wp_plugin_path || $plugin_path === $wpmu_plugin_path ) {
[734] Fix | Delete
return false;
[735] Fix | Delete
}
[736] Fix | Delete
[737] Fix | Delete
if ( $plugin_path !== $plugin_realpath ) {
[738] Fix | Delete
$wp_plugin_paths[ $plugin_path ] = $plugin_realpath;
[739] Fix | Delete
}
[740] Fix | Delete
[741] Fix | Delete
return true;
[742] Fix | Delete
}
[743] Fix | Delete
[744] Fix | Delete
/**
[745] Fix | Delete
* Get the filesystem directory path (with trailing slash) for the plugin __FILE__ passed in.
[746] Fix | Delete
*
[747] Fix | Delete
* @since 2.8.0
[748] Fix | Delete
*
[749] Fix | Delete
* @param string $file The filename of the plugin (__FILE__).
[750] Fix | Delete
* @return string the filesystem path of the directory that contains the plugin.
[751] Fix | Delete
*/
[752] Fix | Delete
function plugin_dir_path( $file ) {
[753] Fix | Delete
return trailingslashit( dirname( $file ) );
[754] Fix | Delete
}
[755] Fix | Delete
[756] Fix | Delete
/**
[757] Fix | Delete
* Get the URL directory path (with trailing slash) for the plugin __FILE__ passed in.
[758] Fix | Delete
*
[759] Fix | Delete
* @since 2.8.0
[760] Fix | Delete
*
[761] Fix | Delete
* @param string $file The filename of the plugin (__FILE__).
[762] Fix | Delete
* @return string the URL path of the directory that contains the plugin.
[763] Fix | Delete
*/
[764] Fix | Delete
function plugin_dir_url( $file ) {
[765] Fix | Delete
return trailingslashit( plugins_url( '', $file ) );
[766] Fix | Delete
}
[767] Fix | Delete
[768] Fix | Delete
/**
[769] Fix | Delete
* Set the activation hook for a plugin.
[770] Fix | Delete
*
[771] Fix | Delete
* When a plugin is activated, the action 'activate_PLUGINNAME' hook is
[772] Fix | Delete
* called. In the name of this hook, PLUGINNAME is replaced with the name
[773] Fix | Delete
* of the plugin, including the optional subdirectory. For example, when the
[774] Fix | Delete
* plugin is located in wp-content/plugins/sampleplugin/sample.php, then
[775] Fix | Delete
* the name of this hook will become 'activate_sampleplugin/sample.php'.
[776] Fix | Delete
*
[777] Fix | Delete
* When the plugin consists of only one file and is (as by default) located at
[778] Fix | Delete
* wp-content/plugins/sample.php the name of this hook will be
[779] Fix | Delete
* 'activate_sample.php'.
[780] Fix | Delete
*
[781] Fix | Delete
* @since 2.0.0
[782] Fix | Delete
*
[783] Fix | Delete
* @param string $file The filename of the plugin including the path.
[784] Fix | Delete
* @param callable $function The function hooked to the 'activate_PLUGIN' action.
[785] Fix | Delete
*/
[786] Fix | Delete
function register_activation_hook( $file, $function ) {
[787] Fix | Delete
$file = plugin_basename( $file );
[788] Fix | Delete
add_action( 'activate_' . $file, $function );
[789] Fix | Delete
}
[790] Fix | Delete
[791] Fix | Delete
/**
[792] Fix | Delete
* Set the deactivation hook for a plugin.
[793] Fix | Delete
*
[794] Fix | Delete
* When a plugin is deactivated, the action 'deactivate_PLUGINNAME' hook is
[795] Fix | Delete
* called. In the name of this hook, PLUGINNAME is replaced with the name
[796] Fix | Delete
* of the plugin, including the optional subdirectory. For example, when the
[797] Fix | Delete
* plugin is located in wp-content/plugins/sampleplugin/sample.php, then
[798] Fix | Delete
* the name of this hook will become 'deactivate_sampleplugin/sample.php'.
[799] Fix | Delete
*
[800] Fix | Delete
* When the plugin consists of only one file and is (as by default) located at
[801] Fix | Delete
* wp-content/plugins/sample.php the name of this hook will be
[802] Fix | Delete
* 'deactivate_sample.php'.
[803] Fix | Delete
*
[804] Fix | Delete
* @since 2.0.0
[805] Fix | Delete
*
[806] Fix | Delete
* @param string $file The filename of the plugin including the path.
[807] Fix | Delete
* @param callable $function The function hooked to the 'deactivate_PLUGIN' action.
[808] Fix | Delete
*/
[809] Fix | Delete
function register_deactivation_hook( $file, $function ) {
[810] Fix | Delete
$file = plugin_basename( $file );
[811] Fix | Delete
add_action( 'deactivate_' . $file, $function );
[812] Fix | Delete
}
[813] Fix | Delete
[814] Fix | Delete
/**
[815] Fix | Delete
* Set the uninstallation hook for a plugin.
[816] Fix | Delete
*
[817] Fix | Delete
* Registers the uninstall hook that will be called when the user clicks on the
[818] Fix | Delete
* uninstall link that calls for the plugin to uninstall itself. The link won't
[819] Fix | Delete
* be active unless the plugin hooks into the action.
[820] Fix | Delete
*
[821] Fix | Delete
* The plugin should not run arbitrary code outside of functions, when
[822] Fix | Delete
* registering the uninstall hook. In order to run using the hook, the plugin
[823] Fix | Delete
* will have to be included, which means that any code laying outside of a
[824] Fix | Delete
* function will be run during the uninstallation process. The plugin should not
[825] Fix | Delete
* hinder the uninstallation process.
[826] Fix | Delete
*
[827] Fix | Delete
* If the plugin can not be written without running code within the plugin, then
[828] Fix | Delete
* the plugin should create a file named 'uninstall.php' in the base plugin
[829] Fix | Delete
* folder. This file will be called, if it exists, during the uninstallation process
[830] Fix | Delete
* bypassing the uninstall hook. The plugin, when using the 'uninstall.php'
[831] Fix | Delete
* should always check for the 'WP_UNINSTALL_PLUGIN' constant, before
[832] Fix | Delete
* executing.
[833] Fix | Delete
*
[834] Fix | Delete
* @since 2.7.0
[835] Fix | Delete
*
[836] Fix | Delete
* @param string $file Plugin file.
[837] Fix | Delete
* @param callable $callback The callback to run when the hook is called. Must be
[838] Fix | Delete
* a static method or function.
[839] Fix | Delete
*/
[840] Fix | Delete
function register_uninstall_hook( $file, $callback ) {
[841] Fix | Delete
if ( is_array( $callback ) && is_object( $callback[0] ) ) {
[842] Fix | Delete
_doing_it_wrong( __FUNCTION__, __( 'Only a static class method or function can be used in an uninstall hook.' ), '3.1.0' );
[843] Fix | Delete
return;
[844] Fix | Delete
}
[845] Fix | Delete
[846] Fix | Delete
/*
[847] Fix | Delete
* The option should not be autoloaded, because it is not needed in most
[848] Fix | Delete
* cases. Emphasis should be put on using the 'uninstall.php' way of
[849] Fix | Delete
* uninstalling the plugin.
[850] Fix | Delete
*/
[851] Fix | Delete
$uninstallable_plugins = (array) get_option( 'uninstall_plugins' );
[852] Fix | Delete
$plugin_basename = plugin_basename( $file );
[853] Fix | Delete
if ( ! isset( $uninstallable_plugins[ $plugin_basename ] ) || $uninstallable_plugins[ $plugin_basename ] !== $callback ) {
[854] Fix | Delete
$uninstallable_plugins[ $plugin_basename ] = $callback;
[855] Fix | Delete
update_option( 'uninstall_plugins', $uninstallable_plugins );
[856] Fix | Delete
}
[857] Fix | Delete
}
[858] Fix | Delete
[859] Fix | Delete
/**
[860] Fix | Delete
* Call the 'all' hook, which will process the functions hooked into it.
[861] Fix | Delete
*
[862] Fix | Delete
* The 'all' hook passes all of the arguments or parameters that were used for
[863] Fix | Delete
* the hook, which this function was called for.
[864] Fix | Delete
*
[865] Fix | Delete
* This function is used internally for apply_filters(), do_action(), and
[866] Fix | Delete
* do_action_ref_array() and is not meant to be used from outside those
[867] Fix | Delete
* functions. This function does not check for the existence of the all hook, so
[868] Fix | Delete
* it will fail unless the all hook exists prior to this function call.
[869] Fix | Delete
*
[870] Fix | Delete
* @since 2.5.0
[871] Fix | Delete
* @access private
[872] Fix | Delete
*
[873] Fix | Delete
* @global WP_Hook[] $wp_filter Stores all of the filters and actions.
[874] Fix | Delete
*
[875] Fix | Delete
* @param array $args The collected parameters from the hook that was called.
[876] Fix | Delete
*/
[877] Fix | Delete
function _wp_call_all_hook( $args ) {
[878] Fix | Delete
global $wp_filter;
[879] Fix | Delete
[880] Fix | Delete
$wp_filter['all']->do_all_hook( $args );
[881] Fix | Delete
}
[882] Fix | Delete
[883] Fix | Delete
/**
[884] Fix | Delete
* Build Unique ID for storage and retrieval.
[885] Fix | Delete
*
[886] Fix | Delete
* The old way to serialize the callback caused issues and this function is the
[887] Fix | Delete
* solution. It works by checking for objects and creating a new property in
[888] Fix | Delete
* the class to keep track of the object and new objects of the same class that
[889] Fix | Delete
* need to be added.
[890] Fix | Delete
*
[891] Fix | Delete
* It also allows for the removal of actions and filters for objects after they
[892] Fix | Delete
* change class properties. It is possible to include the property $wp_filter_id
[893] Fix | Delete
* in your class and set it to "null" or a number to bypass the workaround.
[894] Fix | Delete
* However this will prevent you from adding new classes and any new classes
[895] Fix | Delete
* will overwrite the previous hook by the same class.
[896] Fix | Delete
*
[897] Fix | Delete
* Functions and static method callbacks are just returned as strings and
[898] Fix | Delete
* shouldn't have any speed penalty.
[899] Fix | Delete
*
[900] Fix | Delete
* @link https://core.trac.wordpress.org/ticket/3875
[901] Fix | Delete
*
[902] Fix | Delete
* @since 2.2.3
[903] Fix | Delete
* @since 5.3.0 Removed workarounds for spl_object_hash().
[904] Fix | Delete
* `$tag` and `$priority` are no longer used,
[905] Fix | Delete
* and the function always returns a string.
[906] Fix | Delete
* @access private
[907] Fix | Delete
*
[908] Fix | Delete
* @param string $tag Unused. The name of the filter to build ID for.
[909] Fix | Delete
* @param callable $function The function to generate ID for.
[910] Fix | Delete
* @param int $priority Unused. The order in which the functions
[911] Fix | Delete
* associated with a particular action are executed.
[912] Fix | Delete
* @return string Unique function ID for usage as array key.
[913] Fix | Delete
*/
[914] Fix | Delete
function _wp_filter_build_unique_id( $tag, $function, $priority ) {
[915] Fix | Delete
if ( is_string( $function ) ) {
[916] Fix | Delete
return $function;
[917] Fix | Delete
}
[918] Fix | Delete
[919] Fix | Delete
if ( is_object( $function ) ) {
[920] Fix | Delete
// Closures are currently implemented as objects.
[921] Fix | Delete
$function = array( $function, '' );
[922] Fix | Delete
} else {
[923] Fix | Delete
$function = (array) $function;
[924] Fix | Delete
}
[925] Fix | Delete
[926] Fix | Delete
if ( is_object( $function[0] ) ) {
[927] Fix | Delete
// Object class calling.
[928] Fix | Delete
return spl_object_hash( $function[0] ) . $function[1];
[929] Fix | Delete
} elseif ( is_string( $function[0] ) ) {
[930] Fix | Delete
// Static calling.
[931] Fix | Delete
return $function[0] . '::' . $function[1];
[932] Fix | Delete
}
[933] Fix | Delete
}
[934] Fix | Delete
[935] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function