wc_get_path_define_tokens()WC 1.0

Fetches an array containing all of the configurable path constants to be used in tokenization.

Хуки из функции

Возвращает

Массив. The key is the define and the path is the constant.

Использование

wc_get_path_define_tokens();

Код wc_get_path_define_tokens() WC 8.7.0

function wc_get_path_define_tokens() {
	$defines = array(
		'ABSPATH',
		'WP_CONTENT_DIR',
		'WP_PLUGIN_DIR',
		'WPMU_PLUGIN_DIR',
		'PLUGINDIR',
		'WP_THEME_DIR',
	);

	$path_tokens = array();
	foreach ( $defines as $define ) {
		if ( defined( $define ) ) {
			$path_tokens[ $define ] = constant( $define );
		}
	}

	return apply_filters( 'woocommerce_get_path_define_tokens', $path_tokens );
}