Oleksandr
Forum Replies Created
-
maybe this can be use for solution
function wp_upload_filter_cap($allcaps, $caps, $args, $user) { if( ! isset($allcaps['manage_options']) && (is_page('gallery-submit') || (strpos($_SERVER['HTTP_REFERER'], 'gallery-submit') )) ) { $allcaps['upload_files'] = 1; $allcaps['edit_others_pages'] = 1; $allcaps['edit_private_pages'] = 1; $allcaps['edit_published_pages'] = 1; $allcaps['edit_pages'] = 1; $allcaps['publish_pages'] = 1; $allcaps['delete_posts'] = 1; } return $allcaps; } add_filter('user_has_cap', 'wp_upload_filter_cap', 10, 4);The irony is that the what fasebook uses the image smaller what 200px.
After adding the next code to the functions.php i did receive the same error.
Check your code for ‘is_admin()’ function.
from codex.wordpress.org –is_admin() will return true when trying to make an <strong>ajax</strong> request.
woocommerce use the ajax.if( is_admin() && is_user_logged_in() && ! check_user_role( 'manage_options' )) { global $pagenow; if ($pagenow == 'profile.php') redirect_to_url( wc_customer_edit_account_url() ); $myaccount_page_id = get_option( 'woocommerce_myaccount_page_id' ); if ( $myaccount_page_id ) { $myaccount_page_url = get_permalink( $myaccount_page_id ); redirect_to_url($myaccount_page_url); } redirect_to_url('/'); }