[wp-trac] [WordPress Trac] #34936: Reconcile wp-settings-cli.php with wp-settings.php

WordPress Trac noreply at wordpress.org
Thu Jun 2 22:32:12 UTC 2016


#34936: Reconcile wp-settings-cli.php with wp-settings.php
-------------------------------------------+------------------
 Reporter:  danielbachhuber                |       Owner:
     Type:  enhancement                    |      Status:  new
 Priority:  normal                         |   Milestone:  4.6
Component:  Bootstrap/Load                 |     Version:
 Severity:  normal                         |  Resolution:
 Keywords:  dev-feedback wp-cli has-patch  |     Focuses:
-------------------------------------------+------------------

Comment (by jorbin):

 Replying to [comment:22 ocean90]:
 > Replying to [comment:20 jorbin]:
 > > They are loaded before plugins are loaded, so we could change it to
 they can not be used by plugins.
 >
 > That makes probably more sense. Although, if WP-CLI can do it then a
 plugin in form of `auto_prepend_file` (see  [37207]) can do it too.
 >

 I don't think a plugin could use `auto_prepend_file` since that needs to
 be defined in php.ini and if you are changing that setting there, I would
 hope you know what you are doing.  I'm guessing a plugin that says "Go
 change your php.ini file" would not be looked highly upon and a server
 setup to allow the web user to chang it also feels like a bad idea.

 > > I chose `bypass` instead of `enable` as I felt that that action that a
 user of the filter is to bypass something rather than to unenable.  I
 don't feel super strong about this though so if you do, I'm open to
 changing it.
 >
 > I don't feel that strong too, but `bypass` is currently only used in
 inline docs and once in a function: `media_upload_html_bypass()`.
 >

 Fair.  I'll change it.

 > > As noted in the link, it's to allow `--debug` to be used to set debug
 display settings.  Perhaps a better name and documentation would
 demonstrate that better.  Ideas?
 >
 > Okay. Maybe the name should include "error reporting" since that's what
 the function handles.
 >

 How about "enable_wp_debug_setting_error_reporting" with a default value
 of true?

 > ----
 >
 > For `WP_CACHE` I've found
 https://core.trac.wordpress.org/browser/trunk/src/wp-
 settings.php?rev=37626&marks=283-284#L281. That should probably be covered
 by the filter too, although it's unlikely that the function exists if
 `advanced-cache.php` isn't loaded.

 The function exists check should be sufficient.  The current wp-settings-
 cli.php has that code and it isn't a problem.   @danielbachhuber
 [https://github.com/danielbachhuber/wordpress-develop/pull/2/files created
 a comparison between the cli version of wp-settings and the core version]
 that others may find valuable as well.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34936#comment:23>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list