array_get( $_GET, 'post', 0 ); if ( is_page() ) { if ( ! current_user_can( 'edit_pages' ) ) { return false; } if ( ! current_user_can( 'edit_others_pages' ) && ! current_user_can( 'edit_page', $post_id ) ) { return false; } if ( ( ! current_user_can( 'publish_pages' ) || ! current_user_can( 'edit_published_pages' ) ) && 'publish' === get_post_status( $post_id ) ) { return false; } if ( ( ! current_user_can( 'edit_private_pages' ) || ! current_user_can( 'read_private_pages' ) ) && 'private' === get_post_status( $post_id ) ) { return false; } } else { if ( ! current_user_can( 'edit_posts' ) ) { return false; } if ( ! current_user_can( 'edit_others_posts' ) && ! current_user_can( 'edit_post', $post_id ) ) { return false; } if ( ( ! current_user_can( 'publish_posts' ) || ! current_user_can( 'edit_published_posts' ) ) && 'publish' === get_post_status( $post_id ) ) { return false; } if ( ( ! current_user_can( 'edit_private_posts' ) || ! current_user_can( 'read_private_posts' ) ) && 'private' === get_post_status( $post_id ) ) { return false; } } return true; } define( 'ET_FB_ENABLED', et_core_is_fb_enabled() ); // Set default value if the constant hasn't been defined if ( ! defined( 'ET_BUILDER_LOAD_ON_AJAX' ) ) { define( 'ET_BUILDER_LOAD_ON_AJAX', false ); } // Stop here if the front end builder isn't enabled. if ( ! ET_FB_ENABLED && ! ET_BUILDER_LOAD_ON_AJAX ) { return; } define( 'ET_FB_URI', ET_BUILDER_URI . '/frontend-builder' ); define( 'ET_FB_ASSETS_URI', ET_FB_URI . '/assets' ); require_once ET_BUILDER_DIR . 'frontend-builder/view.php'; require_once ET_BUILDER_DIR . 'frontend-builder/assets.php'; require_once ET_BUILDER_DIR . 'frontend-builder/helpers.php'; require_once ET_BUILDER_DIR . 'frontend-builder/rtl.php'; do_action( 'et_fb_framework_loaded' ); et_fb_fix_plugin_conflicts();