| Server IP : www.new.bangkokfinder.com / Your IP : 162.158.108.20 Web Server : nginx/1.20.1 System : Linux new 4.15.0-159-generic #167-Ubuntu SMP Tue Sep 21 08:55:05 UTC 2021 x86_64 User : bangkokfinder ( 1000) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/bangkokfinder/www/wp-content/plugins/generateblocks/includes/ |
Upload File : |
<?php
/**
* Deprecated functions.
*
* @package GenerateBlocks
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
/**
* Redirect to the Dashboard page on single plugin activation.
*
* @since 0.1
* @deprecated 2.0.0
*/
function generateblocks_dashboard_redirect() {
$do_redirect = apply_filters( 'generateblocks_do_activation_redirect', get_option( 'generateblocks_do_activation_redirect', false ) );
if ( $do_redirect ) {
delete_option( 'generateblocks_do_activation_redirect' );
wp_safe_redirect( esc_url( admin_url( 'admin.php?page=generateblocks' ) ) );
exit;
}
}
/**
* Adds a redirect option during plugin activation on non-multisite installs.
*
* @since 0.1
* @deprecated 2.0.0
*
* @param bool $network_wide Whether or not the plugin is being network activated.
*/
function generateblocks_do_activate( $network_wide = false ) {
// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Only used to do a redirect. False positive.
if ( ! $network_wide && ! isset( $_GET['activate-multi'] ) ) {
update_option( 'generateblocks_do_activation_redirect', true );
}
}
/**
* Output permissions for use in admin objects.
*
* @deprecated 2.1.0
* @return void
*/
function generateblocks_admin_head_scripts() {
$permissions = apply_filters(
'generateblocks_permissions',
[
'isAdminUser' => current_user_can( 'manage_options' ),
'canEditPosts' => current_user_can( 'edit_posts' ),
'isGbProActive' => is_plugin_active( 'generateblocks-pro/plugin.php' ),
'isGpPremiumActive' => is_plugin_active( 'gp-premium/gp-premium.php' ),
]
);
$permission_object = wp_json_encode( $permissions );
echo sprintf(
'<script>
const gbPermissions = %s;
Object.freeze( gbPermissions );
</script>',
$permission_object // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
);
}