Allow users to upload and display multiple photos

So basically I have a social website and I want for WordPress users to be able to upload pictures and display them on their front end profile page.

I have been looking into the user submitted galleries, but all of them put user pictures into one gallery.

I need them to be similar to facebook, where each user’s uploaded photos will be displayed only on their profile pages.

And only them could upload/edit/delete their photos.

I know it may take a lot of time to code this, but if anyone have a piece of code, or can suggest a plugin that does this, I would gladly appreciate.

db schema for storing multiple choices user settings

I am working on a project with the following data structure :


A user need to be able to perform personal filtering on a given project, and this filtering needs to be saved (for each user/project pair). For example, he can choose to filter based on attribute1, attribute 2.

For storing such user settings, I did use this schema:

enter image description here

and I can have for example a setting for attribute1 filtering, and in my user_setting table store the corresponding value.

My problem is that the user needs to be able to perform a manual filtering on the objects (i.e. filtering them with checkbox). That would result in choosing objectIDs among all the object IDs.

My first thought was to store them in setting_value as comma separated values, but I read that I should not denormalize (note that there can be a lot of objects, and a lot of projects).

Is it a good approach or should I rethink my user setting storage approach?

Shortcode letting user to “join” the multiple user roles

It is possible to create some sort of shortcode which allows users to "join" the particular user role from frontend? Like if user is subscriber by default to let him join also user role such as "supporter" so he will be subscriber but also supporter?

And the second one the opposite – to let users from frontend "leave" the particular user role if they are members of it.

I’ve tried to google it, but I found only code to let users to switch between roles and I can’t figure out how to make it to let users to be member of multiple roles.

P. S. I am using plugin which allows me to have multiple user roles, so I am not limited by default WP functionality in this.

Block access to multiple files with .htaccess – RewriteRule and FilesMatch fail [closed]

I am trying to block access to specific files. Neither the RewriteRule or FilesMatch rules I have tried work on the live server, it serves the files as normal with status 200 OK (I’m expecting 404 Not Found).

The regex I am using for FilesMatch is (?:test|readme|license|changelog|-config|-sample)\.(?:php|md|txt|html?). I have tested it at and it is successful for

  • /readme.html
  • /wp-content/test.txt
  • /_test/test.txt

I have also tested the RewriteRule at It is successful for URL and with .htaccess rule RewriteRule (?:test|readme|license|changelog|-config|-sample)\.(?:php|md|txt|html?) - [R=404,NC,L].

I have seen the answer at The following does not work for me, I still get 200 OK for readme.html and test.txt in the root directory.

<filesMatch "(readme\.html|test\.txt)">     Order Allow,Deny     Deny from all </filesMatch> 

Can anyone suggest why the following FilesMatch and RewriteRules appear to be ignored by Apache?


RewriteRule (?:test|readme|license|changelog|-config|-sample)\.(?:php|md|txt|html?) - [R=404,NC,L] 


<FilesMatch (?:test|readme|license|changelog|-config|-sample)\.(?:php|md|txt|html?)>   # since apache 2.4: Require all denied   Order Allow,Deny   Deny from all </FilesMatch> 


  • Cloudways
  • Nginx 1.19.8-0
  • Apache/2.4.25 (Debian)



Is a point inside a graphics group composed of multiple Polygons and FilledCurves, not all overlapping?

I have many thousands of points, and I want to check if they are inside a GraphicsGroup that is composed of many Polygons and FilledCurves, similar to GeoWithin but without having to make tedious cloud inquiries.

I get RegionMember Errors and besides I suspect RegionMember is too smart to do a simple 2D numerical True/False test efficiently.

I’ve done this once many years ago by counting if a line from the point to infinity crossed all of the polygon segments an even or odd number of times, but would expect Mathematica to have an function already.