File: /var/www/html/insiders/wp-load/wp-content/plugins/gutenmate/lib/proxy.php
<?php
/*
These are a proxy functions to call functions in the Gutenmate plugin if activated
*/
function gtm_build_query_vars_from_query_block( $block, $page ) {
if ( function_exists( 'gutenberg_build_query_vars_from_query_block' ) ) {
return gutenberg_build_query_vars_from_query_block( $block, $page );
} else {
return build_query_vars_from_query_block( $block, $page );
}
}
/**
* Get file system object for reading/writing file
*/
function gtm_get_wp_filesystem() {
require_once ABSPATH . 'wp-admin/includes/file.php';
global $wp_filesystem;
WP_Filesystem();
return $wp_filesystem;
}
function gtm_get_file_content( $file ) {
$wp_filesystem = gtm_get_wp_filesystem();
// Return content or null if not exists
if ( file_exists( $file ) && is_readable( $file ) ) {
return $wp_filesystem->get_contents( $file );
}
}