/* Restrict Upload Access for Users not paid */
function restrict_upload_access() {
if ( ! current_user_can( 'administrator' ) ) {
if ( get_user_option( 'jpw_subscribe_status', get_current_user_id() ) !== 'ACTIVE' ) {
$url = $_SERVER['REQUEST_URI'];
$submit_post = strpos( $url, '/editor/' );
$upload_video = strpos( $url, '/upload/' );
if ( $submit_post || $upload_video ) {
wp_redirect( home_url() );
exit();
}
add_action(
'wp_head',
function () {
?>