/home/techb158/l2hypotheques.com/wp-content/plugins/polylang/src/admin
NameSizeModeActions
admin-base.php234710644editdlrm
admin-block-editor.php21970644editdlrm
admin-classic-editor.php113960644editdlrm
admin-default-term.php11280644editdlrm
admin-filters-columns.php140080644editdlrm
admin-filters-media.php44280644editdlrm
admin-filters-post-base.php13710644editdlrm
admin-filters-post.php67850644editdlrm
admin-filters-term.php239940644editdlrm
admin-filters-widgets-options.php12560644editdlrm
admin-filters.php41030644editdlrm
admin-links.php150790644editdlrm
admin-model.php1880644editdlrm
admin-nav-menu.php107420644editdlrm
admin-notices.php77760644editdlrm
admin-static-pages.php46370644editdlrm
admin-strings.php49860644editdlrm
admin.php49200644editdlrm
view-translations-media.php16610644editdlrm
view-translations-post.php28310644editdlrm
view-translations-term.php35070644editdlrm
Edit: /home/techb158/l2hypotheques.com/wp-content/plugins/polylang/src/admin/admin-block-editor.php (2197B)
model = &$polylang->model; $this->filter_rest_routes = new PLL_Filter_REST_Routes( $polylang->model ); add_filter( 'block_editor_rest_api_preload_paths', array( $this, 'filter_preload_paths' ), 50, 2 ); add_action( 'admin_enqueue_scripts', array( $this, 'add_block_editor_inline_script' ), 15 ); // After `PLL_Admin_Base::admin_enqueue_scripts()` to ensure `pll_block-editor`script is enqueued. } /** * Filters preload paths based on the context (block editor for posts, site editor or widget editor for instance). * * @since 3.5 * * @param array $preload_paths Preload paths. * @param WP_Block_Editor_Context $context Editor context. * @return array Filtered preload paths. */ public function filter_preload_paths( $preload_paths, $context ) { if ( ! $context instanceof WP_Block_Editor_Context ) { return $preload_paths; } if ( 'core/edit-post' !== $context->name || ! $context->post instanceof WP_Post ) { // Do nothing if not post editor. return $preload_paths; } if ( ! $this->model->is_translated_post_type( $context->post->post_type ) ) { return $preload_paths; } $language = $this->model->post->get_language( $context->post->ID ); if ( empty( $language ) ) { return $preload_paths; } return $this->filter_rest_routes->add_query_parameters( $preload_paths, array( 'lang' => $language->slug, ) ); } /** * Adds inline block editor script for filterable REST routes. * * @since 3.5 * * @return void */ public function add_block_editor_inline_script() { $handle = 'pll_block-editor'; if ( wp_script_is( $handle, 'enqueued' ) ) { $this->filter_rest_routes->add_inline_script( $handle ); } } }