??????????????
??????????????
??????????????
??????????????
Warning : Undefined variable $auth in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
Warning : Trying to access array offset on value of type null in /home/u627560552/domains/kovexadvisory.com/public_html/666.php on line 546
??????????????
??????????????
??????????????
??????????????
File Manager
✏️ Edit File: /home/mklsvubc/pgtankstorage.sg/wp-content/plugins/polylang/src/functions.php
⬅ Kembali
<?php
/**
* @package Polylang
*/
/**
* Define wordpress.com VIP equivalent of uncached functions
* WordPress backward compatibility functions
* and miscellaneous utility functions
*/
if ( ! function_exists( 'wpcom_vip_get_page_by_path' ) ) {
/**
* Retrieves a page given its path.
*
* @since 2.8.3
*
* @param string $page_path Page path.
* @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which correspond to
* a WP_Post object, an associative array, or a numeric array, respectively. Default OBJECT.
* @param string|array $post_type Optional. Post type or array of post types. Default 'page'.
* @return WP_Post|array|null WP_Post (or array) on success, or null on failure.
*/
function wpcom_vip_get_page_by_path( $page_path, $output = OBJECT, $post_type = 'page' ) {
return get_page_by_path( $page_path, $output, $post_type ); // phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.get_page_by_path_get_page_by_path
}
}
/**
* Determines whether we should load the cache compatibility
*
* @since 2.3.8
*
* @return bool True if the cache compatibility must be loaded
*/
function pll_is_cache_active() {
/**
* Filters whether we should load the cache compatibility
*
* @since 2.3.8
*
* @bool $is_cache True if a known cache plugin is active
* incl. WP Fastest Cache which doesn't use WP_CACHE
*/
return apply_filters( 'pll_is_cache_active', ( defined( 'WP_CACHE' ) && WP_CACHE ) || defined( 'WPFC_MAIN_PATH' ) );
}
/**
* Get the the current requested url
*
* @since 2.6
*
* @return string Requested url
*/
function pll_get_requested_url() {
if ( isset( $_SERVER['HTTP_HOST'], $_SERVER['REQUEST_URI'] ) ) {
return set_url_scheme( sanitize_url( wp_unslash( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ) ) );
}
/** @var string */
$home_url = get_option( 'home' );
/*
* In WP CLI context, few developers define superglobals in wp-config.php
* as proposed in https://make.wordpress.org/cli/handbook/common-issues/#php-notice-undefined-index-on-_server-superglobal
* So let's return the unfiltered home url to avoid a bunch of notices.
*/
if ( defined( 'WP_CLI' ) && WP_CLI ) {
return $home_url;
}
/*
* When using system CRON instead of WP_CRON, the superglobals are likely undefined.
*/
if ( defined( 'DOING_CRON' ) && DOING_CRON ) {
return $home_url;
}
if ( WP_DEBUG ) {
// phpcs:ignore WordPress.PHP.DevelopmentFunctions
trigger_error( '$_SERVER[\'HTTP_HOST\'] or $_SERVER[\'REQUEST_URI\'] are required but not set.' );
}
return '';
}
/**
* Determines whether we should load the block editor plugin or the legacy languages metabox.
*
* @since 2.6.0
*
* @return bool True to use the block editor plugin.
*/
function pll_use_block_editor_plugin() {
/**
* Filters whether we should load the block editor plugin or the legacy languages metabox.
*
* @since 2.6.0
*
* @param bool $use_plugin True when loading the block editor plugin.
*/
return class_exists( 'WP_Syntex\Polylang_Pro\Editors\Screens\Abstract_Screen' ) && apply_filters( 'pll_use_block_editor_plugin', ! defined( 'PLL_USE_BLOCK_EDITOR_PLUGIN' ) || PLL_USE_BLOCK_EDITOR_PLUGIN );
}
/**
* Determines whether a plugin is active.
*
* We define our own function because `is_plugin_active()` is available only in the backend.
*
* @since 3.5
*
* @param string $plugin_name Plugin basename.
* @return bool True if activated, false otherwise.
*/
function pll_is_plugin_active( string $plugin_name ) {
$sitewide_plugins = get_site_option( 'active_sitewide_plugins' );
$sitewide_plugins = ! empty( $sitewide_plugins ) && is_array( $sitewide_plugins ) ? array_keys( $sitewide_plugins ) : array();
$current_site_plugins = (array) get_option( 'active_plugins', array() );
$plugins = array_merge( $sitewide_plugins, $current_site_plugins );
return in_array( $plugin_name, $plugins );
}
/**
* Prepares and registers notices.
*
* Wraps `add_settings_error()` to make its use more consistent.
*
* @since 3.6
*
* @param WP_Error $error Error object.
* @return void
*/
function pll_add_notice( WP_Error $error ) {
if ( ! $error->has_errors() ) {
return;
}
foreach ( $error->get_error_codes() as $error_code ) {
// Extract the "error" type.
$data = $error->get_error_data( $error_code );
$type = empty( $data ) || ! is_string( $data ) ? 'error' : $data;
$message = wp_kses(
implode( '<br>', $error->get_error_messages( $error_code ) ),
array(
'a' => array( 'href' => true ),
'br' => array(),
'code' => array(),
'em' => array(),
)
);
add_settings_error( 'polylang', $error_code, $message, $type );
}
}
/**
* Tells if the given REST request is in the edit context.
*
* @since 3.5
*
* @param WP_REST_Request $request A REST request.
* @return bool
*
* @phpstan-param WP_REST_Request<array> $request
*/
function pll_is_edit_rest_request( WP_REST_Request $request ): bool {
if ( in_array( $request->get_method(), array( 'PATCH', 'POST', 'PUT' ), true ) ) {
return true;
}
return 'GET' === $request->get_method() && 'edit' === $request->get_param( 'context' );
}
Nama
Tipe
Ukuran
Diubah
Aksi
📁 Capabilities
dir
—
2026-06-17 21:10
📁 Model
dir
—
2026-06-17 21:10
📁 Options
dir
—
2026-06-17 21:10
📁 admin
dir
—
2026-06-17 21:10
📁 frontend
dir
—
2026-06-17 21:10
📁 install
dir
—
2026-06-17 21:10
📁 integrations
dir
—
2026-06-17 21:10
📁 modules
dir
—
2026-06-17 21:10
📁 settings
dir
—
2026-06-17 21:10
🐘 api.php
php
21.8 KB
2026-06-17 21:10
🐘 base.php
php
6.1 KB
2026-06-17 21:10
🐘 cache.php
php
2.4 KB
2026-06-17 21:10
🐘 class-polylang.php
php
8.3 KB
2026-06-17 21:10
🐘 constant-functions.php
php
1.8 KB
2026-06-17 21:10
🐘 cookie.php
php
3 KB
2026-06-17 21:10
🐘 crud-posts.php
php
14.7 KB
2026-06-17 21:10
🐘 crud-terms.php
php
8.8 KB
2026-06-17 21:10
🐘 default-term.php
php
6.4 KB
2026-06-17 21:10
🐘 filter-rest-routes.php
php
5 KB
2026-06-17 21:10
🐘 filters-links.php
php
5.6 KB
2026-06-17 21:10
🐘 filters-sanitization.php
php
3.2 KB
2026-06-17 21:10
🐘 filters-widgets-options.php
php
2.6 KB
2026-06-17 21:10
🐘 filters.php
php
12.9 KB
2026-06-17 21:10
🐘 format-util.php
php
3 KB
2026-06-17 21:10
🐘 functions.php
php
5.1 KB
2026-06-17 21:10
🐘 language-deprecated.php
php
7.1 KB
2026-06-17 21:10
🐘 language-factory.php
php
9.4 KB
2026-06-17 21:10
🐘 language.php
php
18.1 KB
2026-06-17 21:10
🐘 license.php
php
9.4 KB
2026-06-17 21:10
🐘 links-abstract-domain.php
php
3.2 KB
2026-06-17 21:10
🐘 links-default.php
php
3 KB
2026-06-17 21:10
🐘 links-directory.php
php
9.5 KB
2026-06-17 21:10
🐘 links-domain.php
php
2.9 KB
2026-06-17 21:10
🐘 links-model.php
php
6.5 KB
2026-06-17 21:10
🐘 links-permalinks.php
php
5.6 KB
2026-06-17 21:10
🐘 links-subdomain.php
php
2.2 KB
2026-06-17 21:10
🐘 links.php
php
1.4 KB
2026-06-17 21:10
🐘 mo.php
php
3.4 KB
2026-06-17 21:10
🐘 model.php
php
23 KB
2026-06-17 21:10
🐘 nav-menu.php
php
4.5 KB
2026-06-17 21:10
🐘 olt-manager.php
php
3 KB
2026-06-17 21:10
🐘 query.php
php
7.7 KB
2026-06-17 21:10
🐘 rest-request.php
php
4.2 KB
2026-06-17 21:10
🐘 static-pages.php
php
6.3 KB
2026-06-17 21:10
🐘 switcher.php
php
11 KB
2026-06-17 21:10
🐘 term-slug.php
php
4.9 KB
2026-06-17 21:10
🐘 translatable-object-with-types-interface.php
php
1 KB
2026-06-17 21:10
🐘 translatable-object-with-types-trait.php
php
2 KB
2026-06-17 21:10
🐘 translatable-object.php
php
17.6 KB
2026-06-17 21:10
🐘 translatable-objects.php
php
3.7 KB
2026-06-17 21:10
🐘 translate-option.php
php
13.1 KB
2026-06-17 21:10
🐘 translated-object.php
php
18.9 KB
2026-06-17 21:10
🐘 translated-post.php
php
17.2 KB
2026-06-17 21:10
🐘 translated-term.php
php
14.8 KB
2026-06-17 21:10
🐘 walker-dropdown.php
php
3.8 KB
2026-06-17 21:10
🐘 walker-list.php
php
2.5 KB
2026-06-17 21:10
🐘 walker.php
php
2.4 KB
2026-06-17 21:10
🐘 widget-calendar.php
php
11.6 KB
2026-06-17 21:10
🐘 widget-languages.php
php
5.3 KB
2026-06-17 21:10