Timeline for Maximum upload size changes in php.ini ignored - How to remove upload size limit?
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 10, 2015 at 20:51 | comment | added | kaiser |
Currently you are adding the limit just if the user has the manage_options capability. To turn that around, either switch the values (the stuff after ? and : ) or turn the current_user_can() around by preceding it with a ! .
|
|
Feb 10, 2015 at 20:32 | comment | added | ReynierPM | ok, my bad, now I think I have fixed, just ask if user has permissions to manage (admin side) and then change the limit, now how do I call or where or it is just loaded by WP? | |
Feb 10, 2015 at 20:23 | comment | added | kaiser | Also: You have now added the plugin header comment twice. I suggest that you make a step back, breath 10 times deep and then really review what you have written :) | |
Feb 10, 2015 at 20:22 | comment | added | kaiser |
Ehm... Please take a look at the if /else (in the case of my plugin in the answer, it's a "ternary operator" instead). When you copy/paste stuff, then you will always shoot yourself in your foot. Try to read my plugin bit by bit, statement by statement and line by line to find your mistake. Hint: you are comparing if the current screen objects base property is the in an array - while current_user_can() just returns a boolean true /false .
|
|
Feb 10, 2015 at 20:13 | comment | added | ReynierPM |
I've created a uploadSizeLimit.php file under /wp-content/mu-plugins/ and write the filter on it, but, how do I use this? Is this the right way to go? See the edit I made to the main post
|
|
Feb 10, 2015 at 15:39 | comment | added | kaiser | If to the whole, then omit it. Still I'd suggest to narrow it down. | |
Feb 10, 2015 at 13:14 | comment | added | ReynierPM |
Hi @kaiser, thanks for your answer, just one doubt, what you mean with this Add Screen "base"s here ? What about if I just want to apply to the whole wp-admin side?
|
|
Feb 10, 2015 at 8:19 | history | answered | kaiser | CC BY-SA 3.0 |