Timeline for Disable the visibility options in WP
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 21, 2016 at 23:14 | comment | added | thirdender |
And for this particular issue, I checked the code and I don't see any way to remove this aside from the CSS/JS hack, or as @MarkKaplun mentioned using output buffering. The quick edit form is generated in wp-admin/includes/class-wp-posts-list-table.php , and it doesn't look like there are any real conditionals that will affect whether or not the privacy options appear (except a bulk edit conditional, but that won't affect quick edit afaik). In my opinion this is a failing of WordPress and PHP, but such is life. If there becomes a demand, support for this feature may materialize. C'est la vie.
|
|
Aug 21, 2016 at 23:08 | comment | added | thirdender |
There's always going to be a tension between doing things quick and doing things right. That doesn't mean you shouldn't try to do things the right way. To follow your example, you should comment your code, and you should indent code properly. Maybe you don't have time, but that doesn't mean it should be something you avoid… you just might not be able to do it this project. I believe as programmers we should always strive to find the best way to do things. Just because a hackish way to do something exists doesn't mean we should stop trying our best. </rant> :-p
|
|
Aug 21, 2016 at 14:45 | comment | added | Mark Kaplun | @thirdender, yes you probably have in your CSS and JS files only code that is applied only on the specific page it is loaded for and nothing more, no comments in the HTML and no spaces .... On this site we usually have a practical approach to programming and, not a religious ones, unless it is a truly horrible practice. With the way wordpress code in this area is structured, jQuery solution is the cleanest and more maintainable approach, when it is compared to buffering and filtering the HTML.when it is generated. You will not get a A+ grade for this code but in the real world it is better | |
Aug 20, 2016 at 23:49 | comment | added | thirdender | @MarkKaplun, because code that shouldn't be seen by the user shouldn't be sent from the server at all. Ideally things hidden from the user should be removed in (or by) the PHP, and not "kinda hidden" by CSS or JS in the browser. Not only is it cleaner, but in some cases there are security reasons for wanting to prevent options from being sent/read by the server. | |
Nov 18, 2013 at 9:30 | vote | accept | Denis de Bernardy | ||
Nov 13, 2013 at 7:57 | comment | added | Denis de Bernardy | @MarkKaplun: I was hoping there was a means to disable the functionality altogether, rather than sweep it under the rug. | |
Nov 13, 2013 at 7:40 | comment | added | Mark Kaplun | yes, why jquery is "improper"? unless you want to block it from being processed by the server then I don't see much difference between an HTML generation solution or hiding with JS or CSS | |
Nov 12, 2013 at 12:18 | comment | added | birgire | I don't see any other better way at the moment other than a jQuery hack ;-) | |
Nov 12, 2013 at 11:58 | history | answered | Denis de Bernardy | CC BY-SA 3.0 |