ID)) { $my_post = array( 'post_title' => 'wpstream', 'post_type' => 'page', 'post_status' => 'publish', ); $new_id = wp_insert_post($my_post); } $page_check = get_page_by_title('vodkey'); if (!isset($page_check->ID)) { $my_post = array( 'post_title' => 'vodkey', 'post_type' => 'page', 'post_status' => 'publish', ); $new_id = wp_insert_post($my_post); } $page_check = get_page_by_title('Userkey'); if (!isset($page_check->ID)) { $my_post = array( 'post_title' => 'Userkey', 'post_type' => 'page', 'post_status' => 'publish', ); $new_id = wp_insert_post($my_post); } } function wpstream_manage_admin_menu() { add_menu_page( __('WpStream','wpestream'), __('WpStream ','wpstream'), 'administrator', 'wpstream_plugin_options', 'wpstream_set_wpstream_credentials'); add_submenu_page( 'wpstream_plugin_options', __('WpStream Options','wpestream'), __('WpStream Options','wpestream'), 'administrator', 'wpstream_plugin_options', 'wpstream_set_wpstream_credentials'); add_submenu_page( 'wpstream_plugin_options', __('WpStream Channels','wpestream'), __('WpStream Channels','wpestream'), 'administrator', 'wpstream_new_general_set', 'wpstream_new_general_set'); add_submenu_page( 'wpstream_plugin_options', __('WpStream Media Management','wpestream'), __('WpStream Media Management','wpestream'), 'administrator', 'wpstream_media_management', 'wpstream_media_management'); } function wpstream_non_image_content_wrapper_start() { if ( is_user_logged_in() ) { global $product; $current_user = wp_get_current_user(); $product_id = wc_get_product()->get_id(); if ( wc_customer_bought_product( $current_user->user_email, $current_user->ID, $product_id) ){ echo '