/data/7/7/77ca334a-709b-4d46-9bb5-8cb6b6696236/mstein.eu/sub/new2021/wp-content/plugins/wpml-string-translation/classes/MO/Hooks/LanguageSwitch.php
$cachedMoObjects = isset( self::$globals_cache[ $new_locale ]['l10n'] )
? self::$globals_cache[ $new_locale ]['l10n']
: [];
/**
* The JustInTimeMO objects will replaced themselves on the fly
* by the legacy default MO object if a string is translated.
* This is because the function "_load_textdomain_just_in_time"
* does not support the default domain and MO files outside the
* "wp-content/languages" folder.
*/
$GLOBALS['l10n'] = $this->jit_mo_factory->get( $new_locale, $this->getUnloadedDomains(), $cachedMoObjects );
}
private function resetTranslationAvailabilityInformation() {
global $wp_textdomain_registry;
if ( $wp_textdomain_registry ) {
$wp_textdomain_registry->reset();
} elseif ( function_exists( '_get_path_to_translation' ) ) {
_get_path_to_translation( null, true );
}
}
/**
* @param string $locale
*
* @return string
*/
public function filterLocale( $locale ) {
$currentLocale = $this->getCurrentLocale();
if ( $currentLocale ) {
return $currentLocale;
}
return $locale;
}
Arguments
"Call to undefined method WP_Textdomain_Registry::reset()"
/data/7/7/77ca334a-709b-4d46-9bb5-8cb6b6696236/mstein.eu/sub/new2021/wp-content/plugins/wpml-string-translation/classes/MO/Hooks/LanguageSwitch.php
* @param string $new_locale
*/
private function changeWpLocale( $new_locale ) {
if ( isset( self::$globals_cache[ $new_locale ]['wp_locale'] ) ) {
$GLOBALS['wp_locale'] = self::$globals_cache[ $new_locale ]['wp_locale'];
} else {
/**
* WPLocaleProxy is a wrapper of \WP_Locale with a kind of lazy initialization
* to avoid loading the default domain for strings that
* we don't use in this transitory language.
*/
$GLOBALS['wp_locale'] = new WPLocaleProxy();
}
}
/**
* @param string $new_locale
*/
private function changeMoObjects( $new_locale ) {
$this->resetTranslationAvailabilityInformation();
$cachedMoObjects = isset( self::$globals_cache[ $new_locale ]['l10n'] )
? self::$globals_cache[ $new_locale ]['l10n']
: [];
/**
* The JustInTimeMO objects will replaced themselves on the fly
* by the legacy default MO object if a string is translated.
* This is because the function "_load_textdomain_just_in_time"
* does not support the default domain and MO files outside the
* "wp-content/languages" folder.
*/
$GLOBALS['l10n'] = $this->jit_mo_factory->get( $new_locale, $this->getUnloadedDomains(), $cachedMoObjects );
}
private function resetTranslationAvailabilityInformation() {
global $wp_textdomain_registry;
if ( $wp_textdomain_registry ) {
$wp_textdomain_registry->reset();
/data/7/7/77ca334a-709b-4d46-9bb5-8cb6b6696236/mstein.eu/sub/new2021/wp-content/plugins/wpml-string-translation/classes/MO/Hooks/LanguageSwitch.php
$this->setCurrentLocale( $this->language_resolution->getCurrentLocale() );
}
}
/**
* This method will act as the WP Core function `switch_to_locale`,
* but in a more efficient way. It will avoid to instantly load
* the domains loaded in the previous locale. Instead, it will let
* the domains be loaded via the "just in time" function.
*
* @param string $new_locale
*/
public function switchToLocale( $new_locale ) {
if ( $new_locale === $this->getCurrentLocale() ) {
return;
}
$this->updateCurrentGlobalsCache();
$this->changeWpLocale( $new_locale );
$this->changeMoObjects( $new_locale );
$this->setCurrentLocale( $new_locale );
}
/**
* @param string|null $locale
*/
public static function resetCache( $locale = null ) {
self::$current_locale = $locale;
self::$globals_cache = [];
}
/**
* We need to take a new copy of the current locale globals
* because some domains could have been added with the "just in time"
* mechanism.
*/
private function updateCurrentGlobalsCache() {
$cache = [
'wp_locale' => isset( $GLOBALS['wp_locale'] ) ? $GLOBALS['wp_locale'] : null,
'l10n' => isset( $GLOBALS['l10n'] ) ? (array) $GLOBALS['l10n'] : [],
Arguments
/data/7/7/77ca334a-709b-4d46-9bb5-8cb6b6696236/mstein.eu/sub/new2021/wp-content/plugins/wpml-string-translation/classes/TranslateWpmlString.php
$domain,
$this->fileManager->getFilepath( $domain, $locale )
);
self::$loadedDomains[ $locale ][ $domain ] = true;
}
}
/**
* @param string $targetLang
* @param callable $function
*
* @return string
*/
private function withMOLocale( $targetLang, $function ) {
$initialLocale = $this->languageSwitch->getCurrentLocale();
if ( $targetLang ) {
$targetLocale = $this->locale->get_locale( $targetLang );
$this->languageSwitch->switchToLocale( $targetLocale );
$result = $function( $targetLocale );
$this->languageSwitch->switchToLocale( $initialLocale );
} else {
$result = $function( $initialLocale );
}
return $result;
}
/**
* We will allow MO translation only when
* the original is not empty.
*
* We also need to make sure we deal with a
* WPML registered string (not gettext).
*
* If those conditions are not fulfilled,
* we will translate from the database.
*
* @param string $original
Arguments
/data/7/7/77ca334a-709b-4d46-9bb5-8cb6b6696236/mstein.eu/sub/new2021/wp-content/plugins/wpml-string-translation/classes/TranslateWpmlString.php
* @param bool $value
* @param null|bool $hasTranslation
* @param null|string $targetLang
*
* @return string
*/
private function translateByMOFile( $wpmlContext, $name, $value, &$hasTranslation, $targetLang ) {
list ( $domain, $gettextContext ) = wpml_st_extract_context_parameters( $wpmlContext );
$translateByName = function ( $locale ) use ( $name, $domain, $gettextContext ) {
$this->loadTextDomain( $domain, $locale );
if ( $gettextContext ) {
return _x( $name, $gettextContext, $domain );
} else {
return __( $name, $domain );
}
};
$new_value = $this->withMOLocale( $targetLang, $translateByName );
$hasTranslation = $new_value !== $name;
if ( $hasTranslation ) {
$value = $new_value;
}
return $value;
}
/**
* @param string|array $wpmlContext
* @param string $name
* @param bool $value
* @param null|bool $hasTranslation
* @param null|string $targetLang
*
* @return string
*/
private function translateByDBQuery( $wpmlContext, $name, $value, &$hasTranslation, $targetLang ) {
$filter = $this->filterProvider->getFilter( $targetLang, $name );
Arguments
"sk"
Closure($locale) {#6666 …4}
/data/7/7/77ca334a-709b-4d46-9bb5-8cb6b6696236/mstein.eu/sub/new2021/wp-content/plugins/wpml-string-translation/classes/TranslateWpmlString.php
* @param string|array $wpmlContext
* @param string $name
* @param bool $value
* @param bool $allowEmptyValue
* @param null|bool $hasTranslation
* @param null|string $targetLang
*
* @return bool|string
*/
public function translate( $wpmlContext, $name, $value = false, $allowEmptyValue = false, &$hasTranslation = null, $targetLang = null ) {
if ( $this->lock ) {
return $value;
}
$this->lock = true;
if ( wpml_st_is_requested_blog() ) {
if ( $this->isAutoRegisterDisabled && self::canTranslateWithMO( $value, $name ) ) {
$value = $this->translateByMOFile( $wpmlContext, $name, $value, $hasTranslation, $targetLang );
} else {
$value = $this->translateByDBQuery( $wpmlContext, $name, $value, $hasTranslation, $targetLang );
}
}
$this->lock = false;
return $value;
}
/**
* @param string|array $wpmlContext
* @param string $name
* @param bool $value
* @param null|bool $hasTranslation
* @param null|string $targetLang
*
* @return string
*/
private function translateByMOFile( $wpmlContext, $name, $value, &$hasTranslation, $targetLang ) {
Arguments
"WordPress"
"URL attribute slug: product_cat"
"kategoria/%product_cat%"
null
"sk"
/data/7/7/77ca334a-709b-4d46-9bb5-8cb6b6696236/mstein.eu/sub/new2021/wp-content/plugins/wpml-string-translation/inc/functions.php
/**
* @param string|array $context
* @param string $name
* @param bool $value
* @param bool $allow_empty_value
* @param null|bool $has_translation
* @param null|string $target_lang
*
* @return bool|string
*/
function icl_translate( $context, $name, $value = false, $allow_empty_value = false, &$has_translation = null, $target_lang = null ) {
static $translate_wpml_string;
if ( ! $translate_wpml_string ) {
/** @var \WPML\ST\TranslateWpmlString $translate_wpml_string */
$translate_wpml_string = \WPML\Container\make( \WPML\ST\TranslateWpmlString::class );
$translate_wpml_string->init();
}
return $translate_wpml_string->translate( $context, $name, $value, $allow_empty_value, $has_translation, $target_lang );
}
/**
* @return bool
*/
function wpml_st_is_requested_blog() {
return ! ( is_multisite() && ms_is_switched() )
|| (int) $GLOBALS['blog_id'] === (int) end( $GLOBALS['_wp_switched_stack'] );
}
/**
* @param string $value
* @param mixed $context
* @param string $name
*
* @return string
*/
function wpml_get_string_current_translation( $value, $context, $name ) {
$string_id = icl_get_string_id( $value, $context, $name );
Arguments
"WordPress"
"URL attribute slug: product_cat"
"kategoria/%product_cat%"
false
null
"sk"
/data/7/7/77ca334a-709b-4d46-9bb5-8cb6b6696236/mstein.eu/sub/new2021/wp-content/plugins/wpml-string-translation/inc/functions.php
* Retrieve a string translation
* Looks for a string with matching $context and $name.
* If it finds it, it looks for translation in the current language or the language specified
* If a translation exists, it will return it. Otherwise, it will return the original string.
*
* @api
*
* @param string|bool $original_value The string's original value
* @param string $context The string's registered context
* @param string $name The string's registered name
* @param null|string $language_code Return the translation in this language
* Default is NULL which returns the current language
* @param bool|null $has_translation Currently unused. Defaults to NULL
*
* @return string
*/
function wpml_translate_single_string_filter( $original_value, $context, $name, $language_code = null, $has_translation = null ) {
$result = $original_value;
if ( is_string( $name ) ) {
$result = icl_translate( $context, $name, $original_value, false, $has_translation, $language_code );
}
return $result;
}
/**
* @api
* @since 3.2
*/
add_filter( 'wpml_translate_single_string', 'wpml_translate_single_string_filter', 10, 6 );
/**
* Retrieve a string translation
* Looks for a string with matching $context and $name.
* If it finds it, it looks for translation in the current language or the language specified
* If a translation exists, it will return it. Otherwise, it will return the original string.
*
* @param string|bool $original_value The string's original value
* @param string $context The string's registered context
* @param string $name The string's registered name
Arguments
"WordPress"
"URL attribute slug: product_cat"
"kategoria/%product_cat%"
false
null
"sk"
/data/7/7/77ca334a-709b-4d46-9bb5-8cb6b6696236/mstein.eu/sub/new2021/wp-includes/class-wp-hook.php
$this->iterations[ $nesting_level ] = $this->priorities;
$num_args = count( $args );
do {
$this->current_priority[ $nesting_level ] = current( $this->iterations[ $nesting_level ] );
$priority = $this->current_priority[ $nesting_level ];
foreach ( $this->callbacks[ $priority ] as $the_ ) {
if ( ! $this->doing_action ) {
$args[0] = $value;
}
// Avoid the array_slice() if possible.
if ( 0 === $the_['accepted_args'] ) {
$value = call_user_func( $the_['function'] );
} elseif ( $the_['accepted_args'] >= $num_args ) {
$value = call_user_func_array( $the_['function'], $args );
} else {
$value = call_user_func_array( $the_['function'], array_slice( $args, 0, $the_['accepted_args'] ) );
}
}
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
unset( $this->iterations[ $nesting_level ] );
unset( $this->current_priority[ $nesting_level ] );
--$this->nesting_level;
return $value;
}
/**
* Calls the callback functions that have been added to an action hook.
*
* @since 4.7.0
*
* @param array $args Parameters to pass to the callback functions.
Arguments
"kategoria/%product_cat%"
"WordPress"
"URL attribute slug: product_cat"
"sk"
/data/7/7/77ca334a-709b-4d46-9bb5-8cb6b6696236/mstein.eu/sub/new2021/wp-includes/plugin.php
$all_args = func_get_args(); // phpcs:ignore PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection
_wp_call_all_hook( $all_args );
}
if ( ! isset( $wp_filter[ $hook_name ] ) ) {
if ( isset( $wp_filter['all'] ) ) {
array_pop( $wp_current_filter );
}
return $value;
}
if ( ! isset( $wp_filter['all'] ) ) {
$wp_current_filter[] = $hook_name;
}
// Pass the value to WP_Hook.
array_unshift( $args, $value );
$filtered = $wp_filter[ $hook_name ]->apply_filters( $value, $args );
array_pop( $wp_current_filter );
return $filtered;
}
/**
* Calls the callback functions that have been added to a filter hook, specifying arguments in an array.
*
* @since 3.0.0
*
* @see apply_filters() This function is identical, but the arguments passed to the
* functions hooked to `$hook_name` are supplied using an array.
*
* @global WP_Hook[] $wp_filter Stores all of the filters and actions.
* @global int[] $wp_filters Stores the number of times each filter was triggered.
* @global string[] $wp_current_filter Stores the list of current filters with the current one last.
*
* @param string $hook_name The name of the filter hook.
* @param array $args The arguments supplied to the functions hooked to `$hook_name`.
Arguments
"kategoria/%product_cat%"
array:4 [
0 => "kategoria/%product_cat%"
1 => "WordPress"
2 => "URL attribute slug: product_cat"
3 => "sk"
]
/data/7/7/77ca334a-709b-4d46-9bb5-8cb6b6696236/mstein.eu/sub/new2021/wp-content/plugins/woocommerce-multilingual/inc/class-wcml-url-translation.php
$slug_details = $this->get_translated_tax_slug( $taxonomy, $term_language );
$base = $slug_details['slug'];
$base_translated = $slug_details['translated_slug'];
if ( isset( $wp_rewrite->extra_permastructs[ $taxonomy ] ) ) {
$buff = $wp_rewrite->extra_permastructs[ $taxonomy ]['struct'];
if ( $base_translated !== $base ) {
// translate the attribute base
$wp_rewrite->extra_permastructs[ $taxonomy ]['struct'] = preg_replace( '#^' . $base . '/(.*)#', $base_translated . '/$1', $wp_rewrite->extra_permastructs[ $taxonomy ]['struct'] );
}
// translate the attribute slug
$attribute_slug = preg_replace( '#^' . $base . '/([^/]+)/.+$#', '$1', $wp_rewrite->extra_permastructs[ $taxonomy ]['struct'] );
$attribute_slug_default = preg_replace( '#^pa_#', '', $taxonomy );
$attribute_slug_translation = apply_filters(
'wpml_translate_single_string',
$attribute_slug,
$this->url_strings_context(),
$this->url_string_name( 'attribute_slug', $attribute_slug_default ),
$term_language
);
if ( $attribute_slug_translation != $attribute_slug ) {
if ( $base ) {
$wp_rewrite->extra_permastructs[ $taxonomy ]['struct'] = preg_replace(
'#^' . $base_translated . '/([^/]+)/(.+)$#',
$base_translated . '/' . $attribute_slug_translation . '/$2',
$wp_rewrite->extra_permastructs[ $taxonomy ]['struct']
);
} else {
$wp_rewrite->extra_permastructs[ $taxonomy ]['struct'] = preg_replace(
'#' . $attribute_slug_default . '/(.+)$#',
$attribute_slug_translation . '/$1',
$wp_rewrite->extra_permastructs[ $taxonomy ]['struct']
);
Arguments
"wpml_translate_single_string"
"kategoria/%product_cat%"
"WordPress"
"URL attribute slug: product_cat"
"sk"
/data/7/7/77ca334a-709b-4d46-9bb5-8cb6b6696236/mstein.eu/sub/new2021/wp-includes/class-wp-hook.php
$this->iterations[ $nesting_level ] = $this->priorities;
$num_args = count( $args );
do {
$this->current_priority[ $nesting_level ] = current( $this->iterations[ $nesting_level ] );
$priority = $this->current_priority[ $nesting_level ];
foreach ( $this->callbacks[ $priority ] as $the_ ) {
if ( ! $this->doing_action ) {
$args[0] = $value;
}
// Avoid the array_slice() if possible.
if ( 0 === $the_['accepted_args'] ) {
$value = call_user_func( $the_['function'] );
} elseif ( $the_['accepted_args'] >= $num_args ) {
$value = call_user_func_array( $the_['function'], $args );
} else {
$value = call_user_func_array( $the_['function'], array_slice( $args, 0, $the_['accepted_args'] ) );
}
}
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
unset( $this->iterations[ $nesting_level ] );
unset( $this->current_priority[ $nesting_level ] );
--$this->nesting_level;
return $value;
}
/**
* Calls the callback functions that have been added to an action hook.
*
* @since 4.7.0
*
* @param array $args Parameters to pass to the callback functions.
Arguments
"http://new2021.mstein.eu/en/kategoria/korytarske-sekerky/"
WP_Term {#6664}
"product_cat"
/data/7/7/77ca334a-709b-4d46-9bb5-8cb6b6696236/mstein.eu/sub/new2021/wp-includes/plugin.php
$all_args = func_get_args(); // phpcs:ignore PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection
_wp_call_all_hook( $all_args );
}
if ( ! isset( $wp_filter[ $hook_name ] ) ) {
if ( isset( $wp_filter['all'] ) ) {
array_pop( $wp_current_filter );
}
return $value;
}
if ( ! isset( $wp_filter['all'] ) ) {
$wp_current_filter[] = $hook_name;
}
// Pass the value to WP_Hook.
array_unshift( $args, $value );
$filtered = $wp_filter[ $hook_name ]->apply_filters( $value, $args );
array_pop( $wp_current_filter );
return $filtered;
}
/**
* Calls the callback functions that have been added to a filter hook, specifying arguments in an array.
*
* @since 3.0.0
*
* @see apply_filters() This function is identical, but the arguments passed to the
* functions hooked to `$hook_name` are supplied using an array.
*
* @global WP_Hook[] $wp_filter Stores all of the filters and actions.
* @global int[] $wp_filters Stores the number of times each filter was triggered.
* @global string[] $wp_current_filter Stores the list of current filters with the current one last.
*
* @param string $hook_name The name of the filter hook.
* @param array $args The arguments supplied to the functions hooked to `$hook_name`.
Arguments
"http://new2021.mstein.eu/en/kategoria/korytarske-sekerky/"
array:3 [
0 => "http://new2021.mstein.eu/en/kategoria/korytarske-sekerky/"
1 => WP_Term {#6664}
2 => "product_cat"
]
/data/7/7/77ca334a-709b-4d46-9bb5-8cb6b6696236/mstein.eu/sub/new2021/wp-includes/taxonomy.php
* @since 1.5.0
* @since 2.5.0 Deprecated in favor of {@see 'term_link'} filter.
* @since 5.4.1 Restored (un-deprecated).
*
* @param string $termlink Category link URL.
* @param int $term_id Term ID.
*/
$termlink = apply_filters( 'category_link', $termlink, $term->term_id );
}
/**
* Filters the term link.
*
* @since 2.5.0
*
* @param string $termlink Term link URL.
* @param WP_Term $term Term object.
* @param string $taxonomy Taxonomy slug.
*/
return apply_filters( 'term_link', $termlink, $term, $taxonomy );
}
/**
* Displays the taxonomies of a post with available options.
*
* This function can be used within the loop to display the taxonomies for a
* post without specifying the Post ID. You can also use it outside the Loop to
* display the taxonomies for a specific post.
*
* @since 2.5.0
*
* @param array $args {
* Arguments about which post to use and how to format the output. Shares all of the arguments
* supported by get_the_taxonomies(), in addition to the following.
*
* @type int|WP_Post $post Post ID or object to get taxonomies of. Default current post.
* @type string $before Displays before the taxonomies. Default empty string.
* @type string $sep Separates each taxonomy. Default is a space.
* @type string $after Displays after the taxonomies. Default empty string.
* }
Arguments
"term_link"
"http://new2021.mstein.eu/en/kategoria/korytarske-sekerky/"
WP_Term {#6664}
"product_cat"
/data/7/7/77ca334a-709b-4d46-9bb5-8cb6b6696236/mstein.eu/sub/new2021/wp-content/plugins/sitepress-multilingual-cms/inc/utilities/wpml-languages.class.php
}
/**
* @param array $lang
* @param array $translations
* @param bool $icl_lso_link_empty
* @param bool $skip_lang
* @param string $link_empty_to
* @param WPML_LS_Display_As_Translated_Link $display_as_translated_ls_link
*
* @return array
*/
public function add_tax_url_to_ls_lang( $lang, $translations, $icl_lso_link_empty, $skip_lang, $link_empty_to, WPML_LS_Display_As_Translated_Link $display_as_translated_ls_link ) {
if ( isset( $translations[ $lang['code'] ] ) ) {
// force the taxonomy id adjustment to not modify this
$queried_object = $this->sitepress->get_wp_api()->get_queried_object();
$taxonomy = isset( $queried_object->taxonomy ) ? $queried_object->taxonomy : null;
if ( $taxonomy ) {
$translated_url = get_term_link( (int) $translations[ $lang['code'] ]->term_id, $taxonomy );
if ( ! $translated_url instanceof WP_Error ) {
$lang['translated_url'] = $translated_url;
$lang['missing'] = 0;
if ( 'post_format' === $taxonomy ) {
$lang['translated_url'] = $this->sitepress->convert_url( $lang['translated_url'], $lang['code'] );
}
} else {
$skip_lang = true;
}
}
}
if ( ! isset( $translations[ $lang['code'] ] ) || ! isset( $taxonomy ) ) {
$translated_url = $display_as_translated_ls_link->get_url( $translations, $lang['code'] );
if ( $translated_url ) {
$lang['translated_url'] = $translated_url;
$lang['missing'] = 0;
Arguments
WP_Term {#6664}
"product_cat"
/data/7/7/77ca334a-709b-4d46-9bb5-8cb6b6696236/mstein.eu/sub/new2021/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php
if ( ! empty( $link_empty_to ) ) {
$lang['translated_url'] = str_replace( '{%lang}', $lang['code'], $link_empty_to );
} else {
$lang['translated_url'] = $this->language_url( $lang['code'] );
}
} else {
$skip_lang = true;
}
}
$lang['missing'] = 1;
}
}
$this->switch_lang( $this_lang_tmp );
} elseif ( is_category() || is_tax() || is_tag() ) {
global $icl_adjust_id_url_filter_off;
$icl_adjust_id_url_filter_off = true;
list( $lang, $skip_lang ) = $languages_helper->add_tax_url_to_ls_lang(
$lang,
$translations,
$icl_lso_link_empty,
$skip_lang,
$link_empty_to,
$display_as_translated_ls_link
);
$icl_adjust_id_url_filter_off = false;
} elseif ( is_author() ) {
global $authordata;
if ( empty( $authordata ) ) {
$authordata = get_userdata( get_query_var( 'author' ) );
}
remove_filter( 'home_url', array( $this, 'home_url' ), 1 );
remove_filter( 'author_link', array( $this, 'author_link' ) );
list( $lang, $skip_lang ) = $languages_helper->add_author_url_to_ls_lang(
$lang,
$default_language,
$authordata,
$icl_lso_link_empty,
Arguments
array:10 [
"code" => "sk"
"id" => "10"
"english_name" => "Slovak"
"native_name" => "Slovenčina"
"major" => "0"
"active" => "1"
"default_locale" => "sk_SK"
"encode_url" => "0"
"tag" => "sk"
"display_name" => "Slovak"
]
array:2 [
"sk" => {#6715}
"en" => {#6456}
]
false
false
null
WPML_LS_Display_As_Translated_Link {#6478}
/data/7/7/77ca334a-709b-4d46-9bb5-8cb6b6696236/mstein.eu/sub/new2021/wp-content/plugins/sitepress-multilingual-cms/classes/seo/class-wpml-seo-headlangs.php
if ( ! array_key_exists( 'head_langs_priority', $seo_settings ) ) {
$seo_settings['head_langs_priority'] = 1;
}
return $seo_settings;
}
public function init_hooks() {
if ( $this->sitepress->get_wp_api()->is_front_end() ) {
$seo_settings = $this->get_seo_settings();
$head_langs = $seo_settings['head_langs'];
if ( $head_langs ) {
$priority = $seo_settings['head_langs_priority'];
add_action( 'wp_head', array( $this, 'head_langs' ), (int) $priority );
}
}
}
function head_langs() {
$languages = $this->sitepress->get_ls_languages( array( 'skip_missing' => true ) );
/**
* @since 3.4.0
*/
$languages = apply_filters( 'wpml_head_langs', $languages );
if ( $this->must_render( $languages ) ) {
$hreflang_items = [];
$xdefault_href_lang = null;
foreach ( $languages as $lang ) {
/**
* @since 3.3.7
*/
$alternate_hreflang = apply_filters( 'wpml_alternate_hreflang', $lang['url'], $lang['code'] );
$hreflang_code = $this->get_hreflang_code( $lang );
if ( $hreflang_code ) {
$hreflang_items[ $hreflang_code ] = str_replace( '&', '&', $alternate_hreflang );
Arguments
array:1 [
"skip_missing" => true
]
/data/7/7/77ca334a-709b-4d46-9bb5-8cb6b6696236/mstein.eu/sub/new2021/wp-includes/class-wp-hook.php
$this->iterations[ $nesting_level ] = $this->priorities;
$num_args = count( $args );
do {
$this->current_priority[ $nesting_level ] = current( $this->iterations[ $nesting_level ] );
$priority = $this->current_priority[ $nesting_level ];
foreach ( $this->callbacks[ $priority ] as $the_ ) {
if ( ! $this->doing_action ) {
$args[0] = $value;
}
// Avoid the array_slice() if possible.
if ( 0 === $the_['accepted_args'] ) {
$value = call_user_func( $the_['function'] );
} elseif ( $the_['accepted_args'] >= $num_args ) {
$value = call_user_func_array( $the_['function'], $args );
} else {
$value = call_user_func_array( $the_['function'], array_slice( $args, 0, $the_['accepted_args'] ) );
}
}
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
unset( $this->iterations[ $nesting_level ] );
unset( $this->current_priority[ $nesting_level ] );
--$this->nesting_level;
return $value;
}
/**
* Calls the callback functions that have been added to an action hook.
*
* @since 4.7.0
*
* @param array $args Parameters to pass to the callback functions.
Arguments
/data/7/7/77ca334a-709b-4d46-9bb5-8cb6b6696236/mstein.eu/sub/new2021/wp-includes/class-wp-hook.php
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
unset( $this->iterations[ $nesting_level ] );
unset( $this->current_priority[ $nesting_level ] );
--$this->nesting_level;
return $value;
}
/**
* Calls the callback functions that have been added to an action hook.
*
* @since 4.7.0
*
* @param array $args Parameters to pass to the callback functions.
*/
public function do_action( $args ) {
$this->doing_action = true;
$this->apply_filters( '', $args );
// If there are recursive calls to the current action, we haven't finished it until we get to the last one.
if ( ! $this->nesting_level ) {
$this->doing_action = false;
}
}
/**
* Processes the functions hooked into the 'all' hook.
*
* @since 4.7.0
*
* @param array $args Arguments to pass to the hook callbacks. Passed by reference.
*/
public function do_all_hook( &$args ) {
$nesting_level = $this->nesting_level++;
$this->iterations[ $nesting_level ] = $this->priorities;
do {
$priority = current( $this->iterations[ $nesting_level ] );
Arguments
/data/7/7/77ca334a-709b-4d46-9bb5-8cb6b6696236/mstein.eu/sub/new2021/wp-includes/plugin.php
if ( ! isset( $wp_filter[ $hook_name ] ) ) {
if ( isset( $wp_filter['all'] ) ) {
array_pop( $wp_current_filter );
}
return;
}
if ( ! isset( $wp_filter['all'] ) ) {
$wp_current_filter[] = $hook_name;
}
if ( empty( $arg ) ) {
$arg[] = '';
} elseif ( is_array( $arg[0] ) && 1 === count( $arg[0] ) && isset( $arg[0][0] ) && is_object( $arg[0][0] ) ) {
// Backward compatibility for PHP4-style passing of `array( &$this )` as action `$arg`.
$arg[0] = $arg[0][0];
}
$wp_filter[ $hook_name ]->do_action( $arg );
array_pop( $wp_current_filter );
}
/**
* Calls the callback functions that have been added to an action hook, specifying arguments in an array.
*
* @since 2.1.0
*
* @see do_action() This function is identical, but the arguments passed to the
* functions hooked to `$hook_name` are supplied using an array.
*
* @global WP_Hook[] $wp_filter Stores all of the filters and actions.
* @global int[] $wp_actions Stores the number of times each action was triggered.
* @global string[] $wp_current_filter Stores the list of current filters with the current one last.
*
* @param string $hook_name The name of the action to be executed.
* @param array $args The arguments supplied to the functions hooked to `$hook_name`.
*/
function do_action_ref_array( $hook_name, $args ) {
Arguments
/data/7/7/77ca334a-709b-4d46-9bb5-8cb6b6696236/mstein.eu/sub/new2021/wp-includes/general-template.php
* @param string $before The HTML to output before the date.
* @param string $after The HTML to output after the date.
*/
echo apply_filters( 'the_weekday_date', $the_weekday_date, $before, $after );
}
/**
* Fires the wp_head action.
*
* See {@see 'wp_head'}.
*
* @since 1.2.0
*/
function wp_head() {
/**
* Prints scripts or data in the head tag on the front end.
*
* @since 1.5.0
*/
do_action( 'wp_head' );
}
/**
* Fires the wp_footer action.
*
* See {@see 'wp_footer'}.
*
* @since 1.5.1
*/
function wp_footer() {
/**
* Prints scripts or data before the closing body tag on the front end.
*
* @since 1.5.1
*/
do_action( 'wp_footer' );
}
/**
* Fires the wp_body_open action.
Arguments
/data/7/7/77ca334a-709b-4d46-9bb5-8cb6b6696236/mstein.eu/sub/new2021/wp-content/themes/mstein/index.php
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<?php do_action('get_header'); ?>
<?php echo \Roots\view(\Roots\app('sage.view'), \Roots\app('sage.data'))->render(); ?>
<?php do_action('get_footer'); ?>
<?php wp_footer(); ?>
</body>
</html>
/data/7/7/77ca334a-709b-4d46-9bb5-8cb6b6696236/mstein.eu/sub/new2021/wp-includes/template-loader.php
}
break;
}
}
if ( ! $template ) {
$template = get_index_template();
}
/**
* Filters the path of the current template before including it.
*
* @since 3.0.0
*
* @param string $template The path of the template to include.
*/
$template = apply_filters( 'template_include', $template );
if ( $template ) {
include $template;
} elseif ( current_user_can( 'switch_themes' ) ) {
$theme = wp_get_theme();
if ( $theme->errors() ) {
wp_die( $theme->errors() );
}
}
return;
}
Arguments
"/data/7/7/77ca334a-709b-4d46-9bb5-8cb6b6696236/mstein.eu/sub/new2021/wp-content/themes/mstein/index.php"
/data/7/7/77ca334a-709b-4d46-9bb5-8cb6b6696236/mstein.eu/sub/new2021/wp-blog-header.php
<?php
/**
* Loads the WordPress environment and template.
*
* @package WordPress
*/
if ( ! isset( $wp_did_header ) ) {
$wp_did_header = true;
// Load the WordPress library.
require_once __DIR__ . '/wp-load.php';
// Set up the WordPress query.
wp();
// Load the theme template.
require_once ABSPATH . WPINC . '/template-loader.php';
}
Arguments
"/data/7/7/77ca334a-709b-4d46-9bb5-8cb6b6696236/mstein.eu/sub/new2021/wp-includes/template-loader.php"
/data/7/7/77ca334a-709b-4d46-9bb5-8cb6b6696236/mstein.eu/sub/new2021/index.php
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define( 'WP_USE_THEMES', true );
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
Arguments
"/data/7/7/77ca334a-709b-4d46-9bb5-8cb6b6696236/mstein.eu/sub/new2021/wp-blog-header.php"