WordPress Trac: {5} Next Major Releasehttps://core.trac.wordpress.org/report/5
Trac Report - {{{
#!span class="create-new-ticket button button-large button-primary"
[https://login.wordpress.org/?redirect_to=https://core.trac.wordpress.org/newticket Create a new ticket]
}}}
* Active tickets slated for the next major release
* Sort by component, severity, type, summary
* Accepted tickets have an '*' appended to their owner's nameen-usWordPress Trachttps://core.trac.wordpress.org/chrome/site/your_project_logo.pnghttps://core.trac.wordpress.org/report/5
Trac v1.0.1#41994: New Gallery Widget: Add Media button label should be updated for consistencyTue, 26 Sep 2017 13:01:22 GMTTue, 26 Sep 2017 14:50:49 GMT<p>
I noticed in previous Media widgets Button: label is <tt>Add Image</tt>, <tt>Add Video</tt> but in gallery widget <tt>Select Images</tt> is being used. I think it should be <tt>Add Images</tt>
</p>
juhisehttps://core.trac.wordpress.org/ticket/41994
https://core.trac.wordpress.org/ticket/41994Report#41985: Gallery widget loses "Link to" valueMon, 25 Sep 2017 19:57:31 GMTTue, 26 Sep 2017 20:04:10 GMT<p>
When I add images to the Gallery widget, the defaults under "Gallery Settings" look correct.
After I click on Insert Gallery, and Save the widget, I then click on Edit Gallery and the values under "Gallery Settings" do not match what I thought I saved. Specifically, the Link value is reset to None.
</p>
joyouslyhttps://core.trac.wordpress.org/ticket/41985
https://core.trac.wordpress.org/ticket/41985Report#41983: Lead by example: pass unquoted placeholders to $wpdb->prepare()Mon, 25 Sep 2017 17:06:16 GMTTue, 26 Sep 2017 21:21:22 GMT<p>
In the aftermath of last weeks security release which broke a lot of SQL queries in plugins, a new sniff has been added to WPCS to check for incorrect placeholders.
</p>
<p>
The sniff also verifies that placeholders - as per the documentation - are left unquoted.
</p>
<p>
Having run this sniff over Core, it turns out that there are some fixes to be made.
</p>
<p>
See the below report.
</p>
<p>
I suggest tagging this as an easy-pick for new contributors.
</p>
<pre class="wiki">FILE: \src\wp-admin\includes\class-wp-importer.php
----------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------------
32 | ERROR | Placeholders should be unquoted in the query string in $wpdb-&gt;prepare(). Found:
| | '%s'.
68 | ERROR | Placeholders should be unquoted in the query string in $wpdb-&gt;prepare(). Found:
| | '%s'.
----------------------------------------------------------------------------------------
FILE: \src\wp-admin\includes\nav-menu.php
----------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------
999 | ERROR | Placeholders should be unquoted in the query string in $wpdb-&gt;prepare().
| | Found: '%d'.
----------------------------------------------------------------------------------------
FILE: \src\wp-includes\functions.php
----------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------------
4807 | ERROR | Placeholders should be unquoted in the query string in $wpdb-&gt;prepare().
| | Found: '%d'.
4824 | ERROR | Placeholders should be unquoted in the query string in $wpdb-&gt;prepare().
| | Found: '%d'.
----------------------------------------------------------------------------------------
FILE: \src\wp-includes\taxonomy.php
----------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------------
3788 | ERROR | Placeholders should be unquoted in the query string in $wpdb-&gt;prepare().
| | Found: '%s'.
----------------------------------------------------------------------------------------
</pre><p>
Refs:
</p>
<ul><li><a class="ext-link" href="https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/pull/1160"><span class="icon">​</span>https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/pull/1160</a>
</li><li><a class="ext-link" href="https://developer.wordpress.org/reference/classes/wpdb/prepare/"><span class="icon">​</span>https://developer.wordpress.org/reference/classes/wpdb/prepare/</a>
</li><li><a class="ext-link" href="https://make.wordpress.org/core/handbook/best-practices/coding-standards/php/#formatting-sql-statements"><span class="icon">​</span>https://make.wordpress.org/core/handbook/best-practices/coding-standards/php/#formatting-sql-statements</a>
</li></ul>jrfhttps://core.trac.wordpress.org/ticket/41983
https://core.trac.wordpress.org/ticket/41983Report#41979: Caption changes don't cause Gallery widget to refresh in Customizer previewMon, 25 Sep 2017 15:36:50 GMTMon, 25 Sep 2017 15:36:50 GMT<p>
The Gallery widget (<a class="closed ticket" href="https://core.trac.wordpress.org/ticket/41914" title="feature request: Widgets: Add gallery widget (closed: fixed)">#41914</a>) allows for captions to be supplied for images via the media modal. Whereas the list of attachment <tt>ids</tt> are part of the widget instance data, the captions are <em>not</em>. Therefore when just changing a caption then no change will be reflected in the Customizer preview since no change was made to the Customizer setting.
</p>
<p>
This problem was first encountered in the Image widget (<a class="closed ticket" href="https://core.trac.wordpress.org/ticket/39993" title="enhancement: Introduce Core Widget: Image (closed: fixed)">#39993</a>) and the solution there was to put the caption into the instance data itself, and disable the auto-saving of the attachment changes back (see also <a class="new ticket" href="https://core.trac.wordpress.org/ticket/40403" title="enhancement: Media: Allow disabling of auto-save for attachment changes in Media ... (new)">#40403</a>). For the code that was removed from the Image widget which could be useful for the Gallery widget here, see <a class="ext-link" href="https://github.com/xwp/wp-core-media-widgets/commit/ddd59e2"><span class="icon">​</span>https://github.com/xwp/wp-core-media-widgets/commit/ddd59e2</a>
</p>
<p>
Reported by @rabmalin in <a href="https://core.trac.wordpress.org/ticket/41914#comment:10">https://core.trac.wordpress.org/ticket/41914#comment:10</a>
</p>
westonruterhttps://core.trac.wordpress.org/ticket/41979
https://core.trac.wordpress.org/ticket/41979Report#41974: Use consistent translator comments for strings with placeholdersMon, 25 Sep 2017 10:16:32 GMTMon, 25 Sep 2017 19:57:41 GMT<p>
Some of the recent Customizer and Widgets commits have translators comments like this:
</p>
<pre class="wiki">/* translators: placeholder is link to user profile */
</pre><p>
They should be changed to the canonical form::
</p>
<pre class="wiki">/* translators: %s: link to user profile */
</pre>SergeyBiryukovhttps://core.trac.wordpress.org/ticket/41974
https://core.trac.wordpress.org/ticket/41974Report#41969: Ensure Gallery widget is styled properly across widget areas in bundled themesMon, 25 Sep 2017 06:55:12 GMTMon, 25 Sep 2017 21:50:29 GMT<p>
The Gallery widget (<a class="closed ticket" href="https://core.trac.wordpress.org/ticket/41914" title="feature request: Widgets: Add gallery widget (closed: fixed)">#41914</a>) allows for image galleries to be added to widget areas. Many themes may not have styles in them that expect galleries to appear in a widget context, since previously galleries would have only appeared in post content. As noted in §Default Themes Updates for <a class="ext-link" href="https://make.wordpress.org/core/2017/05/26/media-widgets-for-images-video-and-audio/"><span class="icon">​</span>Media Widgets for Images, Video, and Audio</a>:
</p>
<blockquote class="citation">
<p>
Themes that add custom styles to the MediaElement.js player (namely Twenty Thirteen and Twenty Fourteen) were updated from just styling it within syndicated content, to also include instances within widgets. Most themes don’t restrict styles for captioned images or media players to just post content, that is, limit CSS selectors to classes output by post_class(). If your theme does, make sure to either remove that constraint or include a .widget selector.
</p>
</blockquote>
<p>
In the same way for the Gallery widget, we need to make sure that all of the core themes are compatible. Gallery widgets need to be tested in all core themes and in each of their widget areas, while also changing settings like the number of columns and the image size, in order to check for the variations.
</p>
<p>
Once the core themes are updated then the changes will may be instructive for theme authors to make similar changes in their themes.
</p>
westonruterhttps://core.trac.wordpress.org/ticket/41969
https://core.trac.wordpress.org/ticket/41969Report#41962: Editor: Keep text selection between Visual and Text modesSat, 23 Sep 2017 21:20:38 GMTTue, 26 Sep 2017 13:30:01 GMT<h2 id="Summary">Summary</h2>
<p>
This proposal aims to improve the Editor experience by keeping the text selection when switching between Visual and Text modes.
</p>
<h2 id="AGIFisworthathousandwords">A GIF is worth a thousand words</h2>
<p>
<a style="padding:0; border:none" href="https://core.trac.wordpress.org/raw-attachment/ticket/41962/wordpress-selection-keep-v2.gif"><img src="https://core.trac.wordpress.org/raw-attachment/ticket/41962/wordpress-selection-keep-v2.gif" alt="https://core.trac.wordpress.org/raw-attachment/ticket/41962/wordpress-selection-keep-v2.gif" title="https://core.trac.wordpress.org/raw-attachment/ticket/41962/wordpress-selection-keep-v2.gif" /></a>
</p>
<h2 id="Whatisthis">What is this?</h2>
<p>
The editor has no functionality to save the selection in one mode and transfer it to the other. This patch adds a basic functionality that does that.
</p>
<p>
What is currently supported:
</p>
<ul><li>Cursor position is preserved
</li><li>Selection range is preserved
</li><li>Clicking inside an HTML tag in Text mode selects the whole tag. This prevents breaking of the element when switching to Visual mode
</li><li>Selecting an object (e.g. Image) in Visual mode should select the whole HTML tag in Text mode.
</li><li>The view is automatically scrolled to the selected position when switching between modes. This makes it easier to find where the current selection is, without having to manually scroll to find it.
</li><li>Support for some shortcodes, i.e. <tt>[caption]</tt>
</li></ul><h2 id="Totest">To test</h2>
<ol><li>Apply patch
</li><li>Open the editor
</li><li>Add content, click around, select things
</li><li>Switch between modes
</li><li>Try adding embeds
</li><li>Try adding shortcodes
</li></ol><p>
Look for JS errors in the console, weird behavior, etc.
</p>
<h2 id="Feedback">Feedback</h2>
<p>
Please, add any feedback as a comment here or as a comment on the development PR, linked below.
</p>
<h2 id="Currentstatus">Current status</h2>
<p>
The patch is still in development, as it requires some code polishing.
</p>
<p>
Current development is happening on GitHub, under this PR: <a class="ext-link" href="https://github.com/bisko/wordpress-develop/pull/1"><span class="icon">​</span>https://github.com/bisko/wordpress-develop/pull/1</a>
</p>
<p>
Once I finish up polishing, I will add the patch as an attachment here.
</p>
biskobehttps://core.trac.wordpress.org/ticket/41962
https://core.trac.wordpress.org/ticket/41962Report#41957: Fix Grunt tasks to run without needing access to svn or gitFri, 22 Sep 2017 17:32:06 GMTSun, 24 Sep 2017 10:34:42 GMT<p>
In the Grunt config we (cleverly) test which files were modified before running the <tt>precommit</tt> task to save some time and not process and test unmodified files.
</p>
<p>
However in some cases the <tt>svn</tt> or <tt>git</tt> commands may not be globally accessible in the terminal. This usually happens when they are installed as part of larger packages like IDEs, GUIs, etc.
</p>
<p>
In these cases we exit with an error but we can still perform all building and testing tasks.
</p>
azaozzhttps://core.trac.wordpress.org/ticket/41957
https://core.trac.wordpress.org/ticket/41957Report#41936: get_main_site_id ignores custom values of $current_site->blog_idWed, 20 Sep 2017 22:23:34 GMTMon, 25 Sep 2017 17:56:05 GMT<p>
The function <tt>get_main_site_id</tt> was added in <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/29684" title="enhancement: Add get_main_site_id() function (closed: fixed)">#29684</a> . This new function adds a way to get the main site id of the current network. This works on site id of the site with the same domain / path of the network. However, before the point of truth main site id was property on $current_site. Some domain mapping plugins build the <tt>$current_site</tt> and <tt>$current_blog</tt> manually. Build these globally manually means that the $current_site-&gt;blog_id will be set. Currently <tt>get_main_site_id</tt> ignores these values.
</p>
spacedmonkeyhttps://core.trac.wordpress.org/ticket/41936
https://core.trac.wordpress.org/ticket/41936Report#41917: Exclude more shortcodes in word counterMon, 18 Sep 2017 21:27:20 GMTMon, 18 Sep 2017 21:27:20 GMT<p>
Since <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/27386" title="defect (bug): Editor: Word count should exclude shortcodes (closed: fixed)">#27386</a> shortcodes are ignored in the word counter. But due to the way how shortcodes are passed to JavaScript the counter only ignores shortcodes which are registered before the <tt>init</tt> hook (or with a lower priority on <tt>init</tt>).
</p>
<p>
Attached patch moves the localization into <tt>wp_just_in_time_script_localization()</tt> to get access to <em>all</em> shortcodes.
</p>
ocean90https://core.trac.wordpress.org/ticket/41917
https://core.trac.wordpress.org/ticket/41917Report#41916: Exit early when test suite's install.php script cannot connect to the databaseMon, 18 Sep 2017 20:29:25 GMTMon, 18 Sep 2017 20:29:25 GMT<p>
If <tt>tests/phpunit/includes/install.php</tt> cannot connect to the database, it currently dumps HTML to <tt>STDOUT</tt>.
</p>
<p>
For scripts driving the test suite, it would be more helpful to exit early with return code 1 to designate the failure.
</p>
<p>
Related <a class="ext-link" href="https://github.com/WordPress/phpunit-test-reporter/issues/43"><span class="icon">​</span>https://github.com/WordPress/phpunit-test-reporter/issues/43</a>
</p>
danielbachhuberhttps://core.trac.wordpress.org/ticket/41916
https://core.trac.wordpress.org/ticket/41916Report#41898: "Back to {taxonomy}" should be a taxonomy labelSat, 16 Sep 2017 20:52:56 GMTFri, 22 Sep 2017 20:42:45 GMT<p>
On the term editing screen, a link with the phrase <tt>← Back to {taxonomy}</tt> is displayed after a term has been updated. This text should be moved into a taxonomy label so that more accurate translations can be provided for each taxonomy.
</p>
<p>
Ref: <a href="https://core.trac.wordpress.org/browser/trunk/src/wp-admin/edit-tag-form.php?rev=40668&amp;marks=78-79#L72">https://core.trac.wordpress.org/browser/trunk/src/wp-admin/edit-tag-form.php?rev=40668&amp;marks=78-79#L72</a>
</p>
johnbillionhttps://core.trac.wordpress.org/ticket/41898
https://core.trac.wordpress.org/ticket/41898Report#41894: Clear dirty flag on widgets admin screen when widget is deleted to prevent irrelevant “Are you sure?” promptSat, 16 Sep 2017 02:47:50 GMTTue, 26 Sep 2017 07:12:44 GMT<p>
With <a class="changeset" href="https://core.trac.wordpress.org/changeset/41352" title="Widgets: Add dirty state tracking for widgets on admin screen.
* Mark a ...">[41352]</a> for <a class="new ticket" href="https://core.trac.wordpress.org/ticket/41352" title="defect (bug): Media library - applying image and date filter redirects to homepage (new)">#41352</a> there is now an “Are you sure?” dialog that appears if you try leaving the widgets admin screen without first having saved a widget that you were modifying. This logic is not currently taking into account the scenario where by you delete a widget that you started making changes to. When a widget is deleted, any corresponding dirty flag also needs to be removed.
</p>
westonruterhttps://core.trac.wordpress.org/ticket/41894
https://core.trac.wordpress.org/ticket/41894Report#41888: Code Editor: Warning messagesThu, 14 Sep 2017 22:20:59 GMTWed, 20 Sep 2017 22:14:46 GMT<p>
In a style.css file I checked.
There are mysterious messages such as:
6 of the following:
"Using width with padding-left can sometimes make elements larger then you expect."
</p>
<p>
I also got a warning beside border: 1px solid #ddd
"Using width with border can sometimes make elements larger then you expect."
</p>
<p>
2 warnings in the following code.
"Outlines should only be modified using :focus. and
"Using width with padding can sometimes make elements larger then you expect."
</p>
<p>
There was also a very long warning message beside display: box. Basically with a lot of text saying that box is the wrong code to use.
</p>
<p>
I am hoping that this will be adjusted.
</p>
paaljoachimhttps://core.trac.wordpress.org/ticket/41888
https://core.trac.wordpress.org/ticket/41888Report#41887: Code Editor: Error disables the Update File button.Thu, 14 Sep 2017 22:15:17 GMTTue, 26 Sep 2017 17:07:50 GMT<p>
When there is an error in the code the Update File button is disabled.
It would be better to find another approach.
</p>
<p>
Such as giving a warning about saving the file etc... Leaving it up to the user to decide on saving the file.
</p>
paaljoachimhttps://core.trac.wordpress.org/ticket/41887
https://core.trac.wordpress.org/ticket/41887Report#41886: Code Editor: Auto scroll or click button to go to error.Thu, 14 Sep 2017 21:55:26 GMTTue, 26 Sep 2017 17:06:38 GMT<p>
It would be good to have an auto scroll to go to error that the code editor notices. (Or a button the user can click.) After fixing one error the user can click the button again to go to the next.
</p>
<p>
The Update File button should not be disabled.
</p>
<p>
Originally <a class="ext-link" href="https://github.com/WordPress/better-code-editing/issues/95"><span class="icon">​</span>https://github.com/WordPress/better-code-editing/issues/95</a>
</p>
<p>
See conversation at <a class="ext-link" href="https://wordpress.slack.com/archives/C0381N237/p1505425698000437"><span class="icon">​</span>https://wordpress.slack.com/archives/C0381N237/p1505425698000437</a>
</p>
paaljoachimhttps://core.trac.wordpress.org/ticket/41886
https://core.trac.wordpress.org/ticket/41886Report#41876: Add inline help to Custom HTML widgetWed, 13 Sep 2017 20:40:05 GMTTue, 26 Sep 2017 17:25:15 GMT<p>
There is no inline help in the Custom HTML widget for how to interact with the code editor. While the widget will add this to the help text on the widgets admin screen, this is not easily discoverable. Additionally, this help tab text is not displayed in the Customizer at all. Just like the Additional CSS section description in the Customizer, there could be a (?) icon in the widget, and once expanded it could reveal the same help text to guide usage of the widget. I suggest the icon could be placed in the top-right corner of the widget with the help text then appearing at the top when expanded, similar to the Customizer section description.
</p>
<p>
See also:
</p>
<ul><li><a class="closed ticket" href="https://core.trac.wordpress.org/ticket/41872" title="defect (bug): Code Editor: Minor accessibility improvements to the CodeMirror editing ... (closed: fixed)">#41872</a>
</li><li><a class="ext-link" href="https://github.com/WordPress/better-code-editing/issues/36"><span class="icon">​</span>https://github.com/WordPress/better-code-editing/issues/36</a>
</li><li><a class="ext-link" href="https://github.com/WordPress/better-code-editing/issues/64"><span class="icon">​</span>https://github.com/WordPress/better-code-editing/issues/64</a>
</li><li><a class="ext-link" href="https://wordpress.slack.com/archives/C02RP4X03/p1503940071000037"><span class="icon">​</span>https://wordpress.slack.com/archives/C02RP4X03/p1503940071000037</a>
</li><li><a class="ext-link" href="https://wordpress.slack.com/archives/C0381N237/p1505323129000204"><span class="icon">​</span>https://wordpress.slack.com/archives/C0381N237/p1505323129000204</a>
</li></ul><p>
Builds off of <a class="changeset" href="https://core.trac.wordpress.org/changeset/41376" title="Editor: Add CodeMirror-powered code editor with syntax highlighting, ...">[41376]</a> for <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/12423" title="feature request: Include default code editor (closed: fixed)">#12423</a>.
</p>
westonruterhttps://core.trac.wordpress.org/ticket/41876
https://core.trac.wordpress.org/ticket/41876Report#41874: Code Editor: Extend CSS linter to check for safecss-forbidden propertiesWed, 13 Sep 2017 18:18:06 GMTWed, 20 Sep 2017 22:14:46 GMT<p>
While there is a custom HTMLHint rule which checks for Kses violations, this does not extend to CSSLint and <tt>safecss_filter_attr()</tt>. It would be a nice enhancement to get illegal style properties flagged as lint errors as well.
</p>
<p>
Originally <a class="ext-link" href="https://github.com/WordPress/better-code-editing/issues/60"><span class="icon">​</span>https://github.com/WordPress/better-code-editing/issues/60</a>:
</p>
<blockquote class="citation">
<p>
The <tt>safecss_filter_attr()</tt> function is used by KSES to filter HTML <tt>style</tt> attributes, removing any properties that are illegal. This should be applied to CSS and <tt>style</tt> attributes in HTML, so that any illegal properties are flagged as such.
</p>
<p>
It seems that HTMLHint is not currently applying CSSLint to <tt>style</tt> attributes, but if it did, then a <tt>kses</tt> rule added to CSSLint could then apply to both HTML and CSS.
</p>
</blockquote>
<p>
This is for the code editor introduced in <a class="changeset" href="https://core.trac.wordpress.org/changeset/41376" title="Editor: Add CodeMirror-powered code editor with syntax highlighting, ...">[41376]</a> for <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/12423" title="feature request: Include default code editor (closed: fixed)">#12423</a>.
</p>
westonruterhttps://core.trac.wordpress.org/ticket/41874
https://core.trac.wordpress.org/ticket/41874Report#41873: Code Editor: Add PHP linterWed, 13 Sep 2017 18:15:18 GMTWed, 20 Sep 2017 22:14:46 GMT<p>
There is no PHP linter yet when editing PHP in the code editor (powered by CodeMirror, from <a class="changeset" href="https://core.trac.wordpress.org/changeset/41376" title="Editor: Add CodeMirror-powered code editor with syntax highlighting, ...">[41376]</a> for <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/12423" title="feature request: Include default code editor (closed: fixed)">#12423</a>). This would be a good enhancement, PHP syntax errors are the most critical thing to catch prior to saving in order to prevent whitescreening a site. Currently there are linters only for HTML, JS, CSS, and JSON.
</p>
<p>
See <a class="ext-link" href="https://github.com/WordPress/better-code-editing/issues/48#issuecomment-327963921"><span class="icon">​</span>https://github.com/WordPress/better-code-editing/issues/48#issuecomment-327963921</a>:
</p>
<blockquote class="citation">
<p>
Props to @rheinardkorf for finding <a class="ext-link" href="http://glayzzle.com/php-parser/#demo"><span class="icon">​</span>http://glayzzle.com/php-parser/#demo</a> !!
</p>
<p>
On GitHub: <a class="ext-link" href="https://github.com/glayzzle/php-parser"><span class="icon">​</span>https://github.com/glayzzle/php-parser</a>
</p>
<p>
I had previously stumbled across the <a class="ext-link" href="https://github.com/glayzzle/php-linter"><span class="icon">​</span>https://github.com/glayzzle/php-linter</a> project but it is empty. I didn't see the other project.
</p>
<p>
This holds great promise. The only icing on the cake here would be if the parser could be told which PHP version to use, but we could get a list of language features that are added after PHP 5.2 and mark them as errors when the version of PHP on the server is not new enough. Amazing.
</p>
</blockquote>
<p>
See more background on the original GitHub issue: <a class="ext-link" href="https://github.com/WordPress/better-code-editing/issues/48"><span class="icon">​</span>https://github.com/WordPress/better-code-editing/issues/48</a>
</p>
westonruterhttps://core.trac.wordpress.org/ticket/41873
https://core.trac.wordpress.org/ticket/41873Report#41871: Code Editor: Add unit testsWed, 13 Sep 2017 18:10:32 GMTWed, 20 Sep 2017 22:14:46 GMT<p>
PHPUnit tests should be added for <tt>wp_enqueue_code_editor()</tt> and <tt>WP_Widget_Custom_HTML</tt>.
</p>
<p>
See <a class="changeset" href="https://core.trac.wordpress.org/changeset/41376" title="Editor: Add CodeMirror-powered code editor with syntax highlighting, ...">[41376]</a> for <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/12423" title="feature request: Include default code editor (closed: fixed)">#12423</a>.
</p>
westonruterhttps://core.trac.wordpress.org/ticket/41871
https://core.trac.wordpress.org/ticket/41871Report#41870: Code Editor: Add grunt task for building new CodeMirror bundles from external dependenciesWed, 13 Sep 2017 18:06:08 GMTWed, 20 Sep 2017 23:55:53 GMT<p>
After <a class="changeset" href="https://core.trac.wordpress.org/changeset/41376" title="Editor: Add CodeMirror-powered code editor with syntax highlighting, ...">[41376]</a> for <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/12423" title="feature request: Include default code editor (closed: fixed)">#12423</a>, it would be ideal if the CodeMirror bundling logic (via browserify) could be added as part of core. In this way, the external dependencies (CodeMirror and the linter linraries) can be managed by NPM. For now, just the minified bundles are being included.
</p>
<p>
The logic used in the Better Code Editing plugin for creating the bundles can be seen here: <a class="ext-link" href="https://github.com/WordPress/better-code-editing/pull/92/files"><span class="icon">​</span>https://github.com/WordPress/better-code-editing/pull/92/files</a>
</p>
<p>
Depends on <a class="assigned ticket" href="https://core.trac.wordpress.org/ticket/40894" title="enhancement: Use Webpack instead of Browserify for build process (assigned)">#40894</a> which replaces Browserify with Webpack in core.
</p>
<p>
Additionally, the linters are currently being included as separate assets. They are not being minified, other than they are already minified as distributed. These could either benefit from additional uglification or bundling with codemirror if they are not going to be enqueued separately. The same goes for the <tt>htmlhint-kses</tt> script.
</p>
westonruterhttps://core.trac.wordpress.org/ticket/41870
https://core.trac.wordpress.org/ticket/41870Report#41851: Avoid more test skipping for situations that are actually errors or failuresMon, 11 Sep 2017 00:37:40 GMTTue, 19 Sep 2017 15:21:25 GMT<p>
This is a follow-up to <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/40533" title="task (blessed): Avoid test skipping for situations that are actually errors or failures (closed: fixed)">#40533</a> for the 4.9 cycle.
</p>
<p>
Some tests contain calls to <tt>markTestSkipped()</tt> as a result of situations such as incorrect test data or unsuitable test environments. If the test data isn't valid or the environment is not capable of supporting the test then the test should fail, otherwise the tests are not reliable.
</p>
johnbillionhttps://core.trac.wordpress.org/ticket/41851
https://core.trac.wordpress.org/ticket/41851Report#41850: Customize: Prevent panel sticky headers when scrolling if description is expandedMon, 11 Sep 2017 00:09:04 GMTWed, 20 Sep 2017 22:14:46 GMT<p>
When a section's description text is expandable and is included in the panel header area, it then becomes part of the area that is sticky when the panel is scrolled (per <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/34343" title="enhancement: Customizer: Make panel headers sticky? (closed: fixed)">#34343</a>). However, when the description is expanded and the user scrolls back up it can cause the header to jump unexpectedly:
</p>
<p>
See demonstration of issue: <a class="ext-link" href="https://youtu.be/TlgnUpo_8cQ"><span class="icon">​</span>https://youtu.be/TlgnUpo_8cQ</a>
</p>
<p>
The issue is more pronounced when the description text is longer, as will be the case in 4.9 for Custom CSS: <a class="ext-link" href="https://github.com/WordPress/better-code-editing/pull/84"><span class="icon">​</span>https://github.com/WordPress/better-code-editing/pull/84</a>
</p>
<p>
And from @melchoyce in duplicate <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/41879" title="defect (bug): Code Editors: Weird scrolling/click behavior in Additional CSS (closed: fixed)">#41879</a>:
</p>
<blockquote class="citation">
<p>
When I was testing the Additional CSS panel in trunk, I noticed that clicking into the textarea moves my whole screen down, which I found surprising and kind of alarming. Then, when I try to scroll back up to read, it snaps back up instead of naturally scrolling, which felt even more alarming. We should not make any sort of scroll/movement assumptions here.
</p>
<p>
Video: <a class="ext-link" href="https://cloudup.com/cvJbKNaZ6yg"><span class="icon">​</span>https://cloudup.com/cvJbKNaZ6yg</a>
</p>
</blockquote>
westonruterhttps://core.trac.wordpress.org/ticket/41850
https://core.trac.wordpress.org/ticket/41850Report#41844: Media: audio players overflow playlist containersSat, 09 Sep 2017 20:44:12 GMTTue, 26 Sep 2017 15:53:14 GMT<p>
This appears to have been caused by the new MediaElement.js player styles when that was recently updated (notably, with larger padding). Changing the core styling to use <tt>max-width</tt> seems to fix the issue. While the bug is partially visible at any playlist width, it's particularly noticeable at smaller widths such as in a sidebar via a plugin like Featured Audio.
</p>
<p>
I have not tested video but there may be a similar issue for video playlists now.
</p>
celloexpressionshttps://core.trac.wordpress.org/ticket/41844
https://core.trac.wordpress.org/ticket/41844Report#41796: WP_Term_Query problem using object_ids and number attributesMon, 04 Sep 2017 21:43:45 GMTFri, 15 Sep 2017 19:16:46 GMT<p>
Hi, how are you? hope so :)
I'm having a problem with the query generated by the WP_Term_Query class when using the "object_ids" and "number" attribute.
</p>
<p>
When the same term is associated in more than 1 post, the generated "request" repeats this term for each occurrence in "object_ids", so if I pass the "number" attribute with the value 8, it may happen that a number of terms lower than expected.
</p>
<p>
My suggestion is that when you have the "object_ids" attribute, force the distinct clause in the query.
</p>
elvishp2006https://core.trac.wordpress.org/ticket/41796
https://core.trac.wordpress.org/ticket/41796Report#41789: get_sites() returns an integer when 'count' is passed as a query varMon, 04 Sep 2017 08:14:22 GMTTue, 19 Sep 2017 16:59:53 GMT<p>
But the current @return tag only mentions an array.
</p>
ocean90https://core.trac.wordpress.org/ticket/41789
https://core.trac.wordpress.org/ticket/41789Report#41787: Media: JS error when removing a video/audio sourcedSun, 03 Sep 2017 21:37:19 GMTThu, 14 Sep 2017 18:54:37 GMT<p>
Noticed while investigating on <a class="reviewing ticket" href="https://core.trac.wordpress.org/ticket/38759" title="defect (bug): Accessibility glitch when editing an embedded video (reviewing)">#38759</a>.
</p>
<p>
To reproduce:
</p>
<ul><li>add a video or audio in a post
</li><li>click on the video/audio player to make the edit details button appear and click it
</li><li>a modal opens with the audio/video details
</li><li>click on "remove video source" (or audio)
</li><li>check your browser console:
</li></ul><p>
<tt>Uncaught TypeError: Cannot read property 'remove' of undefined</tt>
</p>
<p>
Happens also when adding and then removing additional, alternate video/audio sources.
</p>
<p>
Couldn't reproduce on stable 4.8.1 so seems a regression in trunk to me, probably related to recent MediaElement.js update (seems to me the whole $media and $node properties are missing).
</p>
aferciahttps://core.trac.wordpress.org/ticket/41787
https://core.trac.wordpress.org/ticket/41787Report#41759: WP_HTTP_Response: Use setter instead of directly accessing the $data propertyWed, 30 Aug 2017 14:54:50 GMTThu, 31 Aug 2017 01:25:08 GMT<p>
The constructor of the <tt>WP_HTTP_Response</tt> class (and thus also <tt>WP_REST_Response</tt>) has three arguments: <tt>$data</tt>, <tt>$status</tt> and <tt>$headers</tt>.
</p>
<p>
While there is a dedicated setter for each of the three properties, <tt>$data</tt> is set directly.
</p>
<p>
In order to enable people to rely on inheritane and automatically use overwritten methods, let's use the setter, please.
</p>
<p>
Patch will follow soonish.
</p>
tfrommenhttps://core.trac.wordpress.org/ticket/41759
https://core.trac.wordpress.org/ticket/41759Report#41752: Remove SWFUploadTue, 29 Aug 2017 15:39:37 GMTThu, 21 Sep 2017 16:34:32 GMT<p>
Development on <a class="ext-link" href="https://sourceforge.net/projects/swfupload.mirror/files/"><span class="icon">​</span>SWFUpload</a> stopped more than seven years ago. With WordPress' policy to keep plugins working, we had to <a class="ext-link" href="https://github.com/WordPress/secure-swfupload"><span class="icon">​</span>fork it</a> to be able to do security updates.
</p>
<p>
Currently it seems only a handful of old plugins are still using SWFUpload. It's time to say Goodbye :)
</p>
azaozzhttps://core.trac.wordpress.org/ticket/41752
https://core.trac.wordpress.org/ticket/41752Report#41729: Code Editors: Better design for foldersFri, 25 Aug 2017 19:11:42 GMTTue, 26 Sep 2017 20:04:20 GMT<p>
This is related to (and relies on) <a class="assigned ticket" href="https://core.trac.wordpress.org/ticket/6531" title="defect (bug): Recursively search for files in theme and plugin editors (assigned)">#6531</a>.
</p>
<p>
Let's make the file list easier to scan and introduce a way to collapse folders. See attached mockup.
</p>
melchoycehttps://core.trac.wordpress.org/ticket/41729
https://core.trac.wordpress.org/ticket/41729Report#41722: wpdb::db_connect() does not connect to IPv6 address of mysql serverThu, 24 Aug 2017 17:31:51 GMTWed, 13 Sep 2017 10:44:37 GMT<p>
There is currently no way to make WordPress to connect to MySQL server using IPv6 address
</p>
<div class="code"><pre><span class="cp">&lt;?php</span>
<span class="nb">define</span><span class="p">(</span><span class="s1">'DB_HOST'</span><span class="p">,</span> <span class="s1">'::1'</span><span class="p">);</span>
</pre></div><p>
Error establishing a database connection
</p>
<p>
in brackets:
</p>
<div class="code"><pre><span class="cp">&lt;?php</span>
<span class="nb">define</span><span class="p">(</span><span class="s1">'DB_HOST'</span><span class="p">,</span> <span class="s1">'[::1]'</span><span class="p">);</span>
</pre></div><p>
Error establishing a database connection
</p>
<p>
the only way it works by defining a hostname in /etc/hosts and then connecting to it, but its not available option on shared hosting when you dont have control over files in /etc/
</p>
<p>
quoting @sergeybiryukov :
</p>
<pre class="wiki">wpdb::db_connect() appears to treat everything after : as a port or socket:
https://core.trac.wordpress.org/browser/tags/4.8.1/src/wp-includes/wp-db.php?marks=1517-1535#L1504
</pre>fiereverehttps://core.trac.wordpress.org/ticket/41722
https://core.trac.wordpress.org/ticket/41722Report#41706: Remove failing tests from older branchesTue, 22 Aug 2017 20:16:03 GMTTue, 22 Aug 2017 20:17:06 GMT<p>
In WordPress 4.0 and earlier, the test suite contains intentionally failing tests which are skipped when the corresponding ticket is still open. This means that once the ticket is closed as fixed it immediately causes all earlier branches to fail unless the fix is backported. Hence why the 4.0 branch and earlier have a bunch of failing tests.
</p>
<p>
A lot of time has been spent backporting fixes in both <tt>tests</tt> and <tt>src</tt> to older branches in order to get the builds to pass (<a class="closed ticket" href="https://core.trac.wordpress.org/ticket/40534" title="task (blessed): Avoid skipping canonical tests for tickets that are open (closed: fixed)">#40534</a>, <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/30284" title="task (blessed): Remove failing automated tests from the suite (closed: fixed)">#30284</a> and others), but this is now at the point where it's no longer practical or a good use of time.
</p>
<p>
The failing tests in the 4.0, 3.9, 3.8, and 3.7 branches should be deleted so the branch builds pass again, making them useful for the management of point releases.
</p>
johnbillionhttps://core.trac.wordpress.org/ticket/41706
https://core.trac.wordpress.org/ticket/41706Report#41705: i18n: Avoid using HTML tags in translation strings in upgrade classesTue, 22 Aug 2017 19:09:12 GMTSun, 27 Aug 2017 21:38:45 GMT<p>
This patch removes HTML tags from translation strings. Replacing <tt>&lt;span class="code"&gt;%s&lt;/span&gt;</tt> with <tt>%s</tt> moving the HTML tags outside the string.
</p>
ramiyhttps://core.trac.wordpress.org/ticket/41705
https://core.trac.wordpress.org/ticket/41705Report#41699: Expired transients are not flushed by cronTue, 22 Aug 2017 10:54:20 GMTFri, 25 Aug 2017 20:36:25 GMT<p>
Hi there.
</p>
<p>
Is there a special reason why we delete expired transients only on <tt>get_transient</tt> attempt (<a class="ext-link" href="https://github.com/WordPress/WordPress/blob/master/wp-includes/option.php#L662"><span class="icon">​</span>https://github.com/WordPress/WordPress/blob/master/wp-includes/option.php#L662</a>), but not in <tt>cron.php</tt>?
</p>
<p>
I believe <a class="ext-link" href="https://github.com/WordPress/WordPress/blob/master/wp-admin/includes/upgrade.php#L1748-L1759"><span class="icon">​</span>https://github.com/WordPress/WordPress/blob/master/wp-admin/includes/upgrade.php#L1748-L1759</a> belongs in <tt>cron.php</tt>. Otherwise we're having leftover transients until it's attempted to retrieve them.
</p>
<p>
I will assume two cases from here:
</p>
<ul><li>It was done due to performance reasons. In which case there could've been a button in the wp-admin somewhere to flush the expired transients, or allow the users to enable/disable cron deletion through a config param in <tt>wp-config.php</tt>.
</li><li>It was a bad design decision. In which case we can copy the excerpt from <tt>upgrade.php</tt> to <tt>cron.php</tt> somewhere.
</li></ul><p>
In any case, I believe the fix is easy and doesn't have a big impact, while at the same time it allows us to keep the DB from being polluted.
</p>
bor0https://core.trac.wordpress.org/ticket/41699
https://core.trac.wordpress.org/ticket/41699Report#41698: Tests in the ms-files group are never runTue, 22 Aug 2017 10:45:17 GMTTue, 19 Sep 2017 16:57:41 GMT<p>
Tests in the <tt>ms-files</tt> group are not run by default, but there is also no configuration under which Travis CI (<tt>grunt travis:phpunit</tt>) or a local test run (<tt>grunt test</tt>) will run these tests.
</p>
<pre class="wiki">Not running ms-files tests. To execute these, use --group ms-files.
</pre><p>
A sub-task should be added to the <tt>phpunit</tt> task in <tt>Gruntfile.js</tt> to run these tests in the same way that the other excluded test groups such as <tt>ajax</tt> and <tt>external-http</tt> are run.
</p>
johnbillionhttps://core.trac.wordpress.org/ticket/41698
https://core.trac.wordpress.org/ticket/41698Report#41695: i18n: Avoid using HTML tags in translation strings (wp-admin/includes/class-theme-upgrader.php)Mon, 21 Aug 2017 23:04:21 GMTSun, 27 Aug 2017 21:38:33 GMT<p>
This patch removes HTML <tt>&lt;strong&gt;</tt> tags from translation strings. Replacing <tt>&lt;strong&gt;%s&lt;/strong&gt;</tt> with <tt>%s</tt> moving the HTML tags outside.
</p>
<p>
Old string:
</p>
<ul><li><tt>&lt;strong&gt;The parent theme could not be found.&lt;/strong&gt; You will need to install the parent theme, &lt;strong&gt;%s&lt;/strong&gt;, before you can use this child theme.</tt>
</li></ul><p>
New string:
</p>
<ul><li><tt>&lt;strong&gt;The parent theme could not be found.&lt;/strong&gt; You will need to install the parent theme, %s, before you can use this child theme.</tt>
</li></ul>ramiyhttps://core.trac.wordpress.org/ticket/41695
https://core.trac.wordpress.org/ticket/41695Report#41694: i18n: Avoid using HTML tags in translation strings (wp-signup.php)Mon, 21 Aug 2017 22:45:52 GMTSun, 27 Aug 2017 21:38:26 GMT<p>
The old translation string:
</p>
<p>
<tt>&lt;a href="%1$s"&gt;%2$s&lt;/a&gt; is your new site. &lt;a href="%3$s"&gt;Log in&lt;/a&gt; as &amp;#8220;%4$s&amp;#8221; using your existing password.</tt>
</p>
<p>
Is using <tt>&lt;a href="%1$s"&gt;%2$s&lt;/a&gt;</tt>. This can be replaced with a simple <tt>%1$s</tt> moving the HTML tags out of the string. Making is much easier for translation, especially in RTL languages like Hebrew where bi-directional languages are difficult to handle.
</p>
ramiyhttps://core.trac.wordpress.org/ticket/41694
https://core.trac.wordpress.org/ticket/41694Report#41692: REST API does not return featured_media for Audio/VideoMon, 21 Aug 2017 18:40:01 GMTSat, 26 Aug 2017 02:59:26 GMT<p>
Audio and Video attachments can have a featured image. This data is not currently returned by the REST API <tt>wp/v2/media</tt> endpoint. Part of the problem is that the schema for attachments is generated by the Post controller, even though the Post controller does not return data for attachments. Because the schema is used by the <tt>OPTIONS</tt> endpoint, before knowing what mime-type the attachment is, <tt>thumbnail</tt> should be set for attachment's attributes so that <tt>featured_media</tt> is added to the responses from <tt>wp/v2/media</tt>.
</p>
wonderboymusichttps://core.trac.wordpress.org/ticket/41692
https://core.trac.wordpress.org/ticket/41692Report#41689: Retire Press ThisMon, 21 Aug 2017 17:26:23 GMTTue, 26 Sep 2017 15:04:52 GMT<p>
Following the importers and the link manager, it's about time to say goodbye to Press This. Bookmarklets were popular seven - eight years ago, and now are considered mostly "old tech".
</p>
<p>
The Press This usage was dwindling for the last several years. Currently it is at under 0.2% of the wp-admin requests (as far as I can tell). In that terms it seems best to extract it from core to a plugin, similarly to the importers.
</p>
azaozzhttps://core.trac.wordpress.org/ticket/41689
https://core.trac.wordpress.org/ticket/41689Report#41684: Replace $wpdb->blogid with get_current_blog_id()Mon, 21 Aug 2017 10:50:33 GMTMon, 25 Sep 2017 18:10:11 GMT<p>
Similar to <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/41507" title="enhancement: Replace $wpdb-&gt;siteid with get_current_network_id() (closed: fixed)">#41507</a> currently the class level property of blogid is reference through the code. These should be replaced with get_current_blog_id() function calls.
</p>
spacedmonkeyhttps://core.trac.wordpress.org/ticket/41684
https://core.trac.wordpress.org/ticket/41684Report#41681: i18n: Avoid using HTML tags in translation strings (wp-admin/includes/meta-boxes.php)Sun, 20 Aug 2017 23:23:31 GMTSun, 20 Aug 2017 23:27:39 GMT<p>
This patch removes HTML <tt>&lt;b&gt;</tt> tags from translation strings.
</p>
<p>
Replacing: <tt>Uploaded on: &lt;b&gt;%1$s&lt;/b&gt;</tt>
</p>
<p>
With: <tt>Uploaded on: %s</tt>
</p>
<p>
The patch also rewrites the code abandoning the <tt>$datef</tt> and <tt>$stamp</tt> parameters. They are only used once. We don't need to declare them, we can do the same without declaring those params.
</p>
ramiyhttps://core.trac.wordpress.org/ticket/41681
https://core.trac.wordpress.org/ticket/41681Report#41668: i18n: Use %s placeholders in wp-admin/includes/template.phpFri, 18 Aug 2017 00:23:48 GMTSun, 20 Aug 2017 23:45:29 GMT<p>
This patch replaces the path, the functions and the actions with <tt>%s</tt> placeholder. This way translators can't mistakenly changes to wrong function names.
</p>
<p>
Old translation string:
</p>
<ul><li><tt>Likely direct inclusion of wp-admin/includes/template.php in order to use add_meta_box(). This is very wrong. Hook the add_meta_box() call into the add_meta_boxes action instead.</tt>
</li></ul><p>
New translation string:
</p>
<ul><li><tt>Likely direct inclusion of %1$s in order to use %2$s. This is very wrong. Hook the %2$s call into the %3$s action instead.</tt>
</li></ul><p>
The patch also adds translators comments and <tt>&lt;code&gt;</tt> tags around the function/action names.
</p>
ramiyhttps://core.trac.wordpress.org/ticket/41668
https://core.trac.wordpress.org/ticket/41668Report#41666: i18n: Use %s placeholders in wp-httpThu, 17 Aug 2017 23:36:46 GMTThu, 17 Aug 2017 23:40:42 GMT<p>
Old translation string:
</p>
<ul><li><tt>Could not open handle for fopen() to %s</tt>
</li></ul><p>
New translation string:
</p>
<ul><li><tt>Could not open handle for %1$s to %2$s.</tt>
</li></ul><p>
The function can be mistakenly changes by the translator. The best practice is to replace the <tt>fopen()</tt> function with a <tt>%s</tt> placeholder.
</p>
<p>
The patch also adds a period at the end of the sentence and adds translators comments.
</p>
ramiyhttps://core.trac.wordpress.org/ticket/41666
https://core.trac.wordpress.org/ticket/41666Report#41652: i18n: Use %s placeholders in network translation stringWed, 16 Aug 2017 13:19:05 GMTTue, 19 Sep 2017 16:55:33 GMT<p>
In the network translation string
</p>
<p>
<tt>The constant DO_NOT_UPGRADE_GLOBAL_TABLES cannot be defined when creating a network.</tt>
</p>
<p>
the constant name can be mistakenly changes by the translator.
</p>
<p>
The best practice is to replace the <tt>DO_NOT_UPGRADE_GLOBAL_TABLES</tt> constant with a <tt>%s</tt> placeholder.
</p>
<p>
The patch also adds <tt>&lt;code&gt;</tt> tag around the constant name.
</p>
ramiyhttps://core.trac.wordpress.org/ticket/41652
https://core.trac.wordpress.org/ticket/41652Report#41629: Widgets: Default to "custom URL" in the image widgetSun, 13 Aug 2017 18:14:27 GMTThu, 21 Sep 2017 18:14:19 GMT<p>
To help improve discoverability of custom URLs in the image widget, let's default to showing them rather than Link to: none.
</p>
<p>
See before/after screenshots.
</p>
melchoycehttps://core.trac.wordpress.org/ticket/41629
https://core.trac.wordpress.org/ticket/41629Report#41603: Custom date format field too small on mobileThu, 10 Aug 2017 14:23:16 GMTFri, 22 Sep 2017 20:38:58 GMT<p>
On Settings &gt; General, there is a field for entering a custom PHP date format string. This field is too small on mobile. The date preview is also broken up into two lines.
</p>
<p>
In <a class="reviewing ticket" href="https://core.trac.wordpress.org/ticket/34539" title="defect (bug): Image Sizes input fields on Media Settings page is too small (reviewing)">#34539</a>, the narrow field issue was addressed in other locations. Increasing the <tt>max-width</tt> here (it has its own CSS definition) does not necessarily fix the problem for this field.
</p>
<p>
The preview changes every time the option is changed, but it is displayed next to the custom option. If we move the preview to its own line, it fixes the issue of the preview being split up, and allows the field to be widened quite a bit.
</p>
desrosjhttps://core.trac.wordpress.org/ticket/41603
https://core.trac.wordpress.org/ticket/41603Report#41592: Correct $wp_registered_widget_controls global reference in wp_register_sidebar_widget()Wed, 09 Aug 2017 06:05:27 GMTWed, 09 Aug 2017 06:16:17 GMT<p>
the function in define global variable is $wp_registered_widget_controls but comments in define$wp_register_widget_defaults
</p>
upadalavipulhttps://core.trac.wordpress.org/ticket/41592
https://core.trac.wordpress.org/ticket/41592Report#41566: Function Description : /wp-signup.phpFri, 04 Aug 2017 19:49:00 GMTFri, 04 Aug 2017 20:21:37 GMT<p>
There is no descrption for global vars
</p>
mt8.bizhttps://core.trac.wordpress.org/ticket/41566
https://core.trac.wordpress.org/ticket/41566Report#41562: PHP 7.2: create_function deprecation in \Gettext_Translations classFri, 04 Aug 2017 15:33:25 GMTFri, 04 Aug 2017 16:09:51 GMT<p>
Please see <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/37082" title="enhancement: Remove (most) uses of create_function() from core (closed: fixed)">#37082</a> for the complement issue, and <a class="new ticket" href="https://core.trac.wordpress.org/ticket/40109" title="task (blessed): Ensure PHP 7.2 compatibility in tests (and core) (new)">#40109</a> for the parent issue.
</p>
<p>
Please see Sara's (who is one of the leading contributors to PHP 7.2) ticket <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/37082" title="enhancement: Remove (most) uses of create_function() from core (closed: fixed)">#37082</a> for information. Her patches fixed majority of the erros for <tt>create_function()</tt>.
</p>
<p>
I tried a new approach, similar to how <tt>Closure</tt> class works in modern PHP versions.
</p>
<p>
<tt>\Gettext_Translations::make_plural_form_function</tt> function returns a callable, which can also be in the form of <tt>[$object, 'method']</tt>. Please review this new approach with the <tt>\TranslationMultipleFormCallback</tt> class. It still calls <tt>eval()</tt> because there is no other way to evaluate nplural formulas without a comprehensive parser.
</p>
<p>
<tt>create_function()</tt> is no better than <tt>eval()</tt> because it is merely a thin wrapper around <tt>eval()</tt>.
</p>
<p>
With the patch in <a class="new ticket" href="https://core.trac.wordpress.org/ticket/41457" title="defect (bug): WP_REST_Comments_Controller::check_read_post_permission() counts an ... (new)">#41457</a> applied, there is only 1 PHP error in Travis CI PHP 7.2 builds! : <a class="ext-link" href="https://travis-ci.org/Ayesh/wordpress-develop/jobs/261036177#L1257"><span class="icon">​</span>https://travis-ci.org/Ayesh/wordpress-develop/jobs/261036177#L1257</a>
</p>
ayeshrajanshttps://core.trac.wordpress.org/ticket/41562
https://core.trac.wordpress.org/ticket/41562Report#41557: Customize edit shortcuts mispositioned when nested inside Twenty Seventeen frontpage panelThu, 03 Aug 2017 23:28:00 GMTThu, 03 Aug 2017 23:37:44 GMT<p>
When using a plugin like Customize Posts which adds nested partials inside of the front page panels, the edit shortcuts for these nested partials are mispositioned in Twenty Seventeen due to this CSS selector:
</p>
<div class="code"><pre><span class="c">/* Add some space around the visual edit shortcut buttons. */</span>
<span class="nc">.twentyseventeen-panel</span> <span class="nc">.customize-partial-edit-shortcut</span> <span class="nt">button</span> <span class="p">{</span>
<span class="k">top</span><span class="o">:</span> <span class="m">30px</span><span class="p">;</span>
<span class="k">left</span><span class="o">:</span> <span class="m">30px</span><span class="p">;</span>
<span class="p">}</span>
</pre></div><p>
It should instead be using direct descendent selectors like so:
</p>
<div class="code"><pre><span class="c">/* Add some space around the visual edit shortcut buttons. */</span>
<span class="nc">.twentyseventeen-panel</span> <span class="o">&gt;</span> <span class="nc">.customize-partial-edit-shortcut</span> <span class="o">&gt;</span> <span class="nt">button</span> <span class="p">{</span>
<span class="k">top</span><span class="o">:</span> <span class="m">30px</span><span class="p">;</span>
<span class="k">left</span><span class="o">:</span> <span class="m">30px</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>westonruterhttps://core.trac.wordpress.org/ticket/41557
https://core.trac.wordpress.org/ticket/41557Report#41549: REST API: Use `wp.apiRequest` helper in `wp.api` Backbone clientThu, 03 Aug 2017 14:50:13 GMTThu, 03 Aug 2017 14:50:13 GMT<p>
Follow-up to <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/40919" title="enhancement: REST API: Allow overriding `jQuery.ajax` calls from within wp-admin (closed: fixed)">#40919</a>. The <tt>wp-api.js</tt> Backbone client should use <tt>wp.apiRequest</tt> to do its API calls. This may be accomplished through overriding <tt>Backbone.ajax</tt> or through a change in the <tt>wp-api.js</tt> code.
</p>
<p>
This will allow client-side code to override or modify all WP REST API calls in a single, centralized place.
</p>
<p>
cc @adamsilverstein for your thoughts on the best way to achieve this.
</p>
jnylen0https://core.trac.wordpress.org/ticket/41549
https://core.trac.wordpress.org/ticket/41549Report#41526: Remove usage of each() from Text_Diff_Engine_nativeWed, 02 Aug 2017 00:14:25 GMTFri, 22 Sep 2017 09:15:44 GMT<p>
Ticket split out from <a class="new ticket" href="https://core.trac.wordpress.org/ticket/40109" title="task (blessed): Ensure PHP 7.2 compatibility in tests (and core) (new)">#40109</a>.
</p>
<p>
<tt>Text_Diff_Engine_native::_diag()</tt> uses <tt>each()</tt>, which is deprecated in PHP 7.2 and therefore should be removed.
</p>
<p>
The <tt>each()</tt> function exhibits two pieces of behaviour which mean it can't simply be replaced with <tt>foreach()</tt>:
</p>
<ol><li>After <tt>each()</tt> has executed, the array cursor will be left on the next element of the array, or past the last element if it hits the end of the array. This means you can break out of an each loop, and continue the iteration at a later point. <tt>Text_Diff_Engine_native::_diag()</tt> does just this.
</li><li>With the <tt>while ( each( $array ) )</tt> pattern, it's possible to alter the elements in the array during iteration.
</li></ol><hr />
<p>
<tt>Text_Diff_Engine_native::_diag()</tt> iterates over <tt>$matches</tt> with <tt>each()</tt> until the condition which causes the <tt>break</tt> clause is met, upon which the second call to <tt>each()</tt> continues iteration from the same point in the array. Lovely.
</p>
<p>
The <tt>Text_Diff</tt> library is a complex, third-party script with no test coverage, so changes here need to be made carefully. Unit tests probably could be introduced to demonstrate no regressions when <tt>each()</tt> is replaced.
</p>
johnbillionhttps://core.trac.wordpress.org/ticket/41526
https://core.trac.wordpress.org/ticket/41526Report#41525: Remove usage of each() from WP_PHPUnit_Util_GetoptTue, 01 Aug 2017 23:56:03 GMTFri, 04 Aug 2017 00:42:43 GMT<p>
Ticket split out from <a class="new ticket" href="https://core.trac.wordpress.org/ticket/40109" title="task (blessed): Ensure PHP 7.2 compatibility in tests (and core) (new)">#40109</a>.
</p>
<p>
<tt>WP_PHPUnit_Util_Getopt::__construct()</tt> uses <tt>each()</tt>, which is deprecated in PHP 7.2 and therefore should be removed.
</p>
<p>
The <tt>each()</tt> function exhibits two pieces of behaviour which mean it can't simply be replaced with <tt>foreach()</tt>:
</p>
<ol><li>After <tt>each()</tt> has executed, the array cursor will be left on the next element of the array, or past the last element if it hits the end of the array. This means you can break out of an each loop, and continue the iteration at a later point. <tt>Text_Diff_Engine_native::_diag()</tt> does just this.
</li><li>With the <tt>while ( each( $array ) )</tt> pattern, it's possible to alter the elements in the array during iteration.
</li></ol><hr />
<p>
<tt>WP_PHPUnit_Util_Getopt::__construct()</tt> does just this, but in a very non-obvious manner. <tt>$argv</tt> is passed into <tt>PHPUnit_Util_Getopt::parseLongOption()</tt> as a <em>reference</em> (<a class="ext-link" href="https://github.com/sebastianbergmann/phpunit/blob/a3b2fc068fdf4f9392da1fffec3782e3454bf971/src/Util/Getopt.php#L107-L107"><span class="icon">​</span>ref</a>), whereupon its array cursor is moved on (<a class="ext-link" href="https://github.com/sebastianbergmann/phpunit/blob/a3b2fc068fdf4f9392da1fffec3782e3454bf971/src/Util/Getopt.php#L140-L145"><span class="icon">​</span>ref</a>) under some condition.
</p>
<p>
This mess needs to be fixed.
</p>
johnbillionhttps://core.trac.wordpress.org/ticket/41525
https://core.trac.wordpress.org/ticket/41525Report#41524: Remove usage of each() from WP_UpgraderTue, 01 Aug 2017 23:32:53 GMTMon, 25 Sep 2017 21:15:16 GMT<p>
Ticket split out from <a class="new ticket" href="https://core.trac.wordpress.org/ticket/40109" title="task (blessed): Ensure PHP 7.2 compatibility in tests (and core) (new)">#40109</a>.
</p>
<p>
<tt>WP_Upgrader::clear_destination()</tt> uses <tt>each()</tt>, which is deprecated in PHP 7.2 and therefore should be removed.
</p>
<p>
The <tt>each()</tt> function exhibits two pieces of behaviour which mean it can't simply be replaced with <tt>foreach()</tt>:
</p>
<ol><li>After <tt>each()</tt> has executed, the array cursor will be left on the next element of the array, or past the last element if it hits the end of the array. This means you can break out of an each loop, and continue the iteration at a later point. <tt>Text_Diff_Engine_native::_diag()</tt> does just this.
</li><li>With the <tt>while ( each( $array ) )</tt> pattern, it's possible to alter the elements in the array during iteration. <tt>WP_Upgrader::clear_destination()</tt> does this.
</li></ol>johnbillionhttps://core.trac.wordpress.org/ticket/41524
https://core.trac.wordpress.org/ticket/41524Report#41521: Menu list with dropdown icon alignment bug in responsive.Tue, 01 Aug 2017 20:26:59 GMTWed, 06 Sep 2017 19:40:18 GMT<p>
In Menu List text added margin-top: 2px; Due to that text display down compare to dropdown icon. @media max-width is 782px to check issue. I have added screenshot for it.
</p>
punit5658https://core.trac.wordpress.org/ticket/41521
https://core.trac.wordpress.org/ticket/41521Report#41514: Registration links disappear after requesting a password reset linkTue, 01 Aug 2017 15:15:22 GMTThu, 03 Aug 2017 11:55:36 GMT<p>
After requesting a password reset link at example.com/wp-login.php?action=lostpassword, the registration links (that were under the Log In button) disappear. See the attached screenshot(s) for visuals.
</p>
henry.wrighthttps://core.trac.wordpress.org/ticket/41514
https://core.trac.wordpress.org/ticket/41514Report#41457: WP_REST_Comments_Controller::check_read_post_permission() counts an uncountable valueThu, 27 Jul 2017 16:43:18 GMTFri, 04 Aug 2017 10:55:52 GMT<p>
From <a class="new ticket" href="https://core.trac.wordpress.org/ticket/40109" title="task (blessed): Ensure PHP 7.2 compatibility in tests (and core) (new)">#40109</a>.
</p>
<p>
In <tt>WP_REST_Comments_Controller::check_read_post_permission()</tt>, <tt>count()</tt> is called on <tt>$request['post']</tt>, but the value of this variable isn't always countable. This causes a warning in PHP 7.2.
</p>
<p>
From some testing, <tt>$request['post']</tt> can be an integer, an empty array, an array of integers, or null. All of these types need to be accounted for in this method's logic.
</p>
johnbillionhttps://core.trac.wordpress.org/ticket/41457
https://core.trac.wordpress.org/ticket/41457Report#41453: Users with no role on a site on a multisite network see inaccessible links in the admin toolbarWed, 26 Jul 2017 23:52:46 GMTThu, 27 Jul 2017 00:26:07 GMT<p>
Previously, for single site installations: <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/25162" title="defect (bug): Users with no role can see inaccessible dashboard links (closed: fixed)">#25162</a>
</p>
<p>
A user who is a member of a site on a multisite network but has no role on the site will encounter mostly the same problems as those which were fixed for single site users in <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/25162" title="defect (bug): Users with no role can see inaccessible dashboard links (closed: fixed)">#25162</a>:
</p>
<ul><li>An immediate "You do not have sufficient permissions" error upon logging in.
</li><li>An admin toolbar link to <tt>My Sites</tt>, which they cannot access.
</li><li>An admin toolbar link to their profile, which they cannot edit.
</li><li>An admin toolbar submenu link to the <tt>Dashboard</tt> of their site, which they cannot access.
</li><li>A link to the <tt>Dashboard</tt> from <tt>My Sites</tt>, which they cannot access (if they're a member of at least one site with a role).
</li></ul>johnbillionhttps://core.trac.wordpress.org/ticket/41453
https://core.trac.wordpress.org/ticket/41453Report#41430: TinyMCE: "highlight" the image caption DL when the image is selectedTue, 25 Jul 2017 08:16:03 GMTTue, 25 Jul 2017 08:16:03 GMT<p>
Follow up from <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/41408" title="defect (bug): TinyMCE: Images with link and caption look &#34;broken&#34; when selected (closed: fixed)">#41408</a>. When an image with a caption is selected, or the caption field is focused, it would be good to indicate that the image is part of a larger object.
</p>
azaozzhttps://core.trac.wordpress.org/ticket/41430
https://core.trac.wordpress.org/ticket/41430Report#41426: Admin: Password protected text class in the posts listMon, 24 Jul 2017 17:55:32 GMTSun, 30 Jul 2017 15:48:31 GMT<p>
Password protected posts (and CPTs) have this text as a fallback for excerpt in the list of posts:
</p>
<pre class="wiki">There is no excerpt because this is a protected post.
</pre><p>
They should have a proper span with a class like <tt>.post-password-state</tt>, like it's done with "Password protected" text and its <tt>.post-state</tt>.
</p>
<p>
This will allow to better customize the styles of the screen.
</p>
slaFFikhttps://core.trac.wordpress.org/ticket/41426
https://core.trac.wordpress.org/ticket/41426Report#41407: Updating a plugin from the Plugin Install Screen throws a JavaScript errorSat, 22 Jul 2017 15:02:54 GMTSat, 22 Jul 2017 17:15:22 GMT<p>
Hi,
</p>
<p>
<tt>/wp-admin/js/updates.js</tt> when refreshing the screen to decrement the count needs <tt>window._wpUpdatesItemCounts</tt> to be set. This is done using <tt>wp_localize_script()</tt> in the regular plugins list table. But this is not done in the plugin *install* list table.
</p>
<p>
When going into the Plugin Install screen having a plugin to upgrade we get this :
</p>
<p>
<a style="padding:0; border:none" href="https://cldup.com/U0tmTYg-Dr.png"><img src="https://cldup.com/U0tmTYg-Dr.png" alt="https://cldup.com/U0tmTYg-Dr.png" title="https://cldup.com/U0tmTYg-Dr.png" /></a>
</p>
<p>
If from there i click on the "Update Now" button, i get this result :
</p>
<p>
<a style="padding:0; border:none" href="https://cldup.com/NWin8FrfHg.png"><img src="https://cldup.com/NWin8FrfHg.png" alt="https://cldup.com/NWin8FrfHg.png" title="https://cldup.com/NWin8FrfHg.png" /></a>
</p>
<p>
The plugin is updated, but the screen is not refreshed. Bubbles in the WP Admin Bar and in the menu still show there's one plugin to upgrade.
</p>
<p>
<a style="padding:0; border:none" href="https://cldup.com/bwTZrH0S9G.png"><img src="https://cldup.com/bwTZrH0S9G.png" alt="https://cldup.com/bwTZrH0S9G.png" title="https://cldup.com/bwTZrH0S9G.png" /></a>
</p>
<p>
And there's actually a JavaScript error because <tt>window._wpUpdatesItemCounts</tt> is undefined.
</p>
<p>
Using the patch i'm adding to this ticket, it's solving the issue.
</p>
imathhttps://core.trac.wordpress.org/ticket/41407
https://core.trac.wordpress.org/ticket/41407Report#41399: Document $ini_all staticvar in wp_is_ini_value_changeable()Fri, 21 Jul 2017 17:11:28 GMTSat, 05 Aug 2017 15:08:33 GMT<p>
The static variable $ini_all use in the function but not mention in documentation of the function.
</p>
nileshdudakiya94https://core.trac.wordpress.org/ticket/41399
https://core.trac.wordpress.org/ticket/41399Report#41380: Add missing docs for the $data parameter for WP_Http::browser_redirect_compatibility()Thu, 20 Jul 2017 12:03:14 GMTThu, 03 Aug 2017 15:34:26 GMT<p>
Documentation needs improvement.parameter passed but not defined.
</p>
ronakganatrahttps://core.trac.wordpress.org/ticket/41380
https://core.trac.wordpress.org/ticket/41380Report#41327: Bump Akismet External - 4.9 EditionFri, 14 Jul 2017 14:03:15 GMTTue, 19 Sep 2017 20:22:43 GMT<p>
Previously <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/40002" title="task (blessed): Bump Akismet External - 4.7.x/4.8 Edition (closed: fixed)">#40002</a> and others.
</p>
<p>
Akismet 3.3.3 has been released so the external needs to bumped to:
<tt>akismet http://plugins.svn.wordpress.org/akismet/tags/3.3.3/</tt>
</p>
<p>
Once complete, the ticket can be closed and I'll reopen this one as needed for the duration of the 4.9 cycle.
</p>
<p>
This should be applied to both trunk and the 4.8 branch for points until 4.9 ships. I'll mark it with the latest 4.8.x milestone to ensure a point doesn't ship before it gets bumped.
</p>
kraftbjhttps://core.trac.wordpress.org/ticket/41327
https://core.trac.wordpress.org/ticket/41327Report#41322: Document $default_scripts parameter in _WP_Editors::enqueue_scripts()Fri, 14 Jul 2017 09:28:58 GMTMon, 07 Aug 2017 01:23:28 GMT<p>
bool $default_scripts passed as a parameter in the function but not mention in the documentation of the function.
</p>
ajayghaghretiya1https://core.trac.wordpress.org/ticket/41322
https://core.trac.wordpress.org/ticket/41322Report#41305: Add lazily evaluated translationsThu, 13 Jul 2017 11:16:56 GMTWed, 09 Aug 2017 22:41:54 GMT<p>
In the context of <a class="new ticket" href="https://core.trac.wordpress.org/ticket/40988" title="enhancement: Use objects for `get_item_schema()` calls (new)">#40988</a>, I did a few performance tests and experimented with adding a lazily evaluated translation object.
</p>
<p>
The general principle is this:
</p>
<p>
Instead of returning the resulting string of a translation, return an object for which the <tt>__toString()</tt> and <tt>jsonSerialize()</tt> methods will fetch the resulting string instead.
</p>
<p>
I tested by having the <tt>__()</tt> method return such a proxy object, instead of the actual translated string.
</p>
<p>
From a quick profiling run on <tt>wptrunk.dev/wp-json/wp/v2/posts</tt>, I got the following results:
</p>
<p>
Returning a <tt>translate()</tt> from <tt>__()</tt>:
</p>
<pre class="wiki">Wall Time 162ms
CPU Time 157ms
I/O Time 5.48ms
Memory 16.5MB
Network n/a n/a n/a
SQL 4.41ms 13rq
</pre><p>
Returning a <tt>TranslationProxy</tt> from <tt>__()</tt>:
</p>
<pre class="wiki">Wall Time 144ms -19ms -14.9%
CPU Time 138ms -18ms -15.4%
I/O Time 5.33ms -154µs -3.0%
Memory 16.6MB +81.6KB n/s
Network n/a n/a n/a
SQL 4.33ms 13rq
</pre><p>
As you can see, this shaved off almost 15% from this simple request.
</p>
<p>
It saved 2255 calls to <tt>translate()</tt>, 2157 calls to <tt>get_translations_for_domain()</tt> and, more importantly still, 2156 calls to <tt>apply_filters()</tt> (which could involve a lot of additional processing in some cases).
</p>
<p>
The main problem with this approach is that WordPress does not contain real type-hinting, so BC is broken wherever the proxy is not echoed, but used directly.
</p>
<p>
As we cannot possibly foresee how plugins might use their localized strings, I suggest adding new lazy variations of the translation functions. To mirror the "echo" variations that prefix the translation functions with an <tt>e</tt>, I'd suggest using the <tt>l</tt> prefix for these variations:
</p>
<div class="code"><pre><span class="x">// Lazily retrieve the translation of $text.
_l( $text , $domain = 'default' );
// Lazily retrieve the translation of $text and escape it for safe use in an attribute.
esc_attr_l( $text, $domain = 'default' );
// Lazily retrieve the translation of $text and escape it for safe use in HTML output.
esc_html_l( $text, $domain = 'default' );
// Lazily retrieve translated string with gettext context.
_lx( $text, $context, $domain = 'default' );
// Lazily translate string with gettext context, and escape it for safe use in an attribute.
esc_attr_lx( $text, $context, $domain = 'default' );
// Lazily translate string with gettext context, and escape it for safe use in HTML output.
esc_html_lx( $text, $context, $domain = 'default' );
</span></pre></div><p>
Arbitrary testing has shown that using such lazily evaluated translations strategically can improve the performance by 10-30% for certain scenarios.
</p>
<p>
Implementing them in this BC fashion allows us to fine-tune Core usage and make it available to plugins, while playing it safe with existing code.
</p>
schlesserahttps://core.trac.wordpress.org/ticket/41305
https://core.trac.wordpress.org/ticket/41305Report#41293: wp_get_post_terms do not work with 'id=>name' argumentWed, 12 Jul 2017 07:56:31 GMTMon, 21 Aug 2017 15:49:27 GMT<p>
Hi, i'm not sure is that really bug, let me explain it.
When i used code below it doesn't worked for me.
</p>
<div class="code"><pre><span class="cp">&lt;?php</span>
<span class="nv">$terms</span> <span class="o">=</span> <span class="nx">wp_get_post_terms</span><span class="p">(</span><span class="nv">$post_id</span><span class="p">,</span> <span class="nv">$taxonomy</span><span class="p">,</span> <span class="k">array</span><span class="p">(</span>
<span class="s1">'fields'</span> <span class="o">=&gt;</span> <span class="s1">'id=&gt;name'</span><span class="p">,</span>
<span class="p">));</span>
<span class="c1">// returns
// array(0 =&gt; 'term name 1', 1 =&gt; 'term name 2')
</span></pre></div><p>
The term ID is just an index of array, so i tried to find the reason.
After trace the core code i found the problem in wp_get_object_terms function.
</p>
<div class="code"><pre><span class="cp">&lt;?php</span>
<span class="nv">$terms</span> <span class="o">=</span> <span class="nb">array_merge</span><span class="p">(</span> <span class="nv">$terms</span><span class="p">,</span> <span class="nx">get_terms</span><span class="p">(</span> <span class="nv">$args</span> <span class="p">)</span> <span class="p">);</span>
</pre></div><p>
When $terms array was merged, the term ID ( array keys ) were reindexed.
I don't know what logic is the best in this situation, but the array_merge function is not right method i think.
</p>
<div class="code"><pre><span class="cp">&lt;?php</span>
<span class="c1">// maybe something like this ?
</span><span class="nv">$terms</span> <span class="o">=</span> <span class="nv">$terms</span> <span class="o">+</span> <span class="nx">get_terms</span><span class="p">(</span> <span class="nv">$args</span> <span class="p">);</span>
</pre></div><p>
My english is poor, so take a look for code at first.
</p>
dany2217https://core.trac.wordpress.org/ticket/41293
https://core.trac.wordpress.org/ticket/41293Report#41285: Remove $site_id and $public multisite globals that are no longer usedMon, 10 Jul 2017 18:13:17 GMTTue, 19 Sep 2017 16:41:56 GMT<p>
As @jeremyfelt noted in <a href="https://core.trac.wordpress.org/ticket/39419#comment:3">#39419</a> and <a href="https://core.trac.wordpress.org/ticket/34217#comment:3">#34217</a>, there are two globals used in ms-settings.php that are no longer used anywhere else by core, <tt>$site_id</tt> and <tt>$public</tt>.
</p>
<p>
Can we explore removing these?
</p>
earnjamhttps://core.trac.wordpress.org/ticket/41285
https://core.trac.wordpress.org/ticket/41285Report#41270: Allow deletion of plugins or themes from the Updates screenFri, 07 Jul 2017 18:59:05 GMTMon, 25 Sep 2017 16:37:39 GMT<p>
A suggestion from @matt on a recent <a class="ext-link" href="https://make.wordpress.org/core/2017/06/20/dev-chat-agenda-for-june-21st-4-8-1-week-1/#comment-32735"><span class="icon">​</span>dev chat update thread</a>:
</p>
<blockquote class="citation">
<p>
Sometimes when you get an update notice for something, you realize you don’t need it. (Like old twenty* themes.) Ability to delete a plugin or theme from the updates screen, instead of updating it.
</p>
</blockquote>
melchoycehttps://core.trac.wordpress.org/ticket/41270
https://core.trac.wordpress.org/ticket/41270Report#41228: No way to get the post ID after a comment is deletedMon, 03 Jul 2017 10:56:07 GMTMon, 25 Sep 2017 16:35:06 GMT<p>
If we hook to <tt>deleted_comment</tt> we get given <tt>$comment_ID</tt> but at this point the comment has been removed from the database so we can't do things like this:
</p>
<pre class="wiki">$comment = get_comment( $comment_ID );
echo $comment-&gt;comment_post_ID;
</pre><p>
Can we pass a 2nd arg to <tt>do_action()</tt>? For example:
</p>
<p>
<tt>do_action( 'deleted_comment', $comment-&gt;comment_ID, $post_id );</tt>
</p>
henry.wrighthttps://core.trac.wordpress.org/ticket/41228
https://core.trac.wordpress.org/ticket/41228Report#41156: Refactor Emoji browser support tests to prevent repetition.Sun, 25 Jun 2017 06:44:42 GMTMon, 18 Sep 2017 07:47:32 GMT<p>
The tests for <a href="https://core.trac.wordpress.org/browser/tags/4.8/src/wp-includes/js/wp-emoji-loader.js?marks=39-97#L39">Emoji browser support</a> writes to and clears the canvas several times.
</p>
<p>
The code to do this is repeated a number of times and should be refactored. The repitition lead to a couple of (unreleased) bugs recently.
</p>
peterwilsoncchttps://core.trac.wordpress.org/ticket/41156
https://core.trac.wordpress.org/ticket/41156Report#41143: Theme/plugin editing: if you don't select a function it just returns without messageFri, 23 Jun 2017 18:22:52 GMTTue, 26 Sep 2017 09:43:25 GMT<p>
The drop down simply returns nothing, could we have a message to say something like 'please search for something'? It feels a little of a hitch in the flow otherwise.
</p>
<p>
<a style="padding:0; border:none" href="https://cldup.com/B7kYDlxlUF.png"><img src="https://cldup.com/B7kYDlxlUF.png" alt="https://cldup.com/B7kYDlxlUF.png" title="https://cldup.com/B7kYDlxlUF.png" /></a>
</p>
karmatosedhttps://core.trac.wordpress.org/ticket/41143
https://core.trac.wordpress.org/ticket/41143Report#41124: TinyMCE popup doesn't works with latest releaseThu, 22 Jun 2017 11:01:29 GMTTue, 08 Aug 2017 19:49:19 GMT<p>
I'm using TinyMCE popup for a custom plugin, with latest WordPress 4.8, it throws a error.
<a style="padding:0; border:none" href="https://monosnap.com/file/3vlSZSNz47BObS8KfSKKvaTOzYH3Yw.png"><img src="https://monosnap.com/file/3vlSZSNz47BObS8KfSKKvaTOzYH3Yw.png" alt="https://monosnap.com/file/3vlSZSNz47BObS8KfSKKvaTOzYH3Yw.png" title="https://monosnap.com/file/3vlSZSNz47BObS8KfSKKvaTOzYH3Yw.png" /></a>
</p>
<p>
I dig in deeper, and found out, the changes in
<a href="https://core.trac.wordpress.org/changeset/40583">https://core.trac.wordpress.org/changeset/40583</a>
<a class="ext-link" href="https://build.trac.wordpress.org/changeset/40453/"><span class="icon">​</span>https://build.trac.wordpress.org/changeset/40453/</a>, are causing the issue.
</p>
<p>
<a class="ext-link" href="https://build.trac.wordpress.org/browser/trunk/wp-includes/js/tinymce/tiny_mce_popup.js#L56"><span class="icon">​</span>https://build.trac.wordpress.org/browser/trunk/wp-includes/js/tinymce/tiny_mce_popup.js#L56</a>
<a class="ext-link" href="https://build.trac.wordpress.org/browser/trunk/wp-includes/js/tinymce/utils/mctabs.js#L15"><span class="icon">​</span>https://build.trac.wordpress.org/browser/trunk/wp-includes/js/tinymce/utils/mctabs.js#L15</a>
</p>
<p>
<tt>dom</tt> and <tt>util</tt> are loaded directly and not as plugins, and hence when <tt>createInstance</tt> is called in <a class="ext-link" href="https://build.trac.wordpress.org/browser/trunk/wp-includes/js/tinymce/plugins/compat3x/plugin.js#L284"><span class="icon">​</span>https://build.trac.wordpress.org/browser/trunk/wp-includes/js/tinymce/plugins/compat3x/plugin.js#L284</a>, tinymce is unable to resolve the Classnames and it throws the above error.
</p>
<p>
The fix is to revert the path to <tt>tinymce.util.Dispatcher</tt> and <tt>tinymce.dom.DOMUtils</tt>
</p>
<p>
I couldn't locate the use of these at other places in core, so not sure, if that's gonna break something else. But I did test the regular text editor in WordPress and TinyMCE Advance plugin, they both worked fine with the changes.
</p>
UmeshSinglahttps://core.trac.wordpress.org/ticket/41124
https://core.trac.wordpress.org/ticket/41124Report#41121: Consistency of the _deprecated_function() calls and related documentation.Thu, 22 Jun 2017 03:00:23 GMTMon, 21 Aug 2017 15:07:15 GMT<p>
While working on <a class="ext-link" href="https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/pull/979"><span class="icon">​</span>updating the `WP.DeprecatedFunctions` sniff</a> which is part of the <a class="ext-link" href="https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/"><span class="icon">​</span>WordPress Coding Standards</a> project, we've come across a number of inconsistencies in the application of the function and/or the related documentation.
</p>
<p>
@jdgrimes previously already reported this concerning three functions in <a class="new ticket" href="https://core.trac.wordpress.org/ticket/41094" title="defect (bug): Deprecated version not specfied for debug_fopen() et al. (new)">#41094</a> (has its own patch in that ticket), however since then a lot more inconsistencies have been identified.
</p>
<p>
In a series of patches which I will add to this ticket I will address these:
</p>
<h3 id="Patch1:Fixdeprecationinfoinvariousdocblocks">Patch 1: Fix deprecation info in various docblocks</h3>
<ul><li>Fix incorrect deprecation comment naming the deprecated function as its own alternative
</li><li>Fix typo in docblock <tt>@deprecated</tt> tag which meant that deprecation is not indicated on the dev ref website
</li><li>Add missing <tt>@deprecated</tt> tags for two functions
</li><li>Add missing alternative in <tt>@deprecated</tt> comment for <tt>wp_get_sites()</tt>
</li></ul><h3 id="Patch2:Addmissingreplacementfunctionstovarious_deprecated_functioncalls">Patch 2: Add missing replacement functions to various <tt>_deprecated_function()</tt> calls</h3>
<ul><li>Add missing parentheses to a few deprecated function replacement function strings to be consistent with how this is done everywhere else.
</li><li>Add missing alternative for the WP_Customize Widget deprecated methods.
</li><li>Add missing alternative for three deprecated ms functions
</li><li>Add missing alternative for deprecated <tt>wp_cache_reset()</tt> function
</li></ul><h3 id="Patch3:Addmissing_deprecated_functionfunctioncallstovariousfunctions">Patch 3: Add missing <tt>_deprecated_function()</tt> function calls to various functions</h3>
<ul><li>Add missing <tt>_deprecated_function()</tt> call for <tt>funky_javascript_callback()</tt>
</li><li>Add missing <tt>_deprecated_function()</tt> call for <tt>_save_post_hook()</tt>.
</li><li>Add missing <tt>_deprecated_function()</tt> call for <tt>default_topic_count_text()</tt>.
</li><li>Add missing <tt>_deprecated_function()</tt> call for <tt>screen_meta()</tt>.
</li><li>Add missing <tt>_deprecated_function()</tt> call for two screen icon related functions
</li><li>Add missing <tt>_deprecated_function()</tt> call for nine wp_dashboard related functions
</li><li>Add missing <tt>_deprecated_function()</tt> call for <tt>wp_ajax_wp_fullscreen_save_post()</tt>.
</li><li>Add missing <tt>_deprecated_function()</tt> call for <tt>ms_deprecated_blogs_file()</tt>
</li></ul><h3 id="Patch4:Addmissing_deprecated_functioncallstovariousdeprecatedclassmethods">Patch 4: Add missing <tt>_deprecated_function()</tt> calls to various deprecated class methods</h3>
<ul><li>Add <tt>_deprecated_function()</tt> calls to all methods within the deprecated WP_User_Search class.
</li><li>Add missing <tt>_deprecated_function()</tt> call for four methods in WP_Customize_Image_Control
</li></ul><h3 id="Patch5:Addmissing_deprecated_functioncallsforfourdeprecatedpluggablefunctions.">Patch 5: Add missing <tt>_deprecated_function()</tt> calls for four deprecated pluggable functions.</h3>
<p>
Not all functions complied with what the docblock at the top of the files states:
</p>
<blockquote class="citation">
<p>
Deprecated warnings are also thrown if one of these functions is being defined by a plugin.
</p>
</blockquote>
jrfhttps://core.trac.wordpress.org/ticket/41121
https://core.trac.wordpress.org/ticket/41121Report#41094: Deprecated version not specfied for debug_fopen() et al.Sun, 18 Jun 2017 22:14:20 GMTFri, 23 Jun 2017 00:33:38 GMT<p>
The <tt>debug_fopen()</tt>, <tt>debug_write()</tt> and <tt>debug_fclose()</tt> functions were deprecated in 3.4.0 (<a class="changeset" href="https://core.trac.wordpress.org/changeset/19935" title="Deprecate ancient &#34;debugging&#34; tools.
* logIO() and the global ...">[19935]</a>). However, the calls to <tt>_deprecated_function()</tt> do not include the version number, instead listing the replacement function, <tt>error_log()</tt> as the second parameter. The second parameter is supposed to be the version number, the replacement function should be the third parameter.
</p>
jdgrimeshttps://core.trac.wordpress.org/ticket/41094
https://core.trac.wordpress.org/ticket/41094Report#41083: IP with port number triggers warnings in WP_Community_EventsFri, 16 Jun 2017 17:01:12 GMTThu, 21 Sep 2017 03:14:47 GMT<p>
Hello, I'd like to assume this is probably a duplicate report, but I couldn't find anything via the search, so I thought I would report this anyway to ensure it gets fixed in the next update, as it's very annoying.
</p>
<p>
After upgrading to the latest WordPress, the following errors appear in my PHP errors log:
</p>
<pre class="wiki">[16-Jun-2017 16:53:03 UTC] PHP Warning: inet_pton(): Unrecognized address 104.xxx.xxx.98:58749 in C:\home\site\wwwroot\wp-admin\includes\class-wp-community-events.php on line 268
[16-Jun-2017 16:53:03 UTC] PHP Warning: inet_pton(): Unrecognized address 104.xxx.xxx.98:58749 in C:\home\site\wwwroot\wp-admin\includes\class-wp-community-events.php on line 274
[16-Jun-2017 16:53:03 UTC] PHP Warning: A non-numeric value encountered in C:\home\site\wwwroot\wp-admin\includes\class-wp-community-events.php on line 274
[16-Jun-2017 16:53:03 UTC] PHP Warning: inet_ntop(): Invalid in_addr value in C:\home\site\wwwroot\wp-admin\includes\class-wp-community-events.php on line 274
[16-Jun-2017 16:53:04 UTC] PHP Warning: inet_pton(): Unrecognized address 104.xxx.xxx.98:4108 in C:\home\site\wwwroot\wp-admin\includes\class-wp-community-events.php on line 268
[16-Jun-2017 16:53:04 UTC] PHP Warning: inet_pton(): Unrecognized address 104.xxx.xxx.98:4108 in C:\home\site\wwwroot\wp-admin\includes\class-wp-community-events.php on line 274
[16-Jun-2017 16:53:04 UTC] PHP Warning: A non-numeric value encountered in C:\home\site\wwwroot\wp-admin\includes\class-wp-community-events.php on line 274
[16-Jun-2017 16:53:04 UTC] PHP Warning: inet_ntop(): Invalid in_addr value in C:\home\site\wwwroot\wp-admin\includes\class-wp-community-events.php on line 274
</pre><p>
I have replaced parts of the IP address with "xxx" because it is my computer's IP address (not the server's).
</p>
<p>
This error is 100% reproducible by simply loading the admin dashboard page with the WordPress Events and News box shown.
</p>
<p>
This is new to WordPress 4.8.
</p>
<p>
PHP version is 7.1.6.
Windows Server 2012 R2/IIS 8.5
</p>
EatonZhttps://core.trac.wordpress.org/ticket/41083
https://core.trac.wordpress.org/ticket/41083Report#41081: Improve Custom Menu widget, show notification if menu is empty or no menu selectedFri, 16 Jun 2017 13:33:58 GMTMon, 25 Sep 2017 16:34:44 GMT<p>
If you choose a menu for Custom Menu widget and we remove all items in that menu OR the menu is not selected -&gt; nothing shows on the page.
Maybe we should add a text message that will inform the user that the menu is empty or is not selected?
</p>
alexvorn2https://core.trac.wordpress.org/ticket/41081
https://core.trac.wordpress.org/ticket/41081Report#41078: Detect if someone’s site is under version control, and suggest better ways to edit their sitesThu, 15 Jun 2017 14:51:12 GMTWed, 20 Sep 2017 22:29:57 GMT<p>
Can we detect if someone’s site is under version control, and suggest better ways to edit their sites if they try to make changes using the Code Editors?
</p>
karmatosedhttps://core.trac.wordpress.org/ticket/41078
https://core.trac.wordpress.org/ticket/41078Report#41074: Create new Dashicons (4.9)Thu, 15 Jun 2017 14:19:41 GMTMon, 04 Sep 2017 04:42:39 GMT<p>
This ticket is for new Dashicons for the 4.9 release cycle.
It is a continuation of the ticket <a href="https://core.trac.wordpress.org/ticket/39296">https://core.trac.wordpress.org/ticket/39296</a>
</p>
<p>
The following icons has been requested:
</p>
<p>
<strong>Flip of Editor-RTL</strong>: <a class="ext-link" href="https://github.com/WordPress/dashicons/issues/111"><span class="icon">​</span>https://github.com/WordPress/dashicons/issues/111</a>
A reverse of <a class="ext-link" href="https://developer.wordpress.org/resource/dashicons/#editor-rtl"><span class="icon">​</span>https://developer.wordpress.org/resource/dashicons/#editor-rtl</a>
</p>
<p>
<strong>Rest API</strong>: <a class="ext-link" href="https://github.com/WordPress/dashicons/issues/152"><span class="icon">​</span>https://github.com/WordPress/dashicons/issues/152</a>
</p>
<p>
<strong>Variation on earth/world icon (admin-site)</strong>: <a class="ext-link" href="https://github.com/WordPress/dashicons/issues/95"><span class="icon">​</span>https://github.com/WordPress/dashicons/issues/95</a>
</p>
<p>
<strong>Yes Alt</strong>: <a class="ext-link" href="https://github.com/WordPress/dashicons/issues/108"><span class="icon">​</span>https://github.com/WordPress/dashicons/issues/108</a>
</p>
EmpireOfLighthttps://core.trac.wordpress.org/ticket/41074
https://core.trac.wordpress.org/ticket/41074Report#41058: wp_dropdown_categories documentation is missing argumentsThu, 15 Jun 2017 09:08:51 GMTSun, 20 Aug 2017 03:27:48 GMT<p>
<tt>wp_dropdown_categories</tt> use <tt>get_terms</tt> witch use <tt>WP_Term_Query::__construct()</tt>.
The documentation should show that you can use all the <tt>WP_Term_Query::__construct()</tt> argument.
</p>
ArnaudBanhttps://core.trac.wordpress.org/ticket/41058
https://core.trac.wordpress.org/ticket/41058Report#41057: Update PHP codebase per WordPress PHP Coding StandardsThu, 15 Jun 2017 09:08:36 GMTFri, 22 Sep 2017 05:42:12 GMT<blockquote class="citation">
<p>
<a class="ext-link" href="https://make.wordpress.org/core/handbook/contribute/code-refactoring/"><span class="icon">​</span>https://make.wordpress.org/core/handbook/contribute/code-refactoring/</a>
</p>
<blockquote class="citation">
<p>
<em>"That said, we want to be internally consistent and follow our own rules. Code is poetry, and our code should be beautiful."</em>
</p>
</blockquote>
</blockquote>
<blockquote class="citation">
<p>
<a class="ext-link" href="https://make.wordpress.org/core/handbook/best-practices/coding-standards/php/"><span class="icon">​</span>https://make.wordpress.org/core/handbook/best-practices/coding-standards/php/</a>
</p>
</blockquote>
<p>
As a first pass there are 8 files to this ticket for the initial patch, 4 patches, and 4 file lists of the files to be patched, these files lists exclude and 3rd party external PHP libraries so that the only files changed are WordPress' PHP files
</p>
<ul><li><tt>41057-src-root.diff</tt> generated from the <tt>41057-filelist-src-root.txt</tt> PHP file list
</li><li><tt>41057-src-wp-admin.diff</tt> generated from the <tt>41057-filelist-src-wp-admin.txt</tt> PHP file list
</li><li><tt>41057-src-wp-content.diff</tt> generated from the <tt>41057-filelist-src-wp-content.txt</tt> PHP file list
</li><li><tt>41057-src-wp-includes.diff</tt> generated from the <tt>41057-filelist-src-wp-includes.txt</tt> PHP file list
</li></ul><p>
Each of the above diff/patches are generated programmatically by <tt>phpcbf</tt> part of <tt>phpcs</tt> using the <tt>WordPress-Core</tt> version <tt>0.11.0</tt> PHP Codesniffer ruleset from <a class="ext-link" href="https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards"><span class="icon">​</span>https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards</a>
</p>
<ul><li><tt>phpcbf --file-list=41057-filelist-src-root.txt --standard=WordPress-Core --extensions=php</tt>
</li></ul><ul><li><tt>phpcbf --file-list=41057-filelist-src-wp-admin.txt --standard=WordPress-Core --extensions=php</tt>
</li></ul><ul><li><tt>phpcbf --file-list=41057-filelist-src-wp-content.txt --standard=WordPress-Core --extensions=php</tt>
</li></ul><ul><li><tt>phpcbf --file-list=41057-filelist-src-wp-includes.txt --standard=WordPress-Core --extensions=php</tt>
</li></ul>netwebhttps://core.trac.wordpress.org/ticket/41057
https://core.trac.wordpress.org/ticket/41057Report#41055: WP-API JS Client: Improve support for metaThu, 15 Jun 2017 08:08:42 GMTTue, 26 Sep 2017 13:18:46 GMT<p>
The wp.api JavaScript client support for meta needs some attention:
</p>
<ul><li>Meta helper isn't available for comments, terms and users
</li><li>Meta pieces haven't been updated for the new-style meta model
</li></ul><p>
The <tt>getMeta</tt> helper should work correctly for all object types that support meta. We should also consider adding a matching <tt>setMeta</tt> helper.
</p>
<p>
See <a class="ext-link" href="https://github.com/WP-API/client-js/issues/168"><span class="icon">​</span>https://github.com/WP-API/client-js/issues/168</a>.
</p>
adamsilversteinhttps://core.trac.wordpress.org/ticket/41055
https://core.trac.wordpress.org/ticket/41055Report#41052: Need validation update in video widgetThu, 15 Jun 2017 05:45:17 GMTWed, 20 Sep 2017 22:14:46 GMT<p>
Without Validation not insert video widget content.
</p>
<p>
When i have insert just text not validate this one.
</p>
ravipatelhttps://core.trac.wordpress.org/ticket/41052
https://core.trac.wordpress.org/ticket/41052Report#41017: Docblock improvements for 4.9Tue, 13 Jun 2017 01:06:35 GMTThu, 21 Sep 2017 12:27:31 GMT<p>
Previously:
</p>
<ul><li><a class="closed ticket" href="https://core.trac.wordpress.org/ticket/39130" title="task (blessed): Docblock improvements for 4.8 (closed: fixed)">#39130</a> (4.8)
</li><li><a class="closed ticket" href="https://core.trac.wordpress.org/ticket/37770" title="task (blessed): Docs improvements for 4.7 (closed: fixed)">#37770</a> (4.7)
</li><li><a class="closed ticket" href="https://core.trac.wordpress.org/ticket/32246" title="task (blessed): Fix a variety of phpDoc issues (closed: fixed)">#32246</a> (4.6)
</li></ul>DrewAPicturehttps://core.trac.wordpress.org/ticket/41017
https://core.trac.wordpress.org/ticket/41017Report#40970: Update and audit the screen-reader-text CSS class used in coreFri, 09 Jun 2017 10:25:05 GMTMon, 25 Sep 2017 17:11:06 GMT<p>
WordPress 4.8 has officially <a class="ext-link" href="https://make.wordpress.org/core/2017/04/23/target-browser-coverage/"><span class="icon">​</span>ended support for Internet Explorer versions 8, 9, and 10</a>. I'd propose to review the <tt>screen-reader-text</tt> CSS class to update it with some more modern properties.
</p>
<p>
At the very least, <tt>clip</tt> should be updated to a more modern syntax. <tt>clip: rect(0 0 0 0)</tt> is there to support old IE versions, I think IE6, IE7? Today, it should be <tt>clip: rect(1px, 1px, 1px, 1px)</tt>.
</p>
<p>
The <tt>clip</tt> property itself <a class="ext-link" href="https://www.w3.org/TR/css-masking-1/#clip-property"><span class="icon">​</span>is now deprecated</a>. Its modern alternative is <tt>clip-path</tt> but at the time of writing it's not supported by IE11 (will never support it), Edge, and some mobile browsers, see: <a class="ext-link" href="http://caniuse.com/#search=clip-path"><span class="icon">​</span>http://caniuse.com/#search=clip-path</a>
</p>
<p>
One option could be introducing <tt>clip-path: inset(50%)</tt> and keeping <tt>clip</tt> for old browsers. This should be carefully evaluated for some edge cases where <tt>screen-reader-text</tt> gets reset for some very special uses, for example:
</p>
<pre class="wiki"> .post-com-count .screen-reader-text {
position: static;
width: auto;
height: auto;
margin: 0;
}
</pre><p>
Worth noting there are also some places in core where the <tt>screen-reader-text</tt> CSS class is slightly different, for example the admin bar, the embed template, and Press This.
</p>
aferciahttps://core.trac.wordpress.org/ticket/40970
https://core.trac.wordpress.org/ticket/40970Report#40946: Update `.editorconfig` and `*.json` files to use tabs for indentationThu, 08 Jun 2017 06:53:47 GMTThu, 08 Jun 2017 06:55:26 GMT<p>
When the <tt>.editorconfig</tt> file was added in <a class="changeset" href="https://core.trac.wordpress.org/changeset/27198" title="Add .editorconfig file, see http://editorconfig.org/.
&#34;EditorConfig helps ...">[27198]</a> it included the option to indent <tt>*.json</tt> files with 2 spaces, this was inherited from the jQuery projects <tt>.editorconfig</tt>
</p>
<p>
There's no inherent reason<sup>(<a class="new ticket" href="https://core.trac.wordpress.org/ticket/40946#hn" title="task (blessed): Update `.editorconfig` and `*.json` files to use tabs for indentation (new)">note</a>)</sup> to require this, see <a class="ext-link" href="https://stackoverflow.com/a/18698771/1911294"><span class="icon">​</span>https://stackoverflow.com/a/18698771/1911294</a>
</p>
<p>
Originally discussed here <a class="ext-link" href="https://github.com/WordPress/gutenberg/pull/1029#issuecomment-306362413"><span class="icon">​</span>https://github.com/WordPress/gutenberg/pull/1029#issuecomment-306362413</a>
</p>
<p>
Note: An existing issue with npm 3 and 4 causes indentation issues, as such <tt>package.json</tt> needs to remain indented with spaces until WordPress chooses to use npm 5 as the required minimum.
</p>
netwebhttps://core.trac.wordpress.org/ticket/40946
https://core.trac.wordpress.org/ticket/40946Report#40934: Allow PHP version requirements for plugins & themesTue, 06 Jun 2017 20:34:46 GMTWed, 30 Aug 2017 22:11:34 GMT<p>
Not all plugins can work on PHP 5.2, like WordPress core currently does. Not all plugin developers <em>want</em> to support PHP 5.2, like core does. As a project, WordPress would like to move forward and have people on more recent PHP versions. One of the ways to reach that goal would be to show them that they cannot install a certain plugin or theme because their install does not meet the required criteria.
</p>
<p>
As such, I'm proposing to allow plugins and themes to have a minimum PHP version requirement. Not a maximum, just a minimum. This minimum version requirement should not mean that plugins should not be shown in the new plugins screen, for instance, instead, they should be shown but "disabled", with links to Wordpress.org pages explaining why, and how to upgrade their PHP.
</p>
<p>
To do this, the following work would have to be done:
</p>
<p>
<strong>Core</strong>
</p>
<ul><li>Plugin header parser changes for minimum PHP version requirement.
</li><li>Disallow activating incompatible plugins from plugins list. Mockups required.
</li><li>Add new plugins screen changes for plugins whose criteria do not match. Mockup attached.
</li><li>Check plugin header on manual plugins installation to prevent fatal errors. Mockup required for error.
</li></ul><p>
<strong>Meta</strong>
</p>
<ul><li>Plugin readme parser changes for minimum PHP version requirement. Source location: <a class="ext-link" href="https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/readme"><span class="icon">​</span>https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/readme</a>
</li><li>Plugins API changes. Source location: <a class="ext-link" href="https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/standalone"><span class="icon">​</span>https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/standalone</a>
</li></ul><p>
<strong>Plugin directory</strong>
</p>
<ul><li>Show minimum required PHP version on plugins page. Source location: <a class="ext-link" href="https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/plugin.php"><span class="icon">​</span>https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/plugin.php</a> Mockups required.
</li><li>(Optional) Allow filtering plugin directory. Mockups required.
</li><li>(Optional) Report PHP version usage per plugin’s users. Mockups required.
</li></ul><p>
<strong>WordPress dot org / Codex</strong>
</p>
<ul><li>Create pages on how to upgrade PHP, preferably with links to specific instructions for specific hosts
</li></ul><p>
If this gets "blessed" I'll proceed to make individual smaller tickets for the individual changes.
</p>
joostdevalkhttps://core.trac.wordpress.org/ticket/40934
https://core.trac.wordpress.org/ticket/40934Report#40931: Warning: Division by zero in wp-includes/theme-compat/embed-content.php on line 33Tue, 06 Jun 2017 13:03:32 GMTWed, 13 Sep 2017 22:42:58 GMT<p>
When embedding a post in another post I get the warning Warning: Division by zero in wp-includes/theme-compat/embed-content.php on line 33. It does show a embedded preview image of the post image.
</p>
<div class="code"><pre><span class="x">if ( $data['width'] / $data['height'] &gt; $aspect_ratio )
</span></pre></div><p>
When change this to also check if width and height are larger than 0 the warnings go away.
</p>
<div class="code"><pre><span class="x">if ( ($data['width'] &gt; 0 &amp;&amp; $data['height'] &gt; 0) &amp;&amp; $data['width'] / $data['height'] &gt; $aspect_ratio ) {
</span></pre></div>aegis123https://core.trac.wordpress.org/ticket/40931
https://core.trac.wordpress.org/ticket/40931Report#40921: Inconsistent Handling of mp4 by Audio WidgetSun, 04 Jun 2017 20:14:25 GMTThu, 14 Sep 2017 18:41:46 GMT<p>
The audio media widget does not render the audio player when displaying the widget on the front-end when an mp4 file is referenced; it is rendered (and plays) as expected in the admin screens.
</p>
<p>
This behaviour is the same whether using the wp-core-media-widget plugin or built-in widgets in 4.8.
</p>
<p>
Attaching a gif (hope these are OK).
</p>
toddhalfpennyhttps://core.trac.wordpress.org/ticket/40921
https://core.trac.wordpress.org/ticket/40921Report#40894: Use Webpack instead of Browserify for build processWed, 31 May 2017 12:16:26 GMTWed, 13 Sep 2017 21:11:41 GMT<p>
<a class="new ticket" href="https://core.trac.wordpress.org/ticket/40834" title="enhancement: Introduce a JS module pattern to WordPress (new)">#40834</a> kicked off a discussion of JavaScript modules in WordPress core.
</p>
<p>
In a recent <a class="ext-link" href="https://make.wordpress.org/core/2017/05/24/javascript-chat-summary-for-may-23rd/"><span class="icon">​</span>JavaScript Core chat </a> the decision was made to move in the direction of using Webpack (and ES6 imports) as our bundler of choice, and to work first on switching out browserfy in our current build chain.
</p>
<p>
Since we split the media files in <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/28510" title="task (blessed): Split javascript files in media into modules (closed: fixed)">#28510</a>, the core build process <a href="https://core.trac.wordpress.org/browser/tags/4.7.5/Gruntfile.js#L160">has used Browserify</a> to combine the media files. While browserify has served us well, Webpack is probably a better long term choice for the project, especially with the introduction of a new JavaScript framework that may require a build.
</p>
adamsilversteinhttps://core.trac.wordpress.org/ticket/40894
https://core.trac.wordpress.org/ticket/40894Report#40888: PHP Warnings when POSTing keys as arrays to wp-login.phpTue, 30 May 2017 17:12:26 GMTMon, 17 Jul 2017 17:43:14 GMT<p>
I'm seeing bots filling up my error logs by POSTing to <tt>wp-login.php</tt> with <tt>user_login</tt> as an array instead of a string. The <tt>user_login</tt> value is blindly passed through functions that assume it's a string, like <tt>trim()</tt>, <tt>register_new_user()</tt>, <tt>reset_password()</tt> and so on.
</p>
<p>
For me, they're hitting <tt>/wp-login.php?action=lostpassword</tt>, but upon further review, the majority of actions and functions in (and related to) <tt>wp-login.php</tt> are equally susceptible to a similar log-filling type of attack.
</p>
<p>
(I'm seeing this on PHP7.1, so it's possible that upped the priority to a warning which is why I'm seeing this now, but it's also possible this is new, or I haven't seen this myself before.)
</p>
<p>
It is possible to setup web-server rules to prevent malformed values in these fields, but I think it's better for everyone if <tt>wp-login.php</tt> protect against them at the application level anyways.
</p>
<p>
FWIW, I am not against modifying <tt>$_POST</tt> directly in cases like this (where the core code has never supported array values in these keys, there's no imaginable reason for these values to ever not be strings, and a complex plugin stack means other code probably also trusts these values are strings, too.)
</p>
<p>
To duplicate, send the following <tt>$_POST</tt> request to the following URL:
</p>
<pre class="wiki">URL: http://src.wordpress-develop.dev/wp-login.php?action=lostpassword
POST: user_login['test'] =&gt; 'hello'
</pre><p>
Somewhat related: <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/34192" title="defect (bug): PHP notice if user_login or user_email field isn't set when POSTing to ... (closed: fixed)">#34192</a>
</p>
johnjamesjacobyhttps://core.trac.wordpress.org/ticket/40888
https://core.trac.wordpress.org/ticket/40888Report#40854: Allow media to be embedded in Text widgetWed, 24 May 2017 11:17:19 GMTWed, 20 Sep 2017 22:14:46 GMT<p>
Adding images, videos and audio files into Text widget without having 3 additional widgets I think will be better, because in a Text Widget you can add a description or additional information, just we need to add a Upload media button to insert media into the text field.
(Ticket related to Media Widgets - <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/32417" title="feature request: Add new core media widget (closed: fixed)">#32417</a>) We can revert that ticked and continue to improve Text widget.
What do you think??
</p>
alexvorn2https://core.trac.wordpress.org/ticket/40854
https://core.trac.wordpress.org/ticket/40854Report#40829: Improve wp_dropdown_languages() so it doesn't print out empty attributesSat, 20 May 2017 17:32:08 GMTMon, 25 Sep 2017 16:43:41 GMT<p>
<tt>wp_dropdown_languages()</tt> takes an array of arguments with some defaults. Among them, the arguments related to the <tt>name</tt> and <tt>id</tt> HTML attributes <a href="https://core.trac.wordpress.org/browser/trunk/src/wp-includes/l10n.php?rev=40362#L1119">default to empty string</a>.
</p>
<p>
Later on, these attributes are printed out without any check if they're empty or not:
<tt>$output = sprintf( '&lt;select name="%s" id="%s"&gt;', esc_attr( $args['name'] ), esc_attr( $args['id'] ) );</tt>
</p>
<p>
The final output might print out empty <tt>name</tt> and <tt>id</tt> attributes if the related arguments are not explicitly passed: <tt>&lt;select name="" id=""&gt;</tt>, which doesn't look right to me.
</p>
aferciahttps://core.trac.wordpress.org/ticket/40829
https://core.trac.wordpress.org/ticket/40829Report#40826: Allow items queried in batch via "slug" to maintain orderSat, 20 May 2017 06:07:50 GMTMon, 14 Aug 2017 18:07:00 GMT<p>
When querying endpoints that have items, it is possible to pass an array of values to the <tt>slug</tt> param. This will filter the result set to only include slugs that match. This works for posts, pages, media, users, categories, and tags.
</p>
<p>
Often, the reason this is happening is so that a remote system can collect all relevant queries before sending one HTTP request that contains them all. This was formalized in <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/40027" title="enhancement: Tags and Categories should have a &#34;slugs&#34; parameter for batch fetching (closed: fixed)">#40027</a>.
</p>
<p>
One caveat: the endpoints do not currently have a proper <tt>orderby</tt> value that ensures the items are returned in the same order they requested.
</p>
<p>
The best convention I could come up with is: <tt>orderby=slugs</tt>. Patch incoming.
This is essential for tools like Dataloader <a class="ext-link" href="https://github.com/facebook/dataloader#batching"><span class="icon">​</span>https://github.com/facebook/dataloader#batching</a>
</p>
wonderboymusichttps://core.trac.wordpress.org/ticket/40826
https://core.trac.wordpress.org/ticket/40826Report#40814: Order of page title partsFri, 19 May 2017 00:39:19 GMTMon, 25 Sep 2017 16:29:31 GMT<p>
The order of page title parts in wp-login.php is inconsistent with the rest of the site pages.
</p>
<p>
For example, in wp-login.php we have this arrangement:
</p>
<p>
Sitename Separator Pagename
</p>
<p>
For the rest of the site we have this arrangement:
</p>
<p>
Pagename Separator Sitename
</p>
<p>
I suggest we modify the order of the page title parts in wp-login.php to match page titles elsewhere.
</p>
henry.wrighthttps://core.trac.wordpress.org/ticket/40814
https://core.trac.wordpress.org/ticket/40814Report#40812: Allow wp-login.php page title separator to be filteredFri, 19 May 2017 00:32:30 GMTMon, 25 Sep 2017 16:31:48 GMT<p>
The wp-login.php page title separator is currently hard coded as either <tt>&amp;rsaquo;</tt> or <tt>&amp;lsaquo;</tt> depending on <tt>is_rtl()</tt>.
</p>
henry.wrighthttps://core.trac.wordpress.org/ticket/40812
https://core.trac.wordpress.org/ticket/40812Report#40794: WordPress needs a privacy policyWed, 17 May 2017 22:44:18 GMTSat, 29 Jul 2017 08:49:33 GMT<p>
It's been many years since an installation of WordPress operated in isolation. The software sends data to various endpoints on <tt>api.wordpress.org</tt>, most visibly for update checks, but also for fetching translations, checking browser compatibility, and (since 4.8) determining the user's location and fetching nearby WordPress events.
</p>
<p>
WordPress needs a privacy policy which covers data that gets sent to wordpress.org. The wordpress.org website <a class="ext-link" href="https://wordpress.org/about/privacy/"><span class="icon">​</span>has a privacy policy</a>, and it may be sufficient to link to this, or it may be required to extend this with information specifically regarding the data that installations of WordPress send to api.wordpress.org. I recommend the addition of a new <tt>Privacy</tt> tab on the <tt>About WordPress</tt> screen.
</p>
<p>
It's worth noting that the pending <a class="ext-link" href="https://ico.org.uk/for-organisations/data-protection-reform/overview-of-the-gdpr/"><span class="icon">​</span>EU GDPR</a> affects everyone because it covers the export of data outside of the EU.
</p>
<p>
Adding to the 4.8 milestone as the <tt>WordPress Events and News</tt> dashboard widget is a particularly visible example of data collection in WordPress.
</p>
<p>
Related: Long-running discussion on <a class="reopened ticket" href="https://core.trac.wordpress.org/ticket/16778" title="enhancement: wordpress is leaking user/blog information during wp_version_check() (reopened)">#16778</a>.
</p>
johnbillionhttps://core.trac.wordpress.org/ticket/40794
https://core.trac.wordpress.org/ticket/40794Report#40792: Adding Someecards.com as an oEmbed providerWed, 17 May 2017 20:50:59 GMTMon, 17 Jul 2017 12:42:56 GMT<p>
This ticket is a request to have someecards.com added to the list of oEmbed providers.
</p>
<p>
<strong>Is the service is popular enough for core developers to have heard of it before? Is it “mainstream?”
</strong>
We hope so. Someecards has been around for a while and is pretty popular.
</p>
<p>
<strong>If similar services are already supported, how does this service compare in terms of size, features, and backing?</strong>
Various image embed exists like imgur that are similar in some ways. Someecards is pretty popular. See social stats below.
</p>
<p>
<strong>Does this service have a large following on Twitter, Facebook, or other social media? Is its Twitter account verified?</strong>
<a class="ext-link" href="https://www.facebook.com/someecards/"><span class="icon">​</span>https://www.facebook.com/someecards/</a> (5.8M)
<a class="ext-link" href="https://twitter.com/someecards"><span class="icon">​</span>https://twitter.com/someecards</a> (verified, 2.35M)
</p>
<p>
<strong>Is its oEmbed endpoint clearly established and properly documented? (Sometimes, they are just a developer’s pet project that may not be supported.)</strong>
<a class="ext-link" href="https://github.com/someecards/someecards-developer-docs/blob/master/oembed.md"><span class="icon">​</span>https://github.com/someecards/someecards-developer-docs/blob/master/oembed.md</a>
</p>
<p>
<strong>Does the oEmbed endpoint work with WordPress’ oEmbed auto-discovery? If not, could it be made to work with additional HTML tags or attributes being whitelisted?</strong>
It works.
</p>
<p>
<strong>Does the service make an effort to build relationships with developers, such as through robust APIs?</strong>
We're not making tons of open APIs currently.
</p>
<p>
<strong>How old is the service?</strong>
Someecards.com was started in 2006.
</p>
<p>
<strong>Does it have a well-established Wikipedia article? (Seriously.)</strong>
<a class="ext-link" href="https://en.wikipedia.org/wiki/Someecards"><span class="icon">​</span>https://en.wikipedia.org/wiki/Someecards</a>
</p>
<p>
<strong>Has anyone written a WordPress plugin that leverages the service in some way, whether adding it as an oEmbed provider, creating a shortcode, or leveraging other APIs of the service? Do these plugins have any noticeable adoption or traction that would indicate usage and demand?</strong>
Not that we know of but we're convinced this oembed support would be useful.
</p>
<p>
<strong>Is the provider frequently proposed?</strong>
Oembed rich media support was added a couple months ago so this is likely the first request.
</p>
someecardshttps://core.trac.wordpress.org/ticket/40792
https://core.trac.wordpress.org/ticket/40792Report#40764: Multisite theme update not showing new version numberMon, 15 May 2017 05:56:55 GMTTue, 19 Sep 2017 16:51:18 GMT<p>
When updating plugins via the ajax updater the new version number displays correctly in the plugin row when the update is completed.
</p>
<p>
In multisite, when a theme is updated via the ajax updater the new version number is not displayed in the theme row.
</p>
afragenhttps://core.trac.wordpress.org/ticket/40764
https://core.trac.wordpress.org/ticket/40764Report#40763: Use placeholders in translation stringsSun, 14 May 2017 20:58:03 GMTMon, 25 Sep 2017 10:23:37 GMT<p>
The attached patch replaces URLs and HTML tags in translation strings with <tt>%s</tt> placeholders to make it easier to translate the string.
</p>
ramiyhttps://core.trac.wordpress.org/ticket/40763
https://core.trac.wordpress.org/ticket/40763Report#40673: WP Oembed in Multisite fails when embedded post comes from a different site of a network.Fri, 05 May 2017 02:27:02 GMTTue, 26 Sep 2017 19:39:37 GMT<p>
Steps to reproduce:
</p>
<p>
1/ Create a post in main site.
2/ Create a new site
3/ Go the dashboard of this site
4/ Create a new post and paste in it the permalink of the post created at step 1.
</p>
<p>
This happens when the post we're trying to embed comes from a different site. I've added some unit tests to illustrate the issue. Without the patch, these two unit tests are failing:
</p>
<ul><li>test_wp_filter_pre_oembed_result_multisite_sub_othersub
</li><li>test_wp_filter_pre_oembed_result_multisite_sub_main
</li></ul>imathhttps://core.trac.wordpress.org/ticket/40673
https://core.trac.wordpress.org/ticket/40673Report#40672: Undefined property `requireForceForDelete` prevents deleting terms in Backbone.js clientFri, 05 May 2017 00:38:01 GMTTue, 11 Jul 2017 17:14:19 GMT<p>
The REST API Backbone.js client makes it possible to delete terms using Backbone Model's <tt>destroy()</tt> function. However, when it comes to models that can't be trashed (like <tt>Category</tt> and <tt>Tag</tt>), an additional <tt>force=true</tt> URL parameter is required to avoid a <tt>rest_trash_not_supported</tt> error. When the Models are created from endpoints in the <tt>constructFromSchema()</tt> function, a <tt>requireForceForDelete</tt> property is set to <tt>true</tt> to have the required <tt>force</tt> parameter later added to the URL.
</p>
<p>
Problem is, the <tt>requireForceForDelete</tt> property is only set for Models that have a parent in their route, overriding the Model's default <tt>wp.api.WPApiBaseModel.initialize()</tt> function; if the Model does not have a parent, the default <tt>wp.api.WPApiBaseModel.initialize()</tt> function is used, <tt>requireForceForDelete</tt> is <tt>undefined</tt>, and the <tt>DELETE</tt> API request fails because of the missing <tt>force</tt> parameter.
</p>
<p>
Not sure exactly why there's a difference between Models based on whether or not they have parents, but the end result is that it's not possible to properly delete terms without having the <tt>requireForceForDelete</tt> added to the Model before calling <tt>destroy()</tt>.
</p>
caercamhttps://core.trac.wordpress.org/ticket/40672
https://core.trac.wordpress.org/ticket/40672Report#40669: Proper query cache invalidation on queries meta queriesThu, 04 May 2017 19:21:14 GMTFri, 01 Sep 2017 12:12:04 GMT<p>
Currently, terms and comments have query caching and meta query support. Queries are cached using the use the last_changed in the object cache group. Query caches are invalidated (busted) when the last_changed value is changed, when a term / comment is changed / created. However, when meta on these objects are changed / deleted, query are not invalidated. Example.
</p>
<ul><li>Run a comment query with a meta query foo=bar. Get 4 results.
</li><li>add_comment_meta to a new comment.
</li><li>Run a comment query with a meta query foo=bar. It will return cached result of 4, even through the result should be 5.
</li></ul><p>
This is an issue, if plugin developers, use the meta functions to add meta to an object, queries should still invalidate.
</p>
spacedmonkeyhttps://core.trac.wordpress.org/ticket/40669
https://core.trac.wordpress.org/ticket/40669Report#40662: Archive widget doesn't show the selected month name in the frontend widget itselfThu, 04 May 2017 11:36:29 GMTMon, 17 Jul 2017 16:56:40 GMT<p>
Archive widget doesn't show the selected month name like the category widget shows the selected category name, although the widget works fine it always show "Select Month". Tested with Twenty Seventeen and several other themes.
</p>
Themonichttps://core.trac.wordpress.org/ticket/40662
https://core.trac.wordpress.org/ticket/40662Report#40655: DB error during installationWed, 03 May 2017 22:29:22 GMTTue, 05 Sep 2017 07:52:38 GMT<p>
<tt>$wpdb-&gt;query( "SELECT $prefix" );</tt> at line 279 of setup-config.php throws a DB error and that's not exactly nice thing to have during installation. If you insist on having a check like this, perhaps suppress the error from this call?
</p>
FlyerUAhttps://core.trac.wordpress.org/ticket/40655
https://core.trac.wordpress.org/ticket/40655Report#40635: Move JavaScript `sanitizeText` and `stripTags` functions from press-this to coreTue, 02 May 2017 15:45:46 GMTSat, 16 Sep 2017 11:08:31 GMT<p>
The file <tt>press-this.js</tt> includes two generally useful helper functions:
</p>
<ul><li><tt>stripTags</tt> strips HTML tags from a string using a series of regex replace calls.
</li><li><tt>sanitizeText</tt> strips HTML tags and converts HTML entities in a string. It leverages a textarea's content to encode HTML and returns a string that is safe to evaluate.
</li></ul><p>
These functions would be generally useful in core and for plugin and theme developers and could be added to the <tt>wp</tt> namespace, eg <tt>wp.utils.stripTags</tt> and <tt>wp.utils.sanitizeText</tt>
</p>
adamsilversteinhttps://core.trac.wordpress.org/ticket/40635
https://core.trac.wordpress.org/ticket/40635Report#40525: apply_filters_deprecated() in WP_RewriteSat, 22 Apr 2017 10:20:36 GMTMon, 25 Sep 2017 16:55:19 GMT<p>
Use apply_filters_deprecated() for deprecated filters.
</p>
sebastian.pisulahttps://core.trac.wordpress.org/ticket/40525
https://core.trac.wordpress.org/ticket/40525Report#40462: Add placeholders to wp_login_form()Sat, 15 Apr 2017 20:08:33 GMTMon, 25 Sep 2017 17:02:06 GMT<p>
Currently, if someone uses the <tt>wp_login_form()</tt> function in a theme or a plugin, and this someone wants to add placeholders to the input fields, he can't do that.
</p>
<p>
The attached patch adds placeholders to the <tt>wp_login_form()</tt> function using two new arguments. To maintain backwards compatibility, the placeholders are empty by default.
</p>
ramiyhttps://core.trac.wordpress.org/ticket/40462
https://core.trac.wordpress.org/ticket/40462Report#40382: "IP address" is not "IP"Fri, 07 Apr 2017 08:42:37 GMTMon, 25 Sep 2017 17:01:41 GMT<p>
"IP" does not mean "IP address".
</p>
mako09https://core.trac.wordpress.org/ticket/40382
https://core.trac.wordpress.org/ticket/40382Report#40245: Youtube embeds lack title attributeThu, 23 Mar 2017 20:34:06 GMTMon, 25 Sep 2017 16:57:21 GMT<p>
I use a service called Siteimprove to monitor for accessibility issues. They pointed out an issue -- when you embed a Youtube video via a link, the code comes out something like this
</p>
<pre class="wiki">&lt;iframe width="960" height="540" src="https://www.youtube.com/embed/iGddWyoWkyg?feature=oembed"
frameborder="0" allowfullscreen=""&gt;&lt;/iframe&gt;
</pre><p>
However, Siteimprove gives that an A-level error:
</p>
<p>
<strong>The iFrame is missing a description</strong>
The iFrame has no 'title' attribute or the 'title' attribute is empty.
Provide the frame with the attribute title=”” and add a description of the content in the title.
</p>
<p>
Is there any way to add a field to enter a title for the iframe?
</p>
<p>
See this page for an example: <a class="ext-link" href="http://accessibility.page.report/GBXGDGIFJJABIHIIAUFJ/106149/20912373122#automatic/4.1.2/13"><span class="icon">​</span>Example</a>
</p>
morriscountynjhttps://core.trac.wordpress.org/ticket/40245
https://core.trac.wordpress.org/ticket/40245Report#40228: Use get_sites in get_blog_detailsWed, 22 Mar 2017 05:35:18 GMTTue, 19 Sep 2017 16:21:22 GMT<p>
Currently get_blog_details performs raw sql queries to get data out of the blogs tables. This data is then cached. However how the caching is done in the function is horrible. It generates three different caches that store the whole wp_site object in cache.
</p>
<div class="code"><pre><span class="x">wp_cache_delete( $blog_id , 'blog-details' );
wp_cache_delete( $blog_id . 'short' , 'blog-details' );
wp_cache_delete( $domain_path_key, 'blog-lookup' );
</span></pre></div><p>
This function should be refactor to use get_sites and relay on the caching built into wp_site_query
</p>
spacedmonkeyhttps://core.trac.wordpress.org/ticket/40228
https://core.trac.wordpress.org/ticket/40228Report#40205: Interim login modal window uses front end language instead of admin languageSun, 19 Mar 2017 15:18:54 GMTTue, 29 Aug 2017 16:34:01 GMT<p>
When the interim login modal appears (for example your cookies expire or you log out in another tab), the login screen is show in the language of the site instead of the language that the user has selected for the admin area.
</p>
<p>
It should be possible to, for example, pass a <tt>?lang=&lt;lang&gt;</tt> attribute to <tt>wp-login.php</tt> in order to specify the UI language, and use this attribute in the interim login modal URL to pass through the user's chosen admin language.
</p>
<p>
Such as URL parameter would also potentially allow for a language switcher to be added to the login screen.
</p>
johnbillionhttps://core.trac.wordpress.org/ticket/40205
https://core.trac.wordpress.org/ticket/40205Report#40201: Use get_site in clean_blog_cacheSun, 19 Mar 2017 00:59:53 GMTTue, 19 Sep 2017 16:41:53 GMT<p>
The clean_blog_cache takes a generic object as a param. This is a little strange as other clean_*_cache functions either take a list of ids or an ID. Now that the WP_Site object is in core, we should make sure we use it in this function. If we pass the $blog param through the get_site function it would have the following benefits.
</p>
<ul><li>All objects passed to function will be cast to WP_Site object. This would mean that the object would always domain and path properties.
</li><li>Ability to pass a site id, as get_site allows for id lookup.
</li><li>Better error handling. This function doesn't handle not passing an object very well.
</li></ul>spacedmonkeyhttps://core.trac.wordpress.org/ticket/40201
https://core.trac.wordpress.org/ticket/40201Report#40199: Customize: collapse suggested and previously uploaded header images with accordionsSat, 18 Mar 2017 22:23:12 GMTTue, 26 Sep 2017 17:05:07 GMT<p>
The custom header image control takes up quite a lot of space, which is why header videos are, somewhat confusingly, placed before the image control. We could improve this by collapsing the suggested and previously-uploaded images by default, making the headers/labels expandable/collapsable. That would allow larger image collections here without taking up too much space.
</p>
<p>
Alternatively, other ways to show these collections should be considered, such as in the media modal. Eventually, we'll want this UI pattern to be able to expand to be used in other media controls.
</p>
celloexpressionshttps://core.trac.wordpress.org/ticket/40199
https://core.trac.wordpress.org/ticket/40199Report#40184: Twenty Seventeen: the tag cloud widget should output a listFri, 17 Mar 2017 12:27:07 GMTMon, 25 Sep 2017 16:52:08 GMT<p>
In ticket <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/35566" title="defect (bug): Remove title attributes: Tag cloud widget uses title to display topic ... (closed: fixed)">#35566</a> there is new tag cloud widget coming up with accessibility improvements. For bundled themes there is also general ticket <a class="assigned ticket" href="https://core.trac.wordpress.org/ticket/40138" title="enhancement: Bundled themes: the tag cloud widget should output a list (assigned)">#40138</a> for tag cloud widget.
</p>
<p>
This is ticket for Twenty Seventeen to output tag cloud widget as a list.
</p>
<ul><li>It's better for accessibility.
</li><li>Remain the same styles.
</li><li>Remove unnecessary <tt>!important</tt> rules.
</li></ul><p>
Twenty Sixteen have an example how to use <tt>widget_tag_cloud_args</tt> for same font size. Let's add <tt>$args['format'] = 'list'</tt> in there.
</p>
<p>
Patch is coming up.
</p>
sami.keijonenhttps://core.trac.wordpress.org/ticket/40184
https://core.trac.wordpress.org/ticket/40184Report#40180: Introduce `get_site_by()` function for multisiteFri, 17 Mar 2017 10:54:31 GMTTue, 19 Sep 2017 16:21:22 GMT<p>
As @stephdau mentioned on <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/40064" title="enhancement: Deprecate `get_blog_details()` (closed: maybelater)">#40064</a>, the new <tt>get_site()</tt> function from 4.6 is not a direct replacement for <tt>get_blog_details()</tt> which we are planning to deprecate.
</p>
<p>
Therefore I think it makes sense to introduce a function <tt>get_site_by()</tt> that is basically a wrapper for a <tt>WP_Site_Query</tt> (with <tt>LIMIT 1</tt>), and then runs <tt>array_shift()</tt> to only return the first result. This function would then become the direct replacement that people who previously relied on <tt>get_blog_details()</tt> with something other than an ID could use.
</p>
<p>
Parameter-wise, we should probably adjust it a little bit to match things like <tt>get_term_by()</tt>, which also makes the way that function works more explicit.
</p>
flixos90https://core.trac.wordpress.org/ticket/40180
https://core.trac.wordpress.org/ticket/40180Report#40175: Upload Validation / MIME HandlingThu, 16 Mar 2017 21:37:10 GMTThu, 14 Sep 2017 18:58:43 GMT<p>
A security fix implemented in WordPress <tt>4.7.1</tt> relies on a PHP extension (<tt>fileinfo</tt>) with inconsistent reporting behavior. As a result, many users (even after <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/39550" title="defect (bug): Some Non-image files fail to upload after 4.7.1 (closed: fixed)">#39550</a>) trying to upload various types of files (office documents, multimedia, fonts, etc.) have received validation errors.
</p>
<p>
In a nutshell, this is because the media types returned by <tt>fileinfo</tt> vary from server to server and file to file. If PHP returns a media type beginning <tt>application/*</tt>, that media type must be whitelisted or the result will fail.
</p>
<p>
Because most incorrect/historical answers from <tt>fileinfo</tt> begin <tt>application/*</tt>, this is resulting in a large number of false-positives.
</p>
<p>
There are three main ways to address this, with a combination approach being preferred:
</p>
<p>
<strong>1)</strong> The conditional in <tt>wp_check_filetype_and_ext</tt> could be restricted so that rather than searching <tt>application/*</tt> broadly, it looks only at the narrow file types at the heart of the original security issue. <strong>This option requires review from the Security Team.</strong>
</p>
<p>
<strong>2)</strong> The WordPress Core could be extended to provide "MIME alias" awareness. This would allow WordPress to properly match a given extension/MIME pairing even in cases where the MIME type is historically valid, but not the singular type in the whitelist. See <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/39963" title="enhancement: MIME Alias Handling (closed: wontfix)">#39963</a> for related information.
</p>
<p>
<strong>3)</strong> WP could be extended to maintain its own <tt>mime.types</tt> file, which can be passed to <tt>fileinfo</tt>, providing more consistent responses. <strong>This option requires the MIME alias handling to avoid breaking sites or plugins which hook into <tt>upload_mimes</tt>.</strong>
</p>
<p>
<strong>Duplicate/related tickets are being collapsed into this thread. Please continue all related discussion here.</strong>
</p>
blobfoliohttps://core.trac.wordpress.org/ticket/40175
https://core.trac.wordpress.org/ticket/40175Report#40138: Bundled themes: the tag cloud widget should output a listSun, 12 Mar 2017 23:11:05 GMTMon, 25 Sep 2017 16:49:31 GMT<p>
Splitting this out from <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/35566" title="defect (bug): Remove title attributes: Tag cloud widget uses title to display topic ... (closed: fixed)">#35566</a>
</p>
<p>
Bundled themes should show best practices to theme authors. About the Tag Cloud widget, the latest patch on <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/35566" title="defect (bug): Remove title attributes: Tag cloud widget uses title to display topic ... (closed: fixed)">#35566</a> proposes some accessibility improvements, however it doesn't force the tags to be output as an unordered list to avoid the need to output some inline stylesheet.
</p>
<p>
A better option would be using the <tt>format</tt> argument to tweak the output on a case by case basis.
</p>
<p>
From a semantic perspective, the tags list is... well, a list. Setting the <tt>format</tt> argument to <tt>list</tt> would allow assistive technologies to announce the list as a list and the number of items in the list. Most of the users from the a11y testers group expressed a preference to have the number of items being announced, see the test results on <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/35566" title="defect (bug): Remove title attributes: Tag cloud widget uses title to display topic ... (closed: fixed)">#35566</a>.
</p>
<p>
This would require some simple CSS adjustments, which is trivial to do in the Themes stylesheet.
</p>
aferciahttps://core.trac.wordpress.org/ticket/40138
https://core.trac.wordpress.org/ticket/40138Report#40109: Ensure PHP 7.2 compatibility in tests (and core)Sat, 11 Mar 2017 12:49:42 GMTTue, 26 Sep 2017 12:02:29 GMT<p>
The <a class="ext-link" href="https://travis-ci.org/aaronjorbin/develop.wordpress/jobs/209970096"><span class="icon">​</span>lastest Travis build for 7.2-dev</a> has a few errors. I haven't found a roadmap but I think PHP 7.2 is planned for end of this year. So, while PHP 7.2 is still at the beginning we should start looking at the results and review each error. We did the same for PHP 7.1 and identified a bug in PHP itself, see <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/37295" title="defect (bug): PHP 7.1.0: Tests_Query_IsTerm::test_cat_uncat_action_tax() is failing (closed: fixed)">#37295</a>.
</p>
<hr />
<p>
<a class="ext-link" href="https://wiki.php.net/rfc/deprecations_php_7_2"><span class="icon">​</span>PHP 7.2 is going to deprecate</a>
</p>
<ul><li><tt>create_function()</tt>
</li><li><tt>__autoload()</tt>
</li><li><tt>each()</tt>
</li><li>calling <tt>assert()</tt> with a string argument
</li></ul><p>
Also, <a class="ext-link" href="https://wiki.php.net/rfc/counting_non_countables"><span class="icon">​</span>counting of non-countable objects</a> will start throwing a warning in PHP 7.2.
</p>
<hr />
<ul><li><tt>create_function()</tt> is handled in <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/37082" title="enhancement: Remove (most) uses of create_function() from core (closed: fixed)">#37082</a>.
</li><li>The <tt>assert()</tt> calls in <tt>WP_Import_UnitTestCase::_import_wp()</tt> should be replaced with <tt>assertTrue()</tt> and a custom message.
</li><li><tt>testXMLParser::parse()</tt>: <tt>sizeof()</tt> returns always <tt>1</tt> for a string, even if the string is empty. Same for <tt>false</tt>. Seems like we can just pass <tt>true</tt> as the third argument for <tt>xml_parse()</tt>.
</li></ul>ocean90https://core.trac.wordpress.org/ticket/40109
https://core.trac.wordpress.org/ticket/40109Report#40104: Customizer: Improve menu creation flowFri, 10 Mar 2017 22:43:27 GMTMon, 25 Sep 2017 17:38:22 GMT<p>
I consistently see in usability tests and on WordPress.com support that folks run into two issues when they create new menus:
</p>
<ol><li>They click "Add a Menu" thinking it will add a new <strong>page</strong> to their menu.
</li><li>They forget to assign their new menu to a location, and then wonder why it doesn't show up on their site.
</li></ol><p>
To address these issues, I've been working with some folks on an improved flow to guide people through creating a new menu:
</p>
<ul><li>If you visit the menu panel before you have a menu, hide "Locations" and only show a prompt to create a new menu.
</li><li>When you click "Create new menu," open a temporary, interstitial panel with a prompt to name your menu and pick a location to add it to. You'll only see this screen when you make a new menu.
</li><li>On the next screen, you'll see friendly instructions prompting you to add pages to your new menu. You can also still change your menu location and choose to auto-add new pages.
</li><li>When you return to Menus after you have at least one menu, you'll see Menu Locations as well.
</li><li>The copy in Menu Locations has been adjusted to be friendlier and more helpful, including links to the Widgets panel and to any documentation we might have on the Custom Menu widget. (I couldn't seem to find anything in the Codex? Maybe we should write some.)
</li></ul><p>
Props to @zoonini for working through this improved flow with me, and @michelleweber for the friendly and informative new copy.
</p>
melchoycehttps://core.trac.wordpress.org/ticket/40104
https://core.trac.wordpress.org/ticket/40104Report#39996: Allow passing existing template value for posts, even when template does not existTue, 28 Feb 2017 23:19:18 GMTWed, 12 Jul 2017 04:06:37 GMT<p>
In <a class="changeset" href="https://core.trac.wordpress.org/changeset/40120" title="REST API: Allow setting post formats even if they are not supported by the ...">r40120</a>, it became possible for a client to set <tt>format=&gt;aside</tt> on a post, even when when the theme doesn't support <tt>aside</tt> as a post format.
</p>
<p>
Under this same logic, it should be possible for a client to set <tt>template=&gt;my-file.php</tt>, even when <tt>my-file.php</tt> isn't a file in the theme.
</p>
<p>
The current behavior is that it's not possible for a client to set <tt>template</tt> to an arbitrary file name (values are validated against an enum).
</p>
<p>
Related <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/39232" title="defect (bug): REST API: Can't set existing post format if theme does not support it (2) (closed: fixed)">#39232</a>
</p>
danielbachhuberhttps://core.trac.wordpress.org/ticket/39996
https://core.trac.wordpress.org/ticket/39996Report#39965: REST API: not possible to request collection of posts across post typesSat, 25 Feb 2017 10:44:30 GMTWed, 20 Sep 2017 13:15:52 GMT<p>
See <a class="new ticket" href="https://core.trac.wordpress.org/ticket/38920" title="enhancement: Use REST API for link query in editor (new)">#38920</a> for a simple core use case.
</p>
<p>
There seems to be no way to query posts across multiple (or all) post types as you can do with <tt>WP_Query</tt>. You have to start making multiple requests, which is an inconvenient and non-optimal approach? Ideally this should be directly passed to the server and <tt>WP_Query</tt>.
</p>
<p>
Related: <a class="new ticket" href="https://core.trac.wordpress.org/ticket/39851" title="task (blessed): WP_REST_Posts_Controller::get_items() has too many concerns (new)">#39851</a>.
</p>
iseuldehttps://core.trac.wordpress.org/ticket/39965
https://core.trac.wordpress.org/ticket/39965Report#39930: Adding documentation for wp.customize propertiesTue, 21 Feb 2017 19:21:02 GMTMon, 25 Sep 2017 17:16:57 GMT<p>
Adding documentation for...
</p>
<ul><li>wp.customize.control
</li><li>wp.customize.section
</li><li>wp.customize.panel
</li></ul><p>
Along with examples for usage.
</p>
shrameehttps://core.trac.wordpress.org/ticket/39930
https://core.trac.wordpress.org/ticket/39930Report#39920: Empty if-statementMon, 20 Feb 2017 14:13:26 GMTTue, 11 Jul 2017 00:28:33 GMT<p>
Hello!
</p>
<p>
In this <a class="ext-link" href="https://github.com/WordPress/WordPress/blob/c4e78a8d8ba2e0b5b85866c6fc46895aead5802a/wp-admin/includes/misc.php#L74"><span class="icon">​</span>code fragment</a>:
</p>
<div class="code"><pre><span class="cp">&lt;?php</span>
<span class="k">if</span> <span class="p">(</span> <span class="nv">$markerdata</span> <span class="o">=</span> <span class="nb">explode</span><span class="p">(</span> <span class="s2">"</span><span class="se">\n</span><span class="s2">"</span><span class="p">,</span> <span class="nb">implode</span><span class="p">(</span> <span class="s1">''</span><span class="p">,</span> <span class="nb">file</span><span class="p">(</span> <span class="nv">$filename</span> <span class="p">)</span> <span class="p">)</span> <span class="p">));</span>
<span class="p">{</span>
<span class="nv">$state</span> <span class="o">=</span> <span class="k">false</span><span class="p">;</span>
<span class="o">....</span>
<span class="p">}</span>
</pre></div><p>
Body of if-statement actually is empty. Probably, semicolon is excess.
</p>
<p>
This possible defect found with ( <a class="ext-link" href="https://cnpo.ru/en/solutions/appchecker.php"><span class="icon">​</span>AppChecker </a> )
</p>
appcheckerhttps://core.trac.wordpress.org/ticket/39920
https://core.trac.wordpress.org/ticket/39920Report#39896: Customizer: Allow users to Draft changes before PublishingThu, 16 Feb 2017 23:09:23 GMTTue, 26 Sep 2017 20:32:47 GMT<p>
Inspired by drafting and revisions in the <a class="ext-link" href="https://wordpress.org/plugins/customize-snapshots/"><span class="icon">​</span>Customize Snapshots plugin</a>, the button design in <a class="ext-link" href="https://github.com/xwp/wp-customize-posts/issues/207"><span class="icon">​</span>Customize Posts</a>, and Press This, I want to propose a way to allow users to draft changes in the Customizer.
</p>
<p>
This introduces a split button to the Customizer that lets you toggle between "Publish" and "Save Draft."
</p>
<p>
This would pair nicely with the Revisions mockups introduced in <a class="assigned ticket" href="https://core.trac.wordpress.org/ticket/21666" title="feature request: Customizer reset/undo/revert (assigned)">#21666</a>, but doesn't depend on it.
</p>
<p>
Drafting would be helpful if you're setting up your site, or making some big changes, and you don't want to publish them just yet. With drafting, you can leave and come back to the Customizer later to finish making your changes.
</p>
<p>
If you leave the Customizer without saving a draft or publishing your changes, the next time you enter the Customizer, you'll get a notice asking if you want to restore the autosave.
</p>
<p>
In future iterations, once Revisions is built, we'll explore adding the ability to have multiple drafts of pending changes. Also related is the ability to schedule the changes for publishing (<a class="assigned ticket" href="https://core.trac.wordpress.org/ticket/28721" title="enhancement: Scheduled changes for the customizer (assigned)">#28721</a>).
</p>
<p>
Related: <a class="new ticket" href="https://core.trac.wordpress.org/ticket/31089" title="enhancement: Customize: Add revisions and statuses for changesets (new)">#31089</a>, <a class="new ticket" href="https://core.trac.wordpress.org/ticket/39841" title="enhancement: Additional Post Button Options (new)">#39841</a>
</p>
melchoycehttps://core.trac.wordpress.org/ticket/39896
https://core.trac.wordpress.org/ticket/39896Report#39793: Scrolling up in the sticky post text editor does not scroll the page up to topMon, 06 Feb 2017 13:03:53 GMTMon, 24 Jul 2017 16:09:31 GMT<p>
In the sticky post editor, if I use arrow keys to navigate in the text mode tab (textarea#content), the page does not scroll up to the very top of the page, leaving part of the text hidden. I have to use mouse to again reveal the text. In the TinyMCE mode the scrolling works perfectly.
</p>
<p>
I attached a screenshot where I created lines of text to get the page scroll. At the bottom of the page, cursor can be seen all the time. Then, when I go and use arrow keys to scroll to the first line of the text, it only scrolls almost to the top, leaving about 6.5 lines above the scroll.
</p>
<p>
Additionally, using Ctrl+Home or Ctrl+End (on Windows) to navigate to the top or bottom of the textarea does not scroll the page.
</p>
elmo5https://core.trac.wordpress.org/ticket/39793
https://core.trac.wordpress.org/ticket/39793Report#39766: Plugin does not gracefully fail when editing active plugin causes fatal errorThu, 02 Feb 2017 11:39:52 GMTSun, 24 Sep 2017 05:51:18 GMT<p>
When editing an active plugin in the wp-admin you see the following message above the 'Update file' button.
</p>
<pre class="wiki">
Warning: Making changes to active plugins is not recommended. If your changes cause a fatal error, the plugin will be automatically deactivated.
</pre><p>
However, if an edit causes a fatal error the plugin is not automatically deactivated - resulting in the "white screen of death".
</p>
<p>
Similarly, attempting to activate a plugin that contains a fatal error will automatically deactivate the plugin.
</p>
<p>
<strong>Steps to reproduce</strong>
</p>
<ol><li>In the WordPress Administration, go to Plugins-&gt; Installed Plugins
</li><li>For an active plugin, click on the 'Edit' link
</li><li>Add erroneous code to plugin, for example
</li></ol><pre class="wiki">
// DO NOT ADD THIS TO YOUR PLUGIN - IT WILL CAUSE A FATAL ERROR -- MISSING CLOSING endif;
if ( ! function_exists( 'wp_password_change_notification' ) ) :
function wp_password_change_notification( $user ) {
return;
}
</pre><ol start="4"><li>Click 'Update File'
</li><li>Changes are saved to the plugin, page loads and confirmation "File edited successfully." is displayed
</li><li>Attempt to load another page (for example, the same page or the home page) and the "white screen of death" occurs.
</li></ol>ovann86https://core.trac.wordpress.org/ticket/39766
https://core.trac.wordpress.org/ticket/39766Report#39753: wp_mail() under PHP 7 hosted on Windows creates malformed email messagesWed, 01 Feb 2017 01:54:38 GMTThu, 20 Jul 2017 16:23:48 GMT<p>
Synopsis: WordPress’ wp_mail function uses the third party component PHPmailer 5. PHPmailer 5 relies on the standard PHP mail() function for final delivery. With PHP 7.x hosted on Windows, WordPress mails are being rejected by providers, such as Gmail, due to RFC violations.
</p>
<p>
Reason: PHPmailer-&gt;LE (Version 5) defaults to a lone "LF" (\n) as the end-of-line character. That is in violation of SMTP, which expressly forbids lone LF characters. This known error in PHPmailer 5 and has been be resolved with (not yet released) PHPmailer 6.
</p>
<p>
Fortunately for WP (and other CMS'), Linux has an operating system default of "LF", so its mailer programs have always translated lone LF to CR/LF when creating SMTP data streams.
</p>
<p>
And, in PHP 5, the Windows implementation of mail() has always "fixed" lone "LF" by replacing them with CR/LF. Consequently, WordPress (et al) have worked in both environments.
</p>
<p>
As of PHP 7, the Windows implementation of mail() requires standards compliant input and no longer fixes malformed headers. The lone "LF" characters of the incorrect PHPmailer 5 defaults now "bleed" through and result in malformed SMTP data streams. (Linux is not effected, because PHP continues to launch the operating system's mailer programs.)
</p>
<p>
At a future time PHPmailer 6 will be the final solution.
</p>
<p>
In the meantime, WordPress wp_mail needs to explicitly set $phpmailer-&gt;LE = '\r\n' right after this line:
</p>
<p>
$phpmailer = new PHPMailer( true );
</p>
Andy Schmidthttps://core.trac.wordpress.org/ticket/39753
https://core.trac.wordpress.org/ticket/39753Report#39732: Allowing wp_update_comment() to return WP_ErrorSun, 29 Jan 2017 09:52:52 GMTWed, 12 Jul 2017 20:54:53 GMT<p>
The new <tt>wp_update_comment_data</tt> filter introduced in 4.7 allows to filter comments data before it is updated in the database.
</p>
<p>
The patch aims to handle <tt>WP_Error</tt> as the filter above return value in a similar manner as is done for <tt>wp_new_comment()</tt>.
</p>
enrico.sorcinellihttps://core.trac.wordpress.org/ticket/39732
https://core.trac.wordpress.org/ticket/39732Report#39730: Checking if wp_new_comment() return value is a WP_ErrorSat, 28 Jan 2017 17:21:27 GMTMon, 25 Sep 2017 07:28:57 GMT<p>
Since <tt>wp_new_comment()</tt> can return <tt>WP_Error</tt> (also it can be returned through <tt>pre_comments_approved</tt> filter), we should check it in all call occurrences.
</p>
<p>
This essentially affects adding new comments (via ajax) in post admin where the result was a new empty comment (with anonymous avatar) with not working links (since they don't have comment id).
I added the check before <tt>get_comment($comment_id)</tt> (*) call and comments list building.
</p>
<p>
The patch also fix all other <tt>wp_new_comment()</tt> calls I found.
</p>
<p>
(*): In general, maybe should <tt>WP_Comment</tt> take care to the object passed in the constructor by checking if it's a <tt>WP_Error</tt>
</p>
enrico.sorcinellihttps://core.trac.wordpress.org/ticket/39730
https://core.trac.wordpress.org/ticket/39730Report#39699: Filter to check XML-RPC data before any DB insertionThu, 26 Jan 2017 11:03:08 GMTMon, 25 Sep 2017 17:02:42 GMT<p>
After searching into XML-RPC server class code, I realized that it seems that there isn't way to check XML-RPC input data before starting to insert/update any rows to database nor to return an <tt>IXR</tt> custom error message.
For example for new post, in order to check custom fields, a possible workaround is to use <tt>wp_insert_post_empty_content</tt> filter, but we are unable to customize the error message. Moreover at this point some DB rows are inserted, so inside the filter above we have to call <tt>wp_delete_post</tt> manually in order to clean DB (taking care to check <tt>auto-draft</tt> post status).
In the case of editing post, things get a bit more complicated, so we could use transactions with the help of <tt>xmlrpc_call</tt>/<tt>wp_insert_post</tt> actions.
</p>
<p>
So, the patch aims to add a new filter named <tt>xmlrpc_before_insert_post</tt> that allows to do this check in a more robust manner (for <tt>wp.newPost</tt> and <tt>wp.editPost</tt> XML-RCP methods).
</p>
<p>
Typical usage:
</p>
<div class="code"><pre><span class="cp">&lt;?php</span>
<span class="k">if</span> <span class="p">(</span> <span class="nb">defined</span><span class="p">(</span> <span class="s1">'XMLRPC_REQUEST'</span> <span class="p">)</span> <span class="p">)</span> <span class="p">{</span>
<span class="nx">add_filter</span><span class="p">(</span> <span class="s1">'xmlrpc_before_insert_post'</span><span class="p">,</span> <span class="s1">'my_filter_xmlrpc_before_insert_post'</span><span class="p">,</span> <span class="mi">10</span><span class="p">,</span> <span class="mi">3</span> <span class="p">);</span>
<span class="p">}</span>
<span class="k">function</span> <span class="nf">my_filter_xmlrpc_before_insert_post</span> <span class="p">(</span> <span class="nv">$post_data</span><span class="p">,</span> <span class="nv">$content_struct</span><span class="p">,</span> <span class="nv">$user</span> <span class="p">)</span> <span class="p">{</span>
<span class="c1">// do checks with $post_data, i.e:
</span> <span class="k">if</span> <span class="p">(</span> <span class="nx">title_contains_stop_words</span><span class="p">(</span> <span class="nv">$post_data</span><span class="p">[</span><span class="s1">'post_title'</span><span class="p">]</span> <span class="p">)</span> <span class="p">)</span>
<span class="k">return</span> <span class="k">new</span> <span class="nx">IXR_Error</span><span class="p">(</span> <span class="mi">500</span><span class="p">,</span> <span class="s1">'Post title contains invalid words'</span> <span class="p">);</span>
<span class="k">return</span> <span class="nv">$post_data</span><span class="p">,</span>
<span class="p">}</span>
</pre></div><p>
The filter is placed inside <tt>_insert_post</tt> helper function before <tt>get_default_post_to_edit()</tt> that isthe first statement that adds a new DB row.
</p>
<p>
Regards
</p>
enrico.sorcinellihttps://core.trac.wordpress.org/ticket/39699
https://core.trac.wordpress.org/ticket/39699Report#39693: Fix missing assignment of widgets on theme switchWed, 25 Jan 2017 19:27:15 GMTTue, 26 Sep 2017 05:50:37 GMT<p>
Switching themes will cause widgets to be "lost" in theme switch. <a class="ext-link" href="https://ms-studio.net/notes/painless-theme-switching-in-wordpress/"><span class="icon">​</span>See this post for examples</a>.
</p>
<p>
Related: <a class="new ticket" href="https://core.trac.wordpress.org/ticket/19912" title="feature request: Add Widget Groups and Locations (new)">#19912</a>, which focuses on one specific solution — I'd like to see us step back from that and think about other ways to approach this problem.
</p>
<p>
Related: <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/39692" title="enhancement: Fix missing assignment of menus on theme switch (closed: fixed)">#39692</a>, for the same problem with nav menus.
</p>
<p>
Related: <a class="assigned ticket" href="https://core.trac.wordpress.org/ticket/27404" title="feature request: Widget Customizer: Allow adding inactive widgets to widget areas (assigned)">#27404</a>, Widget Customizer: Allow adding inactive widgets to widget areas
</p>
melchoycehttps://core.trac.wordpress.org/ticket/39693
https://core.trac.wordpress.org/ticket/39693Report#39660: Missing singular placeholder, needed for some languages on comments.phpSat, 21 Jan 2017 14:58:54 GMTFri, 08 Sep 2017 04:39:22 GMT<p>
On comments.php of most of the bundled themes the singular form of the string is not available.
</p>
bplvhttps://core.trac.wordpress.org/ticket/39660
https://core.trac.wordpress.org/ticket/39660Report#39461: default-preset option for custom background cannot be set by defaultWed, 04 Jan 2017 09:29:37 GMTMon, 18 Sep 2017 17:53:59 GMT<p>
I am trying to set a custom background by default for this theme <a class="ext-link" href="https://wordpress.org/themes/islemag/"><span class="icon">​</span>https://wordpress.org/themes/islemag/</a> . This is my code:
</p>
<pre class="wiki"> add_theme_support( 'custom-background', array(
'default-image' =&gt; get_template_directory_uri() . '/img/islemag-background.jpg',
'default-preset' =&gt; 'fill',
'default-repeat' =&gt; 'no-repeat',
'default-position-x' =&gt; 'center',
'default-attachment' =&gt; 'fixed',
) );
</pre><p>
When I open the customizer, the default preset option is set on "fill screen" but the background image is still small. Everything works great if I change the default preset and then change it back on "fill screen"
</p>
<p>
I talked with developers in core channel on slack and @celloexpressions told me this:
<em>"Currently you need to define the default for each individual property (size, repeat, etc.) in addition to defining the preset. It would probably be better for consistency if each property is set based on the preset if the theme sets a preset."</em>
</p>
<p>
Tried to set each property for custom background but with no luck.
</p>
cristian-ungureanuhttps://core.trac.wordpress.org/ticket/39461
https://core.trac.wordpress.org/ticket/39461Report#39419: Explicitly globalize global variables in ms-settings.phpWed, 28 Dec 2016 19:44:40 GMTTue, 19 Sep 2017 16:41:56 GMT<p>
ms-settings.php uses and sets a few implicitly global variables:
</p>
<ul><li>$domain
</li><li>$path
</li><li>$blog_id
</li><li>$site_id
</li><li>$public
</li><li>$table_prefix
</li></ul><p>
It would be more correct if these were explicitly globalized in the file header.
</p>
<p>
Discovered in <a class="ext-link" href="https://github.com/wp-cli/wp-cli/pull/3695"><span class="icon">​</span>https://github.com/wp-cli/wp-cli/pull/3695</a>
</p>
danielbachhuberhttps://core.trac.wordpress.org/ticket/39419
https://core.trac.wordpress.org/ticket/39419Report#39373: url_to_postid() returning post ID for external URLThu, 22 Dec 2016 17:07:14 GMTFri, 04 Aug 2017 16:05:13 GMT<p>
One our site has a post that has a SoundCloud embed in it. The WP embed is embedding the post instead of the SoundCloud content. See bug<a class="closed ticket" href="https://core.trac.wordpress.org/ticket/37359" title="defect (bug): wp_filter_pre_oembed_result() breaks SoundCloud embeds (closed: worksforme)">#37359</a> as another person reported but flagged the wrong function.
</p>
<p>
Unfortunately I dont have a fix. This is what I see, the post (<a class="ext-link" href="https://bedrosian.usc.edu/podcast/drown/"><span class="icon">​</span>https://bedrosian.usc.edu/podcast/drown/</a>) embed eventually makes this call:
</p>
<p>
url_to_postid ('<a class="ext-link" href="https://soundcloud.com/uscbedrosian/drown"><span class="icon">​</span>https://soundcloud.com/uscbedrosian/drown</a>')
</p>
<p>
This is obviously (to human eyes) an external url but url_to_postid() returns the postid of the post itself. This site uses rewrites, I see url_to_postid() make this database call:
</p>
<p>
SELECT wp_334_posts.* FROM wp_334_posts WHERE 1=1 AND wp_334_posts.post_name = 'drown' AND wp_334_posts.post_type = 'post' ORDER BY wp_334_posts.post_date DESC " <a class="missing wiki">posts?</a>
</p>
<p>
Due to rewrites, all it has to match is 'drown' to be flagged as an internal url... and returns the original post. Happens to all SoundCloud embeds on the same site.
</p>
jkhonguschttps://core.trac.wordpress.org/ticket/39373
https://core.trac.wordpress.org/ticket/39373Report#39275: Improve wp.customize.previewer.save() for changesets.Wed, 14 Dec 2016 11:16:23 GMTMon, 25 Sep 2017 17:34:48 GMT<p>
If you do not pass any status in <tt>wp.customize.previewer.save()</tt> the changeset status becomes published because the default <tt>changesetStatus</tt> is <tt>publish</tt> in core, which compels you to pass a status if you want to save the changeset with any other statuses like <tt>draft/pending/future</tt> however that eventually creates a revision. So if you do not want to create revisions there is no option except hacking the <tt>customize_save</tt> ajax request probably with <tt>$.ajaxPrefilter</tt>.
</p>
<p>
So I think if we do not pass any status in <tt>wp.customize.previewer.save()</tt> it should just save the changeset to the previous status set.
Also it would be nice if it had a param like <tt>skip_revision</tt> which skips creating new revision.
</p>
sayedwphttps://core.trac.wordpress.org/ticket/39275
https://core.trac.wordpress.org/ticket/39275Report#39254: When in Customizer Preview, starter content posts are not displayed in the loopMon, 12 Dec 2016 21:03:24 GMTMon, 10 Jul 2017 18:28:35 GMT<p>
As discussed in <a class="ext-link" href="https://wordpress.slack.com/archives/core-customize/p1481567934000409"><span class="icon">​</span>Slack</a>, posts in Starter Content aren't appearing in the posts list.
</p>
<p>
Being able to display the bundled content, specifically posts, is key for an improved user experience when configuring a new theme. Posts give structure to the theme, allowing users to see exactly how the theme will look with content.
</p>
<p>
This would also allow theme developers to completely match the content bundled with the theme to the content on the theme’s demo site. This helps address the popular complaint amongst WordPress users that a newly installed theme looks nothing like the demo.
</p>
tiagonoronhahttps://core.trac.wordpress.org/ticket/39254
https://core.trac.wordpress.org/ticket/39254Report#39186: Bulk actions not correctly applied when selecting bulk actions in both the top and bottom bulk actions dropdownsThu, 08 Dec 2016 14:48:44 GMTWed, 12 Jul 2017 04:03:52 GMT<p>
In <tt>WP_List_Table</tt> objects, the bulk actions dropdown and "Apply" button is displayed twice: once below the table and once above the table. The <tt>name</tt> attribute of the bulk actions dropdown element is always set "action". This wouldn't be a problem if the top and bottom actions were two in different forms.
</p>
<p>
However, both dropdown elements are in the <tt>posts-filter</tt>-form. You can start to see the problem here. Two form elements both have the same name, which yields unexpected behaviour when trying to apply bulk actions.
</p>
<p>
Take the following use case, for example:
</p>
<ul><li>Select some posts from the posts list in <tt>/wp-admin/edit.php</tt>.
</li><li>Select "Edit" from the bulk actions dropdown above the list table.
</li><li>Select "Move to Trash" from the dropdown below the list table.
</li><li>Click the apply button next to the dropdown on the bottom of the list table.
</li><li>The submit request is sent. You would expect the posts to be moved to the trash, but instead, nothing happens.
</li></ul><p>
Screencast of bug: <a class="ext-link" href="http://recordit.co/EjHAbw2KNr"><span class="icon">​</span>http://recordit.co/EjHAbw2KNr</a>
</p>
<p>
The solution I see would rename the dropdowns for the top and bottom dropdowns (they already have different names) and name the "Apply" buttons. Then, when one of the buttons is pressed, execute the corresponding bulk action.
</p>
<p>
In any case, we shouldn't have any two form elements with the same name in a single form.
</p>
engelenhttps://core.trac.wordpress.org/ticket/39186
https://core.trac.wordpress.org/ticket/39186Report#39128: Customize: Preview fails to load when domain mapping in use (home/siteurl domain mismatch)Wed, 07 Dec 2016 00:12:58 GMTThu, 21 Sep 2017 22:09:37 GMT<p>
When the <tt>home</tt> URL and the <tt>siteurl</tt> have different domains, in 4.7 the preview shows the error message “Non-existent changeset UUID.” The reason is because the user is (probably) not authenticated on the frontend, and so the user cannot <tt>customize</tt> and since the changeset doesn't exist yet the user blocked from accessing the site. (The thought here is that the UUID serves as a unique key which would allow an unauthenticated user to access the preview if they knew it, though this wouldn't do any good for users who are previewing a theme switch since <tt>switch_themes</tt> capability is required regardless in that case). Note that the issue goes deeper when <tt>FORCE_SSL_ADMIN</tt> is enabled because the browser's cross-domain security policy blocks the preview frame altogether (in 4.7).
</p>
<p>
Nevertheless, even as far back to 4.3 (at least) when attempting to access the customizer with the frontend (<tt>home</tt>) domain mapped to another domain from the backend (<tt>siteurl</tt>), the preview loads with a login form and submitting the form just results in the form being re-displayed indefinitely. The user can never advance past it. So cross-domain customizer preview seems to be broken prior to 4.7 as well.
</p>
<p>
Note that the issue likely does not manifest in domain mapping plugins which dynamically change the <tt>home</tt> option (such as WordPress.com), as they do it conditionally based on whether or not the customizer is bootstrapped.
</p>
RomainVBhttps://core.trac.wordpress.org/ticket/39128
https://core.trac.wordpress.org/ticket/39128Report#39119: Verify change of network admin email address before it changesTue, 06 Dec 2016 20:33:54 GMTTue, 19 Sep 2017 16:37:35 GMT<p>
On a multisite installation it's possible to change the <tt>Network Email Address</tt> setting (on the Network Admin Settings screen) without first having to verify the new email address. An email with a confirmation link should be sent out before the address is changed.
</p>
<p>
Related: <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/39118" title="enhancement: Verify change of single site admin email address before it changes (closed: fixed)">#39118</a>
</p>
johnbillionhttps://core.trac.wordpress.org/ticket/39119
https://core.trac.wordpress.org/ticket/39119Report#39099: Customize: Defer triggering selective refresh for all settings until after syncedTue, 06 Dec 2016 03:37:07 GMTSat, 17 Jun 2017 07:24:19 GMT<p>
Selective refresh is triggered when a setting is added, changed, or removed. In the case of being added, there are scenarios where infinite full refresh can ensue if a partial has fallback refresh. This has been particularly evident for nav menus. While the infinite refreshes have largely been fixed for nav menus in <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/38612" title="defect (bug): Infinite refresh loop in Customizer when using the filter ... (closed: fixed)">#38612</a>, there are still cases more generally where settings could be registered in the controls (admin) but not in the preview (pane). In the case of nav menus, this still causes a selective refresh to happen even at an initial page load.
</p>
<p>
This is essentially revisiting <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/37032" title="defect (bug): Guard against infinite reload when setting change causes premature ... (closed: fixed)">#37032</a>.
</p>
westonruterhttps://core.trac.wordpress.org/ticket/39099
https://core.trac.wordpress.org/ticket/39099Report#39061: REST API pagination: Large INT passed to `paged` query arg doesn't fail properlySun, 04 Dec 2016 18:43:51 GMTWed, 12 Jul 2017 03:28:07 GMT<p>
When an absurdly large value is passed to the REST API (e.g. <tt>/wp/v2/pages?page=23924321212413345333</tt>), it returns the first page of results instead of an error. The problem is during validation and sanitization of the value, where the passed value is run through <tt>absint</tt>, which returns another absurdly large value, which then gets nullified by PHP, which becomes <tt>1</tt>.
</p>
<pre class="wiki">wp&gt; print_r( rest_sanitize_value_from_schema( 23452345346346345456567356, array( 'type' =&gt; 'integer' ), 'page' ) );
3481259413623275520
=&gt; bool(true)
wp&gt; print_r( rest_validate_value_from_schema( 23452345346346345456567356, array( 'type' =&gt; 'integer' ), 'page' ) );
1
=&gt; bool(true)
wp&gt; absint(23924321212413345333);
=&gt; int(5477577138703794176)
</pre><p>
Edge case, but worth noting since smaller values that are larger than the number of pages return an empty array (like if there are only 2 pages of posts, but 3 are requested).
</p>
<p>
Related: <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/19728" title="enhancement: WP_Query should constrict 'paged' to be within bounds of found_posts (closed: wontfix)">#19728</a>.
</p>
morganesteshttps://core.trac.wordpress.org/ticket/39061
https://core.trac.wordpress.org/ticket/39061Report#39019: i18n: unify error messages in XML-RPC delete methodsFri, 02 Dec 2016 00:10:57 GMTTue, 11 Jul 2017 13:38:52 GMT<h4 id="CurrentMessages:">Current Messages:</h4>
<p>
<tt>wp_xmlrpc_server::wp_deletePost()</tt>
</p>
<p>
<strong>Messages:</strong> Sorry, you are not allowed to delete this post.
</p>
<p>
<tt>wp_xmlrpc_server::wp_deletePage()</tt>
</p>
<p>
<strong>Messages:</strong> Sorry, you are not allowed to delete this page.
</p>
<p>
<tt>wp_xmlrpc_server::wp_deleteTerm()</tt>
</p>
<p>
<strong>Messages:</strong> Sorry, you are not allowed to delete this term.
</p>
<p>
</p>
<h4 id="UpdatedMessages:">Updated Messages:</h4>
<p>
<tt>wp_xmlrpc_server::wp_deleteCategory()</tt>
</p>
<p>
<strong>OLD Messages:</strong> Sorry, you are not allowed to delete a category.
<strong>NEW Messages:</strong> Sorry, you are not allowed to delete this category.
</p>
<p>
<tt>wp_xmlrpc_server::wp_deleteComment()</tt>
</p>
<p>
<strong>OLD Messages:</strong> Sorry, you are not allowed to moderate or edit this comment.
<strong>NEW Messages:</strong> Sorry, you are not allowed to delete this comment.
</p>
ramiyhttps://core.trac.wordpress.org/ticket/39019
https://core.trac.wordpress.org/ticket/39019Report#38918: delete_plugins() needs a proper singular and plural form for its error messageWed, 23 Nov 2016 19:07:40 GMTTue, 22 Aug 2017 20:28:16 GMT<p>
The <tt>delete_plugins()</tt> function uses the following string as an error message:
</p>
<p>
<tt>Could not fully remove the plugin(s) %s.</tt>
</p>
<p>
This would be better if it used <tt>_n()</tt> and provided a proper singular and plural form based on the number of errors.
</p>
johnbillionhttps://core.trac.wordpress.org/ticket/38918
https://core.trac.wordpress.org/ticket/38918Report#38759: Accessibility glitch when editing an embedded videoFri, 11 Nov 2016 19:26:59 GMTSun, 03 Sep 2017 21:30:57 GMT<p>
to reproduce: make a new page and enter video shortcode for embedding a video like
</p>
<pre class="wiki">[video src="https://www.youtube.com/watch?v=KF8bGYks-bk"]
</pre><p>
in text mode. Switch to Visual Mode, click to edit the video.
</p>
<p>
Above the URL of the video will be an area (titled SRC) where you have a mouse pointer like if it was a link, but it isn't. See screenshot..
</p>
<p>
The label "SRC" is hardcoded in <tt>\wp-includes\media-template.php</tt> L.1044/1127
</p>
Presskopphttps://core.trac.wordpress.org/ticket/38759
https://core.trac.wordpress.org/ticket/38759Report#38741: Introduce the concept of a large site in order to speed up the Users screen when there are many usersWed, 09 Nov 2016 23:13:24 GMTSun, 10 Sep 2017 12:34:49 GMT<p>
Given a single site install with a high number of users, the Users screen can become very slow due to the nasty query performed by <tt>count_users()</tt>. The result of this query is used to populate the count of users with each role in the role filtering links across the top.
</p>
<pre class="wiki">SELECT
COUNT(NULLIF(`meta_value` LIKE '%\"administrator\"%', false)),
COUNT(NULLIF(`meta_value` LIKE '%\"editor\"%', false)),
COUNT(NULLIF(`meta_value` LIKE '%\"author\"%', false)),
COUNT(NULLIF(`meta_value` LIKE '%\"contributor\"%', false)),
COUNT(NULLIF(`meta_value` LIKE '%\"subscriber\"%', false)),
COUNT(NULLIF(`meta_value` = 'a:0:{}', false)), COUNT(*)
FROM
wp_usermeta
WHERE
meta_key = 'wp_capabilities'
</pre><p>
On a site with tens of thousands of users, this SQL query can easily take tens of seconds.
</p>
<p>
Multisite has the concept of a large network (by default, one with &gt; 10,000 users or &gt; 10,000 sites), but single site doesn't have this concept.
</p>
<p>
The query performed by <tt>count_users()</tt> can be skipped entirely. If it is skipped, the list of roles will simply display all available roles and won't display a count next to each role. I think this is a completely acceptable trade-off for such a performance gain on sites with a high number of users.
</p>
johnbillionhttps://core.trac.wordpress.org/ticket/38741
https://core.trac.wordpress.org/ticket/38741Report#38666: Reassure users when the customizer is doing a full reloadFri, 04 Nov 2016 15:06:27 GMTTue, 26 Sep 2017 02:27:11 GMT<p>
When the customizer does a full reload (e.g. when changing themes to live preview), the spinner might appear for quite some time. I think it would be helpful to have a reassuring and humanizing message like "Setting up your live preview. This might take a little bit."
</p>
<p>
In the theme install feature (<a class="reviewing ticket" href="https://core.trac.wordpress.org/ticket/37661" title="feature request: A New Experience for Discovering, Installing, and Previewing Themes in the ... (reviewing)">#37661</a>), it could also help to have the message change from while it's installing to getting the preview set up, for more of a feel of movement and reassurance.
</p>
helenhttps://core.trac.wordpress.org/ticket/38666
https://core.trac.wordpress.org/ticket/38666Report#38645: Improve roles reinit when switching between sitesThu, 03 Nov 2016 18:08:51 GMTTue, 19 Sep 2017 16:27:24 GMT<p>
When switching between sites (since <a class="changeset" href="https://core.trac.wordpress.org/changeset/39083" title="Docs: Add the parameter name for the `wp_roles_init` action.
[39082] ...">r39083</a>) the <tt>$wp_roles</tt> global is being recreated instead of adjusting the values of the existing global.
</p>
<p>
The current regression means if a plugin was keeping its own copy of the <tt>$wp_roles</tt> global around (maybe as a property in a class, or for some other convenience sake) then then newly created <tt>$wp_roles</tt> global no longer points to that same copy. (See <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/23016" title="defect (bug): Allow plugins to manipulate WP_Roles ($wp_roles global) on construct (closed: fixed)">#23016</a> for more details &amp; examples.)
</p>
<p>
History lesson: previous to that changeset, the <tt>reinit()</tt> method was used to update the roles for the switched site. That method was largely a copy of the <tt>_init()</tt> method, and was purpose built for blog switching.
</p>
<hr />
<p>
Anecdotally, it's unlikely this will cause very many problems, but it is still a regression from previous behavior, and I believe the fix is fairly straightforward.
</p>
<p>
We can take inspiration from the <tt>WP_User::for_blog()</tt> method, and introduce a <tt>for_blog()</tt> method to the <tt>WP_Roles</tt> class to basically do the exact same thing in the exact same way. We can make alterations to the blog switching functions to update the <tt>$wp_roles</tt> and <tt>$current_user-&gt;roles</tt> values in unison.
</p>
<p>
Architecturally, I think it makes sense to call these methods together, but not have one call the other all the time, because there may be a reason or time where that control is welcome, and marrying them together now makes divorcing them later difficult.
</p>
<p>
Patch imminent.
</p>
johnjamesjacobyhttps://core.trac.wordpress.org/ticket/38645
https://core.trac.wordpress.org/ticket/38645Report#38583: Support for objects in schema validation and sanitizationMon, 31 Oct 2016 01:04:32 GMTWed, 20 Sep 2017 22:14:46 GMT<p>
Follow-up on <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/38531" title="enhancement: Support for arrays in schema validation and sanitization (closed: fixed)">#38531</a> and support sanitizing and validating objects with our schema. This would allow our Meta and Settings endpoints to accept non-scalar values.
See <a class="ext-link" href="https://github.com/WP-API/WP-API/issues/2859"><span class="icon">​</span>https://github.com/WP-API/WP-API/issues/2859</a>
</p>
rachelbakerhttps://core.trac.wordpress.org/ticket/38583
https://core.trac.wordpress.org/ticket/38583Report#38570: i18n: Merge similar "warning" translation strings in wordpress networkSun, 30 Oct 2016 12:17:11 GMTTue, 19 Sep 2017 16:37:09 GMT<p>
Merge similar translation strings in "Network Admin". Replacing the exclamation mark with a colon.
</p>
<p>
See the screenshot from GlotPress and the patch.
</p>
ramiyhttps://core.trac.wordpress.org/ticket/38570
https://core.trac.wordpress.org/ticket/38570Report#38264: Tests: Uploads aren't deleted after running individual testsSat, 08 Oct 2016 23:46:02 GMTThu, 14 Sep 2017 18:49:47 GMT<p>
Steps to reproduce:
</p>
<ol><li>Run <tt>phpunit</tt> and verify the tests pass.
</li><li>Run <tt>phpunit --filter test_wp_get_attachment_image_should_use_wp_get_attachment_metadata</tt> and verify the tests pass.
</li><li>Run <tt>phpunit --filter test_wp_get_attachment_image_should_use_wp_get_attachment_metadata</tt> a second time and observe that the tests fail.
</li></ol><p>
View the contents of your site's <tt>uploads</tt> directory and you'll observe that the <tt>2016/10/test-image-large.png</tt> file and its resized versions haven't been deleted, and get created anew each time the test runs.
</p>
<p>
The same thing happens when running any test on its own that adds an attachment. The reason the <tt>test_wp_get_attachment_image_should_use_wp_get_attachment_metadata</tt> test fails the second time is because of its overly strict assumption about the contents of the <tt>&lt;img&gt;</tt> tag. This failure caused me to notice the fact that the upload file wasn't being deleted.
</p>
johnbillionhttps://core.trac.wordpress.org/ticket/38264
https://core.trac.wordpress.org/ticket/38264Report#38197: Update Pingback function To Add ReturnFri, 30 Sep 2016 11:07:47 GMTMon, 25 Sep 2017 13:03:12 GMT<p>
Related to <a class="reviewing ticket" href="https://core.trac.wordpress.org/ticket/36824" title="enhancement: do_all_pings function queries all posts (reviewing)">#36824</a>.
</p>
<p>
Updated to reflect focus on the return issue.
</p>
<p>
In <a class="reviewing ticket" href="https://core.trac.wordpress.org/ticket/36824" title="enhancement: do_all_pings function queries all posts (reviewing)">#36824</a>, the proposal was to improve performance of the do_all_pings function. Part of this involves the fact that if a pending trackback URL is sent a pingback successfully, it should not also send a trackback.
</p>
<p>
The function should also optionally return which URLs were successfully pinged or a WP_Error object in the event the sending fails, etc.
</p>
<p>
This would change the signature of the function but would allow for debugging, response to errors, as well as assist in optimizing the do_all_pings function.
</p>
<p>
The original proposal was to deprecate pingback because it includes $content, a parameter better retrieved from the post itself for purposes of integrity. However, that can be addressed in other ways.
</p>
dshanskehttps://core.trac.wordpress.org/ticket/38197
https://core.trac.wordpress.org/ticket/38197Report#38181: Add oEmbed support for Amazon Kindle Instant PreviewsWed, 28 Sep 2016 16:43:05 GMTMon, 25 Sep 2017 03:19:48 GMT<p>
<a class="ext-link" href="https://www.amazon.com/b?ie=UTF8&amp;node=13489836011"><span class="icon">​</span>Kindle Instant Previews</a> is a service that allows authors, media outlets and bloggers to embed a fully functional preview of a Kindle book into their site.
</p>
<p>
On September 10th, we launched our oEmbed endpoint. This patch allows Wordpress users to embed book previews from existing Kindle Instant Previews URLs as well as amazon.com URLs.
</p>
jsepiahttps://core.trac.wordpress.org/ticket/38181
https://core.trac.wordpress.org/ticket/38181Report#38079: Add hooks before output for each action in wp-login.phpSat, 17 Sep 2016 19:13:19 GMTMon, 17 Jul 2017 15:53:28 GMT<p>
7 years ago, in <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/9682" title="enhancement: Make wp-login.php form pluggable (closed: fixed)">#9682</a>, <tt>wp-login.php</tt> was made more pluggable. The thing is, if you just want to change the look (as my plugin "Theme My Login" does), you also have to replicate the logic.
</p>
<p>
Having an action that fires just before the <tt>login_header()</tt> call in each case of the action handler switch should be sufficient. One such hook is already present for one action: <tt>lost_password</tt>.
</p>
<p>
However, the hook <tt>register</tt> is already in use for the register link as is the format <tt>{$action}_form</tt>. So, I propose using <tt>pre_{$action}_form</tt>.
</p>
<p>
Patch incoming.
</p>
jfarthing84https://core.trac.wordpress.org/ticket/38079
https://core.trac.wordpress.org/ticket/38079Report#38057: 'wp_update_nav_menu' action returns inconsistent number of argumentsWed, 14 Sep 2016 16:13:56 GMTWed, 12 Jul 2017 03:49:43 GMT<p>
The 'wp_update_nav_menu' action is fired in two places with a different amount of arguments.
</p>
<ul><li> <a href="https://core.trac.wordpress.org/browser/branches/4.6/src/wp-includes/nav-menu.php#L348">wp-includes/nav-menu.php</a> <tt>do_action( 'wp_update_nav_menu', $menu_id, $menu_data );</tt>
</li><li><a href="https://core.trac.wordpress.org/browser/branches/4.6/src/wp-admin/includes/nav-menu.php#L1070">wp-admin/includes/nav-menu.php</a> <tt>do_action( 'wp_update_nav_menu', $nav_menu_selected_id );</tt>
</li></ul><p>
The first one passes along the menu id and menu data, where the second one only returns the menu id.
</p>
barryceelenhttps://core.trac.wordpress.org/ticket/38057
https://core.trac.wordpress.org/ticket/38057Report#38017: Add widget instance to remaining widget argument filtersSat, 10 Sep 2016 13:38:28 GMTMon, 25 Sep 2017 16:27:07 GMT<p>
In <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/20788" title="enhancement: Add widget instance argument to widget_links_args filter (closed: fixed)">#20788</a> and <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/33944" title="enhancement: Add parameters to widget_nav_menu_args filter (closed: fixed)">#33944</a>, the <tt>$instance</tt> argument was added to these filters:
</p>
<ul><li><tt>widget_nav_menu_args</tt>
</li><li><tt>widget_links_args</tt>
</li></ul><p>
For consistency, other widget argument filters should have it too:
</p>
<ul><li><tt>widget_archives_dropdown_args</tt>
</li><li><tt>widget_archives_args</tt>
</li><li><tt>widget_categories_dropdown_args</tt>
</li><li><tt>widget_categories_args</tt>
</li><li><tt>widget_pages_args</tt>
</li><li><tt>widget_comments_args</tt>
</li><li><tt>widget_posts_args</tt>
</li><li><tt>widget_tag_cloud_args</tt>
</li></ul>SergeyBiryukovhttps://core.trac.wordpress.org/ticket/38017
https://core.trac.wordpress.org/ticket/38017Report#37964: Allow customizer controls to be encapsulated by accepting pre-instantiated settingsWed, 07 Sep 2016 06:31:49 GMTMon, 25 Sep 2017 17:28:29 GMT<p>
In <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/35926" title="defect (bug): Allow controls to be registered without any associated settings (closed: fixed)">#35926</a> the ability to add setting-less controls was made possible. The work here only went halfway, however. Consider wanting to re-use a control in a standalone context (see <a class="reopened ticket" href="https://core.trac.wordpress.org/ticket/29071" title="enhancement: Make it easier to include an instance of the Customizer outside of ... (reopened)">#29071</a>), where the settings used in the control are just plain <tt>wp.customize.Value</tt> instances. Controls should allow pre-instantiated <tt>Value</tt> (<tt>Setting</tt>) objects to be passed in as <tt>params.settings</tt>. And when this is done, there would be no <tt>api( settingId... )</tt> deferrals.
</p>
<p>
So one should be able to create a new control like this:
</p>
<div class="code"><pre><span class="kd">var</span> <span class="nx">control</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">wp</span><span class="p">.</span><span class="nx">customize</span><span class="p">.</span><span class="nx">Control</span><span class="p">(</span> <span class="s1">'product_color'</span><span class="p">,</span> <span class="p">{</span>
<span class="nx">type</span><span class="o">:</span> <span class="s1">'color'</span><span class="p">,</span>
<span class="nx">params</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">settings</span><span class="o">:</span> <span class="p">{</span>
<span class="s1">'default'</span><span class="o">:</span> <span class="k">new</span> <span class="nx">wp</span><span class="p">.</span><span class="nx">customize</span><span class="p">.</span><span class="nx">Value</span><span class="p">(</span> <span class="s1">'#000000'</span> <span class="p">)</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">}</span> <span class="p">);</span>
</pre></div><p>
Instead of having to do:
</p>
<div class="code"><pre><span class="nx">wp</span><span class="p">.</span><span class="nx">customize</span><span class="p">.</span><span class="nx">create</span><span class="p">(</span> <span class="s1">'product_color'</span><span class="p">,</span> <span class="s1">'product_color'</span><span class="p">,</span> <span class="s1">'#000000'</span><span class="p">,</span> <span class="p">{}</span> <span class="p">);</span>
<span class="nx">control</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">wp</span><span class="p">.</span><span class="nx">customize</span><span class="p">.</span><span class="nx">Control</span><span class="p">(</span> <span class="s1">'product_color'</span><span class="p">,</span> <span class="p">{</span>
<span class="nx">type</span><span class="o">:</span> <span class="s1">'color'</span><span class="p">,</span>
<span class="nx">params</span><span class="o">:</span> <span class="p">{</span>
<span class="nx">settings</span><span class="o">:</span> <span class="p">{</span>
<span class="s1">'default'</span><span class="o">:</span> <span class="s1">'product_color'</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="p">}</span> <span class="p">);</span>
</pre></div><p>
The goal is to allow controls to be encapsulated and to be able to use them in standalone contexts or embedded inside of other controls.
</p>
<p>
Related:
</p>
<ul><li><a class="accepted ticket" href="https://core.trac.wordpress.org/ticket/30738" title="enhancement: JS content templates for base WP_Customize_Control (accepted)">#30738</a>
</li><li><a class="new ticket" href="https://core.trac.wordpress.org/ticket/37275" title="enhancement: Facilitate creating controls that manipulate settings with object values (new)">#37275</a>
</li><li><a class="reopened ticket" href="https://core.trac.wordpress.org/ticket/29071" title="enhancement: Make it easier to include an instance of the Customizer outside of ... (reopened)">#29071</a>
</li></ul>westonruterhttps://core.trac.wordpress.org/ticket/37964
https://core.trac.wordpress.org/ticket/37964Report#37940: WordPress email subject updateSat, 03 Sep 2016 22:11:38 GMTTue, 15 Aug 2017 11:33:40 GMT<p>
The the attached screenshots and the patch.
</p>
ramiyhttps://core.trac.wordpress.org/ticket/37940
https://core.trac.wordpress.org/ticket/37940Report#37750: Cropping custom logo should preserve attachment propertiesSat, 20 Aug 2016 16:39:49 GMTMon, 11 Sep 2017 14:38:45 GMT<p>
I just noticed that, when uploading and cropping a custom logo, the original attachment's properties won't be migrated to the cropped image. I specifically added an "alt" description of the image, but on the website it only showed the file name for the alt tag, since the new cropped image does not preserve any of the data provided into the uploaded image. I think this is unexpected behavior and should be fixed.
</p>
<p>
I think the data manually changed by the user should be migrated to the cropped image to prevent this.
</p>
flixos90https://core.trac.wordpress.org/ticket/37750
https://core.trac.wordpress.org/ticket/37750Report#37661: A New Experience for Discovering, Installing, and Previewing Themes in the CustomizerMon, 15 Aug 2016 02:35:07 GMTTue, 26 Sep 2017 19:26:41 GMT<h2 id="BackgroundHistory">Background &amp; History</h2>
<p>
The customizer originated as a tool for previewing and customizing themes and as such, was closely integrated into the theme browsing experience in the admin (in WordPress 3.4). Eventually, as the customizer's role grew to that of a framework for live-previewing any change to a site, it became apparent that it would benefit from a more direct way to switch themes, without entering the admin context. The Customizer Theme Switcher plugin was created, and after some refinement, merged into WordPress 4.2. However, while it initially included external links to install themes in the admin, these were eventually removed due to the jarring experience of unexpectedly leaving the customizer.
</p>
<p>
Currently, there is no indication that additional themes can be installed when viewing available themes in the customizer. For new users, it may take quite a bit of time to discover the ability to install themes, via wp-admin, or they may give up on WordPress before making this discovery. This is a usability dead-end where a user's flow is disrupted in the process of discovering, installing, previewing, and activating themes, both on initial site setup and when considering a redesign.
</p>
<p>
When the theme switcher plugin was developed, we made preliminary plans for a theme installation interface as a second phase of the project. Specifically, it would leave the "preview" context of the customizer, but retain the same identity in the user experience and provide cognitive hierarchy from the options in the various customizer sections by sliding in from the right instead of the left. @folletto helped develop this initial concept early last year.
</p>
<h2 id="TechnicalConstraintsRequirements">Technical Constraints &amp; Requirements</h2>
<p>
There have been several technical limitations preventing theme installation in the customizer from being addressed previously. Most notably, such an interface would require "shiny" ajax-based theme installation, updates, and deletion, so that the user flow could persistently stay in the customizer themes interface rather than jumping to separate "installing" views. This is now possible with phase 2 of "Shiny Updates" in WordPress 4.6. Additionally, expansions of the customizer JavaScript and JS-templated controls APIs to better support dynamically-registered controls were needed to support theme installation within the customizer framework, and these were added for the customizer menus interface introduced in WordPress 4.3. With these technical constraints eliminated, theme installation in the customizer can now be considered without requiring significant improvements to the underlying themes or customizer APIs.
</p>
<p>
The way that the customizer currently previews themes requires the customizer to be completely reloaded from PHP to preview a different theme. Ideally this will eventually change, but due to the complexity of redesigning the internals to make use of a theme setting, and eventually to adjust which theme's registered sections, settings, and controls to use dynamically, changes to these pieces should be explicitly out of scope for the user-facing flow project. The biggest usability block that this limitation causes is that unsaved changes are lost when the theme is switched. This is currently handled by prompting users with an are-you-sure notice in the browser before making the switch, but limitations in JavaScript require the loading indicator to be hidden after the user selects either to stay on the page or to continue to the new theme, causing confusion. In a new interface, this could be further mitigated by displaying a warning that there are unsaved changes, with an inline button to save and publish them, at the top of the interface, so that it is in the user's flow before they begin browsing themes. With transactions, a save draft option could also become possible in the future, allowing the changes to be saved without being published.
</p>
<h2 id="PreviewingThemes">Previewing Themes</h2>
<p>
One of the biggest challenges with theme installation in wp-admin, and opportunities in the customizer, is previewing themes. Currently, a customizer-like frame displays a preview hosted on WordPress.org, with limited content. Rather than opening this potentially-disorienting similar but different interface, the proposed flow de-emphasizes the distinction between installed and available themes. The primary action for available themes is now "Install &amp; Preview", which installs the theme and live previews it in one step. Users can now see the theme on their site with their content and play with its options in the customizer. If they decide it's the wrong theme, the themes panel can be quickly reopened and another theme selected and previewed with no harm done. A secondary action would allow themes to be installed without instantly previewing, so that the installed themes tab can become a personal theme library of sorts, where users can save themes that they might want to try on their site. Installed themes being a tab along with the available theme headings unifies the previously-disorienting separation of themes and add-new themes on separate screens, with separate search and header (add new/upload theme) functionality.
</p>
<h2 id="InitialProposal">Initial Proposal</h2>
<p>
Based on the preliminary design work done by @folletto as well as the goals and proposals presented above, I have put together an initial nearly-fully-functional proposal for a new themes interface in the customizer. Due to the tight integration with the existing system, with the existing theme control and section as well as internal elements in the customizer manager and theme details template requiring moderate modifications, this needs to be completed as a patch and cannot be reasonably converted into a plugin and back. To counteract this challenge, I have completed the major structural development process already, so that iterations can focus on the UI, UX, accessibility, and smaller details that won't impact the base functionality. A list of development tasks leading up to this point and remaining tasks is forthcoming.
</p>
<p>
The technical implementation continues adapting the concepts present in the backbone.js-based themes experience in wp-admin to leverage the customizer API. With the themes experience natively built on the customizer framework, it should be much easier for developers to improve and maintain the core experience in the future as well as extending the core experience in a structured way.
</p>
<p>
A few notes on the initial proposal, which will be supplemented with visuals and a patch below:
</p>
<ul><li>The themes experience is unchanged on the top level of the customizer, but selecting the change theme button now opens a panel that fills the entire screen, as the preview is not relevant when considering a theme change.
</li><li>The customizer UI identity is preserved by using similar design cues, such as the #eee background with white backgrounds indicating actionable UI, and the current theme display in the header, which matches the display in the customizer pane.
</li><li>Where possible, the UI is identical to that found in the theme installer in wp-admin (which would remain, of course).
</li><li>The theme details view is unified between installed and available themes, with clicking on a screenshot opening the details view to match the admin UI.
</li><li>Primary buttons are used where clicking them takes you away from the current page; secondary buttons are used elsewhere.
</li><li>Installed themes are no longer loaded every time the customizer is opened, resulting in potentially significant performance improvements by only calling <tt>wp_prepare_themes_for_js()</tt> when needed. This also allows themes in the customizer to be fully disabled with <tt>remove_panel( 'themes' )</tt>.
</li><li>The loading strategy attempts to balance performance with wait time by loading theme data from Ajax in large batches (100 themes) and following up by rendering screenshots as they become visible (as the existing interface does).
</li></ul><p>
Note: this ticket description can be adapted for a make/core post once initial feedback is incorporated.
</p>
celloexpressionshttps://core.trac.wordpress.org/ticket/37661
https://core.trac.wordpress.org/ticket/37661Report#37569: REST API: refresh expired noncesThu, 04 Aug 2016 10:27:53 GMTSun, 16 Jul 2017 21:52:24 GMT<p>
<strong>Is there a reason to not refresh an expired nonce?</strong>
</p>
<p>
At the moment the API only refreshes nonces when it's given an unexpired nonce, so that the client can refresh it for future requests. When the nonce expired though, it will just error. The only thing a client can do then is to refresh the page, or get a new nonce some other way. Since a simple authenticated request is enough to get a new nonce elsewhere, I don't see why the API itself can't provide the client with a new one, so that the client can refresh its nonce, and repeat the request with the new nonce.
</p>
iseuldehttps://core.trac.wordpress.org/ticket/37569
https://core.trac.wordpress.org/ticket/37569Report#37535: Outputting Post Type Description on admin edit screenMon, 01 Aug 2016 06:14:19 GMTTue, 26 Sep 2017 17:19:58 GMT<p>
When registering a custom post type you can<a class="ext-link" href="https://codex.wordpress.org/Function_Reference/register_post_type#description"><span class="icon">​</span>specify the description</a> as part of the arguments you pass into <tt>register_post_type</tt>. I would expect that somewhere in the back-end of WP this description would be shown, however it isn't.
</p>
<p>
It would be great if we could output the description right below the title of the post type when viewing the entries table (as I've done below)
</p>
<p>
<a style="padding:0; border:none" href="https://goo.gl/IwzNmi"><img src="https://goo.gl/IwzNmi" alt="https://goo.gl/IwzNmi" title="https://goo.gl/IwzNmi" /></a>
</p>
<p>
I've updated <tt>edit.php</tt> inside of <tt>wp-admin</tt> and added the following code after the main H1 tag
</p>
<pre class="wiki">&lt;?php
//output description if set
if($post_type_object-&gt;description){
echo '&lt;p class="description"&gt;';
echo esc_html( $post_type_object-&gt;description);
echo '&lt;/p&gt;';
}?&gt;
</pre><p>
It's a pretty small update but its pretty useful for clients so that know what this admin edit screen is for. I use them for outlining what type of content will be added here.
</p>
<p>
If the content type doesn't have a description nothing is outputted.
</p>
<p>
I can submit a pull request since it's a fairly straightforward change.
</p>
<p>
Cheers
</p>
<p>
Simon
</p>
simonrcodringtonhttps://core.trac.wordpress.org/ticket/37535
https://core.trac.wordpress.org/ticket/37535Report#37522: reset password and lost password form functionsSat, 30 Jul 2016 09:07:07 GMTMon, 25 Sep 2017 16:19:19 GMT<p>
Wordpress provides the <tt>wp_login_form</tt> function that can be placed anywhere on our wordpress site through shortcodes, etc. But I couldn't find a function for the <em>reset password</em> and <em>lost password</em> form.
</p>
<p>
Would it be possible to create those functions as part of Wordpress itself?
I'd like to avoid copying code from the wp core files (wp-login) into my own code. I prefer to use Wordpress built-in functions as much as possible.
</p>
mireillesanhttps://core.trac.wordpress.org/ticket/37522
https://core.trac.wordpress.org/ticket/37522Report#37516: Site title and tagline: allow ability to hide each independentlyFri, 29 Jul 2016 17:44:11 GMTTue, 26 Sep 2017 17:00:27 GMT<p>
By adding the ability for users to turn on or off the site title and tagline individually we would allow more flexibility. Currently it's both or none, this does not allow the flexility that users want over their site. There are valid cases where people do not want either.
</p>
karmatosedhttps://core.trac.wordpress.org/ticket/37516
https://core.trac.wordpress.org/ticket/37516Report#37430: Add Plugins: Improve the error messages displayingThu, 21 Jul 2016 07:49:02 GMTMon, 25 Sep 2017 17:18:26 GMT<p>
Minor visual improvements: in the Add Plugins screen, some error messages could use some love. For example, some messages can be very long: setting a max-width and increasing a bit the line-height could help. Also, on the responsive view, maybe the messages should not be displayed in the middle of the page but moved to the top.
</p>
<p>
<a style="padding:0; border:none" href="https://cldup.com/y_aJ3wOFF6.png"><img src="https://cldup.com/y_aJ3wOFF6.png" alt="https://cldup.com/y_aJ3wOFF6.png" title="https://cldup.com/y_aJ3wOFF6.png" /></a>
</p>
<p>
For comparison, this is how the same message gets displayed in the Themes screens, so maybe worth considering also introducing a bit of consistency:
</p>
<p>
<a style="padding:0; border:none" href="https://cldup.com/ZaBx-VyufE.png"><img src="https://cldup.com/ZaBx-VyufE.png" alt="https://cldup.com/ZaBx-VyufE.png" title="https://cldup.com/ZaBx-VyufE.png" /></a>
</p>
aferciahttps://core.trac.wordpress.org/ticket/37430
https://core.trac.wordpress.org/ticket/37430Report#37189: In wp_term_query on cache idsSun, 26 Jun 2016 14:20:39 GMTMon, 25 Sep 2017 16:34:07 GMT<p>
Currently when a wp_term_query is run with fields =&gt; 'all', an array of the entire WP_Term objects is stored in cache. This is a bad for a number of results. With popular object caching memcache has a limit of 1MB per object in cache. By storing the whole term object, you might have a descriptions on the object that long. This may mean the terms array is unable to be stored in memcache.
</p>
<p>
Going forward we should only store the ids in cache, like the wp_site_query and wp_comment_query.
</p>
spacedmonkeyhttps://core.trac.wordpress.org/ticket/37189
https://core.trac.wordpress.org/ticket/37189Report#37110: Update to jQuery 3.*Wed, 15 Jun 2016 17:15:25 GMTMon, 14 Aug 2017 22:34:15 GMT<p>
<a class="ext-link" href="https://blog.jquery.com/2016/06/09/jquery-3-0-final-released/"><span class="icon">​</span>jQuery 3.0 has been released</a>. There are a number of <a class="ext-link" href="https://jquery.com/upgrade-guide/3.0/"><span class="icon">​</span>breaking changes</a> and the browser minimums have been updated, so we need to figure out how to handle the update as it won't be the normal straight forward update.
</p>
jorbinhttps://core.trac.wordpress.org/ticket/37110
https://core.trac.wordpress.org/ticket/37110Report#37013: Minor Fixes: "Toggle indicator" in pages have focus color while the same in widgets/menus have none.Fri, 03 Jun 2016 10:13:45 GMTWed, 02 Aug 2017 19:15:53 GMT<p>
Toggle indicator in pages/post has visible focus color(blue border radius) on indicator but this is not present on Widget and Menus. It should display same focus effect on "Toggle Indicator" in Widgets and Menus.
</p>
<p>
Testing Environment:-
OS: Windows 10
Browser: Chrome 50.0.2661.102 , IE-11 , Firefox 46.0.1
WP : 4.5.2
Server-Environment : VVV
</p>
monikaraohttps://core.trac.wordpress.org/ticket/37013
https://core.trac.wordpress.org/ticket/37013Report#36961: wp_roles displays incorrect roles in multisiteFri, 27 May 2016 18:24:06 GMTTue, 26 Sep 2017 19:45:40 GMT<p>
The WP_User class accepts a 3rd parameter for a site ID, but this never translates over to roles.
</p>
<p>
In class-wp-user.php WP_User-&gt;_init_caps() the correct capabilities are retrieved from the database, but when WP_User-&gt;get_role_caps() gets called, the first thing it does is fire wp_roles() in capabilities.php This will global $wp_roles or if not set, it will initialize a new WP_Roles class.
</p>
<p>
Where this becomes a problem is if you're not on the site you're checking the roles on, wp_roles() returns the roles of the current site instead. Back in WP_User-&gt;get_role_caps(), the arrays get filtered and since there's a mismatch of roles defined on current site vs roles actually assigned to user, you will get an empty array as a result when looking at WP_User-&gt;roles
</p>
<p>
To see this in action, I set up a test multisite install to confirm. I deleted all roles but admin on the main site, then created 2 new arbitrary roles. I then created a second site in the install, deleted all roles but admin, and created another arbitrary role. I added a new user to the install. If I go to network admin and attempt to assign the user to site 2, the roles drop down displays the roles defined on site 1 rather than site 2. If I go to the dashboard of site 2 and go to add the user, I see the correct roles available.
</p>
<p>
I'm not sure if this is intended behavior, though I can't imagine it is as it leads to a bug in network admin allowing a user to be set to a role that potentially doesn't even exist on the site you assign them to.
</p>
<p>
I've tested this from WP 4.2-4.5 and get the same results in wp-admin
</p>
<p>
Logging as roles/capabilities component, because even though it affects multisite, I think the core issue exists in roles and capabilities.
</p>
ryanduffhttps://core.trac.wordpress.org/ticket/36961
https://core.trac.wordpress.org/ticket/36961Report#36882: Add a reusable admin CSS class for destructive actionsWed, 18 May 2016 22:54:26 GMTMon, 17 Jul 2017 15:46:05 GMT<p>
As generally recommended, plugin authors should not use regular buttons for destructive actions, like removing something.
</p>
<p>
However, while there are standardized classes for buttons in WordPress admin (<tt>button</tt>, <tt>button-primary</tt>, <tt>button-secondary</tt>), a similar standardized class is missing for the destructive link. There are several locations in the admin where such links are displayed, but these are all styled using their individual selectors. Therefore plugin authors who want to use this style must either use one of these selectors (that probably do not fit the use-case at all) or recreate the style manually. Therefore I propose to standardize these style rules for a specific class, for example something like <tt>delete-button</tt> or <tt>delete-link</tt>.
</p>
flixos90https://core.trac.wordpress.org/ticket/36882
https://core.trac.wordpress.org/ticket/36882Report#36824: do_all_pings function queries all postsThu, 12 May 2016 13:23:37 GMTThu, 14 Sep 2017 03:55:09 GMT<p>
In the do_all_pings function, the following sql query runs.
</p>
<p>
SELECT ID FROM $wpdb-&gt;posts WHERE to_ping &lt;&gt; <em> AND post_status = 'publish'
</em></p>
<p>
Performance monitor tool (new relic) has flagged this has a bad query. It said the following
</p>
<p>
This table was retrieved with a full table scan, which is often quite bad for performance, unless you only retrieve a few rows.
The table was retrieved with this index:
No index was used in this part of the query.
You can speed up this query by querying only fields that are within the index. Or you can create an index that includes every field in your query, including the primary key.
Approximately 114860 rows of this table were scanned.
</p>
<p>
I don't understand why this call isn't going through the wp query object. If it did you could then cache the result.
</p>
spacedmonkeyhttps://core.trac.wordpress.org/ticket/36824
https://core.trac.wordpress.org/ticket/36824Report#36561: Deprecated notices should be classified as such.Sun, 17 Apr 2016 11:16:42 GMTWed, 02 Aug 2017 21:24:23 GMT<p>
All errors triggers should be classified with the appropriate error level.
</p>
<p>
Most notably, the <tt>_deprecated_function()</tt>/<tt>_deprecated_constructor()</tt>/<tt>_deprecated_file()</tt>/<tt>_deprecated_argument()</tt>/<tt>_doing_it_wrong()</tt> function do not pass an appropriate error level to <tt>trigger_error()</tt>.
</p>
<p>
For the deprecated function group, the most appropriate level seems to be <tt>E_USER_DEPRECATED</tt> which was introduced in PHP 5.3.0.
</p>
<p>
For <tt>_doing_it_wrong()</tt> an <tt>E_USER_NOTICE</tt> (or <tt>E_USER_WARNING</tt>) seems more appropriate.
</p>
<p>
Fixed in the accompanying patch.
</p>
<p>
For backward compatibility with PHP 5.2, a define for <tt>E_USER_DEPRECATED</tt> has been added to <tt>wp-includes/compat.php</tt> which follows the same logic as used in SimplePie for consistency:
<a href="https://core.trac.wordpress.org/browser/trunk/src/wp-includes/class-simplepie.php#L699">https://core.trac.wordpress.org/browser/trunk/src/wp-includes/class-simplepie.php#L699</a>
</p>
jrfhttps://core.trac.wordpress.org/ticket/36561
https://core.trac.wordpress.org/ticket/36561Report#36514: posting with custom taxesWed, 13 Apr 2016 17:55:33 GMTSat, 01 Jul 2017 14:06:35 GMT<p>
Sorry for my bad english.
</p>
<p>
Seems there is a bug in wp-admin/includes/post.php on line 348.
</p>
<p>
Need for use
</p>
<div class="code"><pre><span class="x">'include' =&gt; $term,
</span></pre></div><p>
instead
</p>
<div class="code"><pre><span class="x">'name' =&gt; $term,
</span></pre></div><p>
Now it causes errors when saving posts within custom non-hierarchical taxonomies - WordPress by mistake spontaneously creates new items which has names like id's cheked items.
</p>
hokkuhttps://core.trac.wordpress.org/ticket/36514
https://core.trac.wordpress.org/ticket/36514Report#36455: Call opcache_reset() after plug-in, theme or core updateSat, 09 Apr 2016 09:14:02 GMTWed, 12 Jul 2017 04:21:49 GMT<p>
wordpress it seem not reset Zend OpCache after plug-in, theme or core are updated.
</p>
<p>
For solve this issue i have set in the php.ini
</p>
<pre class="wiki">opcache.validate_timestamps=1
</pre><p>
all work correctly but validate_timestamps when it's enabled, PHP will check the file timestamp each request with a performance degradation. When it's disabled, PHP files are NEVER checked for updated code. When wordpress updating code, new code files can get mixed with old ones, the results are unknown. It's unsafe as hell.
</p>
<p>
Why wordpress not perform an opcache_reset() after each update if opcache is active and opcache.validate_timestamps is false?
</p>
nigro.simonehttps://core.trac.wordpress.org/ticket/36455
https://core.trac.wordpress.org/ticket/36455Report#36441: Customizer: when setting header image, site icon and logo, do not force the user to crop the image if cropping is not requiredThu, 07 Apr 2016 15:33:28 GMTWed, 20 Sep 2017 22:14:46 GMT<p>
This is a long time standing UX "weirdness". When using "the Cropper" in the Customizer, it forces the user to crop the selected image even when it only requires scaling. To reproduce:
</p>
<ul><li>Open the Customizer and go to setting a site icon.
</li><li>Upload an image that is square, I tested with 800 x 800px. We require 512 x 512px image for site icon, so the uploaded image only needs to be scaled. However on the next screen there is no "Skip cropping" button. If the users wants to use the whole image, they will have to "crop" it at 100% x 100% to get to the next step.
</li></ul>azaozzhttps://core.trac.wordpress.org/ticket/36441
https://core.trac.wordpress.org/ticket/36441Report#36319: Post meta authorization filter docs are incorrectThu, 24 Mar 2016 05:16:33 GMTSun, 20 Aug 2017 19:23:55 GMT<p>
The <a class="ext-link" href="https://github.com/WordPress/WordPress/blob/40455626f076dcc3d6e454f373da618bd261c898/wp-includes/capabilities.php#L252"><span class="icon">​</span>doc</a> for the <tt>auth_post_meta_*</tt> filter says
</p>
<blockquote class="citation">
<p>
Filter whether the user is allowed to add post meta to a post.
</p>
</blockquote>
<p>
This is not actually the case. If the filter returns false, the user will need to have the <tt>edit_post_meta</tt> cap. Otherwise, <tt>edit_post</tt> mapped meta caps apply.
</p>
ericlewishttps://core.trac.wordpress.org/ticket/36319
https://core.trac.wordpress.org/ticket/36319Report#36191: Support responsive images in WP_Customize_Media_ControlThu, 10 Mar 2016 02:14:17 GMTWed, 20 Sep 2017 22:14:46 GMT<p>
When you add a custom logo, the preview in the Customizer sidebar isn't retina, even if the image file you uploaded is big enough.
</p>
<p>
Discovered in <a href="https://core.trac.wordpress.org/ticket/35942#comment:13">https://core.trac.wordpress.org/ticket/35942#comment:13</a>. Some additional comments there.
</p>
<p>
Related:
</p>
<ul><li><a class="assigned ticket" href="https://core.trac.wordpress.org/ticket/21455" title="enhancement: HiDPI (retina) theme custom backgrounds (assigned)">#21455</a>: HiDPI (retina) theme custom backgrounds
</li><li><a class="new ticket" href="https://core.trac.wordpress.org/ticket/36442" title="defect (bug): Customizer: when setting header image and site logo, also create a 2x ... (new)">#36442</a>: Customizer: when setting header image and site logo, also create a 2x image if possible
</li></ul>melchoycehttps://core.trac.wordpress.org/ticket/36191
https://core.trac.wordpress.org/ticket/36191Report#36033: 'kses_allowed_protocols' filter is not really filterable.Tue, 01 Mar 2016 19:56:37 GMTFri, 30 Jun 2017 01:06:32 GMT<p>
in "wp_allowed_protocols()", "kses_allowed_protocols" filter only loaded once.
</p>
<p>
And if "esc_url()" is called early, it will load "wp_allowed_protocols()" function and basically disable the filter.
</p>
<p>
How to debug:
</p>
<ol><li>add "mu-plugins" file with "esc_url()". example code:
</li></ol><pre class="wiki">&lt;?php
/* no not add empty string */
esc_url( 'google.com' );
</pre><ol start="2"><li>Now, no plugin will ever able to filter "kses_allowed_protocols"
</li></ol><p>
adding new protocols will not work. example plugin:
<a class="ext-link" href="https://wordpress.org/plugins/fx-skype-link-enabler/"><span class="icon">​</span>https://wordpress.org/plugins/fx-skype-link-enabler/</a>
</p>
<p>
Reason:
Here's the code for "wp_allowed_protocols()"
<a class="ext-link" href="https://developer.wordpress.org/reference/functions/wp_allowed_protocols/"><span class="icon">​</span>https://developer.wordpress.org/reference/functions/wp_allowed_protocols/</a>
</p>
<pre class="wiki">function wp_allowed_protocols() {
static $protocols = array();
if ( empty( $protocols ) ) {
$protocols = array( 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn', 'tel', 'fax', 'xmpp', 'webcal' );
/**
* Filter the list of protocols allowed in HTML attributes.
*
* @since 3.0.0
*
* @param array $protocols Array of allowed protocols e.g. 'http', 'ftp', 'tel', and more.
*/
$protocols = apply_filters( 'kses_allowed_protocols', $protocols );
}
return $protocols;
}
</pre><p>
so, the filter only loaded once when this function is loaded for the first time.
</p>
<p>
Suggestion:
change it to something like:
</p>
<pre class="wiki">function wp_allowed_protocols() {
static $protocols = array();
if ( empty( $protocols ) ) {
$protocols = array( 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn', 'tel', 'fax', 'xmpp', 'webcal' );
}
return apply_filters( 'kses_allowed_protocols', $protocols );
}
</pre><p>
and move the filters to final output of the function.
</p>
<p>
Because:
Correct me if I'm wrong:
this filter is basically useless if user call "esc_url()" which call "wp_allowed_protocols()" and practically disable this filter. and make other plugin loaded later unable to add proper protocol for valid uses.
</p>
<p>
-- David.
</p>
turtlepodhttps://core.trac.wordpress.org/ticket/36033
https://core.trac.wordpress.org/ticket/36033Report#35554: De-emphasise WordPress Version in the adminThu, 21 Jan 2016 09:54:32 GMTMon, 25 Sep 2017 16:43:45 GMT<p>
Currently WordPress is very proud of the version it's running - but version strings are not exactly the most important piece of information to a regular user.
I'd like to bring it back to displaying only the major version (ie. <tt>Version 4.4</tt>, not <tt>Version 4.4.1</tt>).
</p>
<p>
A few of us have kicked the idea around over the years, and making the version number less specific as we move towards faster point releases really makes a lot of sense.
</p>
<p>
There's two options which could be taken:
</p>
<ol><li>Simply bring it back to x.y (<tt>Version 4.4</tt>). <a class="attachment" href="https://core.trac.wordpress.org/attachment/ticket/35554/major.minor.diff" title="Attachment 'major.minor.diff' in Ticket #35554">attachment:major.minor.diff</a><a class="trac-rawlink" href="https://core.trac.wordpress.org/raw-attachment/ticket/35554/major.minor.diff" title="Download">​</a>
</li><li>Remove it entirely, including the <tt>You are running WordPress x.y.z running Theme X theme.</tt> message in the at-a-glance widget. <a class="attachment" href="https://core.trac.wordpress.org/attachment/ticket/35554/remove-all-version-mentions.diff" title="Attachment 'remove-all-version-mentions.diff' in Ticket #35554">attachment:remove-all-version-mentions.diff</a><a class="trac-rawlink" href="https://core.trac.wordpress.org/raw-attachment/ticket/35554/remove-all-version-mentions.diff" title="Download">​</a>
</li></ol><p>
The second option is a harder-line approach, but removes information that most users have no need to see most of the time. They'll still see update nags when a new version comes out (Well, except for the million or more of sites which choose to enable automatic updates for major versions too) and the version string will always be available on the update screen where it's useful.
</p>
dd32https://core.trac.wordpress.org/ticket/35554
https://core.trac.wordpress.org/ticket/35554Report#35497: List tables: Post format links improvementsSun, 17 Jan 2016 18:12:58 GMTMon, 25 Sep 2017 16:29:07 GMT<p>
In the Posts list table, when posts have a post format, an icon link is displayed next to the Post title (see screenshot below).
</p>
<p>
<a style="padding:0; border:none" href="https://cldup.com/odYs24tIMz.png"><img src="https://cldup.com/odYs24tIMz.png" alt="https://cldup.com/odYs24tIMz.png" title="https://cldup.com/odYs24tIMz.png" /></a>
</p>
<p>
Ideally, since this is a tabular data, the post format should be in a dedicated table column. By the way, list tables have already several columns and plugins can add their own ones so this change should be carefully considered and would probably require some discussion.
</p>
<p>
Meanwhile, there are a couple of simple improvements that could be easily implemented:
</p>
<p>
<strong>Clarify the link purpose</strong>
Currently the link says, for example, "Video" while clicking on it brings users to a list of all posts with that format. It should probably say "View all posts with video format" and at the same time make clear that post has a video format. Bit tricky but I'm confident a proper wording would solve this issue.
</p>
<p>
<strong>Color contrast</strong>
Should be improved. The icon's color is <tt>#ddd</tt> on a background color <tt>#ffffff</tt> or <tt>#f9f9f9</tt> with a contrast of, respectively, 1.4:1 and 1.3:1. Should be at least 4.5:1.
</p>
aferciahttps://core.trac.wordpress.org/ticket/35497
https://core.trac.wordpress.org/ticket/35497Report#35293: Emoji Regex in wp_encode_emoji() is wildly inaccurateSun, 03 Jan 2016 11:40:46 GMTMon, 25 Sep 2017 05:26:59 GMT<p>
It's just plain wrong, it misses masses of edge cases.
</p>
<p>
We should figure out how to keep the regex from <tt>twemoji.js</tt> in sync, instead.
</p>
pentohttps://core.trac.wordpress.org/ticket/35293
https://core.trac.wordpress.org/ticket/35293Report#35218: Parse the creation date out of uploaded videosThu, 24 Dec 2015 20:28:39 GMTThu, 21 Sep 2017 18:27:27 GMT<p>
When images are uploaded into the media library, <tt>wp_read_image_metadata()</tt> will read the images' EXIF data to determine the date the image was taken, which is returned in "created_timestamp". Other media types (audio and video) do not provide this information, but it's still useful metadata (especially on media-heavy sites).
</p>
<p>
This information is available through the getID3 library, however where it lives varies based on the type of media uploaded. I propose we add a "created_timestamp" key to <tt>wp_read_video_metadata()</tt> (and ideally <tt>wp_read_audio_metadata()</tt> as well) which parses out a timestamp corresponding to when the media was created (as we do with images).
</p>
stevegrunwellhttps://core.trac.wordpress.org/ticket/35218
https://core.trac.wordpress.org/ticket/35218Report#34991: Introduce a typographic measure for the admin screensThu, 10 Dec 2015 22:03:26 GMTTue, 26 Sep 2017 14:44:41 GMT<p>
For optimal readability, lines of text shouldn't exceed a certain length. In typography, this is called <a class="ext-link" href="https://en.wikipedia.org/wiki/Measure_(typography)"><span class="icon">​</span>measure</a> and looking around for references you will find several (different) recommendations, starting from 45-50 characters per line till 90 or even more.
</p>
<p>
By the way, there's no such a thing as an absolute, perfect, number to fit all the different cases. It depends on many different factors, starting from the typeface used, its metrics, if it's a single column or multi-column layout etc.
</p>
<p>
That said, when a line of text is really, really, too long, then readability, usability, and accessibility, they're all seriously affected.
</p>
<p>
I'd like to encourage typography lovers and designers to start some discussion, research, and development with the long-term goal to improve typography in the admin screens. Trying to implement a <em>measure</em> could be a nice start.
</p>
<p>
Also, I'd like to propose to consider the introduction of a new "typography" focus tag for Trac.
</p>
<p>
In the screenshots below: a couple examples of some admin screens rendered on a large display with the browser's window maximized.
</p>
<p>
<a style="padding:0; border:none" href="https://cldup.com/Lqn6W2CVsy.png"><img src="https://cldup.com/Lqn6W2CVsy.png" alt="https://cldup.com/Lqn6W2CVsy.png" title="https://cldup.com/Lqn6W2CVsy.png" /></a>
</p>
<p>
<a style="padding:0; border:none" href="https://cldup.com/CV2JcdQI1w.png"><img src="https://cldup.com/CV2JcdQI1w.png" alt="https://cldup.com/CV2JcdQI1w.png" title="https://cldup.com/CV2JcdQI1w.png" /></a>
</p>
aferciahttps://core.trac.wordpress.org/ticket/34991
https://core.trac.wordpress.org/ticket/34991Report#34843: Customizer: allow themes in the Customizer to be disabled by pluginsThu, 03 Dec 2015 19:01:40 GMTMon, 25 Sep 2017 17:17:22 GMT<p>
<a class="closed ticket" href="https://core.trac.wordpress.org/ticket/33552" title="enhancement: Facilitate plugins to override Customizer features (closed: fixed)">#33552</a> introduced filters to disable widgets and menus in the Customizer. We should have the same thing for themes. There are ways to do this already, but they are a bit frustrating since it would be better not to have the relatively expensive <tt>wp_prepare_themes_for_js()</tt> function run at all.
</p>
<p>
Happy to provide a patch if this gets accepted.
</p>
mattwiebehttps://core.trac.wordpress.org/ticket/34843
https://core.trac.wordpress.org/ticket/34843Report#34625: wp-login.php site title link points to wordpress.orgSun, 08 Nov 2015 22:25:10 GMTThu, 24 Aug 2017 08:27:39 GMT<p>
In the WordPress administration login page, the site title at the top of the page is linked to wordpress.org
</p>
<p>
From an accessibility perspective, this is misleading. Specifically, WCAG 2.0 has a focus on making link text that describes the purpose of a link - which this does not.
</p>
<p>
The WC3 have several articles covering this topic, but this gives the general idea of what they're advising <a class="ext-link" href="http://www.w3.org/TR/WCAG20-TECHS/H30.html"><span class="icon">​</span>http://www.w3.org/TR/WCAG20-TECHS/H30.html</a>
</p>
<p>
I am suggesting that we change this text to link to the home url, like happens for multi-sites.
</p>
<p>
The specific change would be
</p>
<p>
wp-login.php - line 101 and line 102
</p>
<p>
FROM
</p>
<pre class="wiki">$login_header_url = __( 'https://wordpress.org/' );
$login_header_title = __( 'Powered by WordPress' );
</pre><p>
TO
</p>
<pre class="wiki">$login_header_url = home_url();
$login_header_title = wp_specialchars_decode(get_option('blogdescription'), ENT_QUOTES);
</pre><p>
If this was done deliberately, such as to promote the wordpress.org website or to help users identify the CMS - you should consider adding a link to the bottom of the login form.
</p>
<p>
If you're wondering why the link title is not adequate, it's because by default screen readers do not read out the link title - they read the linked text.
</p>
<p>
Here's an article that touches on this and has a video showing how ineffective it is: <a class="ext-link" href="https://silktide.com/i-thought-title-text-improved-accessibility-i-was-wrong/"><span class="icon">​</span>https://silktide.com/i-thought-title-text-improved-accessibility-i-was-wrong/</a>
</p>
ovann86https://core.trac.wordpress.org/ticket/34625
https://core.trac.wordpress.org/ticket/34625Report#34595: Add aria-describedby to improve image/caption relationshipThu, 05 Nov 2015 18:57:10 GMTMon, 24 Jul 2017 16:31:43 GMT<p>
See also <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/27402" title="defect (bug): Add aria-describedby to image gallery output (closed: fixed)">#27402</a>, where we added <tt>aria-describedby</tt> to gallery output. Probably should have thought to deal with captioned images at the same time!
</p>
<p>
Currently, there's minimal semantic relationship between the caption and the image, and none that will reliably be recognized by assistive technology. In theory figure and <tt>figcaption</tt> should provide a relationship, but this doesn't have adequate support.
</p>
<p>
In the HTML mode, no relationship exists at all. In HTML mode, I have doubts about the method to add aria-describedby used in this patch; <tt>str_replace</tt> feels dirty, but it would be backwards-compatible, where adding aria-describedby to the <tt>img</tt> element at input would only effect future images. In HTML4 mode, the relationship has to be between the <tt>img</tt> and the description, not the container, as in the <tt>figure</tt> relationship.
</p>
joedolsonhttps://core.trac.wordpress.org/ticket/34595
https://core.trac.wordpress.org/ticket/34595Report#34539: Image Sizes input fields on Media Settings page is too smallSun, 01 Nov 2015 07:09:48 GMTTue, 26 Sep 2017 17:14:21 GMT<p>
On Media Settings page, when viewed on smartphones (or under 784 pixel width), input field for Image Sizes are shorten, and "max-width: 55px" kicks in. When the input value is 3 digits, it is ok, but when 4 digits, 1 digit is not shown. The "max-width: 55px" needs to modified.
</p>
<p>
Please see captures on Chrome developer tools - iPhone 5, 6, 6 plus.
</p>
Toruhttps://core.trac.wordpress.org/ticket/34539
https://core.trac.wordpress.org/ticket/34539Report#34115: oEmbed not working on author page without postsThu, 01 Oct 2015 14:25:49 GMTWed, 20 Sep 2017 22:14:46 GMT<p>
Hi All.
</p>
<p>
We're working on a project for a client at the moment. It's a content publishing platform. They have multiple authors. all with their own detail page. At the profile edit page, they can fill their biography, they can also insert a youtube link.
</p>
<p>
At the front-end, we disply the biography as:
</p>
<pre class="wiki">&lt;?php echo apply_filters( 'the_content', get_the_author_meta( 'description' ) ); ?&gt;
</pre><p>
The strange thing is, that when they have authored one post, the oEmbed class does the job perfectly, but, when they don't have authored any post, the oEmbed doesn't work.
</p>
<p>
I've looked inside the core and that led to the file "wp-includes/class-wp-embed.php|" at line 181. It checks if there's a post, when not, it's not embedding.
</p>
<p>
When i delete this line, it works for authors without and with posts.
</p>
dannydehaanhttps://core.trac.wordpress.org/ticket/34115
https://core.trac.wordpress.org/ticket/34115Report#34034: Hook for Page Attributes MetaboxSat, 26 Sep 2015 08:03:10 GMTMon, 25 Sep 2017 16:58:21 GMT<p>
The publish metabox provides two hooks to add additional information/elements to it.
</p>
<pre class="wiki">post_submitbox_misc_actions
attachment_submitbox_misc_actions
</pre><p>
It would be trivial to add a similar hook to the Page Attributes meta box - is there any reason why this can't be done?
</p>
<p>
Adding page related meta in an entirely new metabox isn't great for UX - two places for page attributes is silly.
</p>
<p>
There are several solutions touted in the wild ranging from hacking core to removing and recreating the metabox manually or inserting the elements with javascript - none good solutions.
</p>
<p>
The addition of a single hook would allow much better practice to be adopted in adding options to this metabox.
</p>
<pre class="wiki">do_action( 'page_attributes_misc_actions' );
</pre>markcallenhttps://core.trac.wordpress.org/ticket/34034
https://core.trac.wordpress.org/ticket/34034Report#33981: Default Captions Should Use max-widthWed, 23 Sep 2015 18:41:37 GMTThu, 21 Sep 2017 18:29:48 GMT<p>
HTML5 Captions should really be using <tt>max-width: image-size + px</tt> rather than a static width. It's widely supported and more mobile friendly than the default <tt>width</tt> style.
</p>
<pre class="wiki">&lt;figure id="attachment_116" style="max-width: 400px;" class="wp-caption alignright"&gt;
&lt;img class="wp-image-116 size-full" src="image.jpg" alt="redraw" width="400" height="365"&gt;
&lt;figcaption class="wp-caption-text"&gt;Phasellus nec sem in justo pellentesque facilisis.&lt;/figcaption&gt;
&lt;/figure&gt;
</pre><p>
Works just as well - <a class="ext-link" href="http://caniuse.com/#feat=minmaxwh"><span class="icon">​</span>Can I Use: max-width</a>
</p>
Howdy_McGeehttps://core.trac.wordpress.org/ticket/33981
https://core.trac.wordpress.org/ticket/33981Report#33958: All Options FilterTue, 22 Sep 2015 08:26:51 GMTWed, 12 Jul 2017 05:25:30 GMT<p>
Add filter for all options
</p>
sebastian.pisulahttps://core.trac.wordpress.org/ticket/33958
https://core.trac.wordpress.org/ticket/33958Report#33885: meta_form performs a potentially expensive queryTue, 15 Sep 2015 18:23:11 GMTFri, 25 Aug 2017 21:33:09 GMT<p>
This is a follow-up to <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/24498" title="enhancement: Improving performance of meta_form() (closed: fixed)">#24498</a> and the research that @tollmanz did on the query used in meta_form. To summarize:
</p>
<p>
The query in meta_form can be incredibly slow on sites with a lot of post meta.
</p>
<p>
The solution to me seems to be to cache the query and update the cache of meta to use every time a new piece of post_meta is saved. This will prevent the query from needing to be run on sites with a persistent cache.
</p>
jorbinhttps://core.trac.wordpress.org/ticket/33885
https://core.trac.wordpress.org/ticket/33885Report#33704: Reduce reliance on wp_is_mobile()Thu, 03 Sep 2015 09:29:47 GMTWed, 12 Jul 2017 03:35:32 GMT<p>
User agent sniffing is bad. <tt>wp_is_mobile()</tt> isn't very reliable. In core it's actually used to detect if the device is a touch device (so that, among other things, elements that normally appear on hover are shown persistently and JavaScript for touch functionality is loaded).
</p>
<p>
We should audit the use of <tt>wp_is_mobile()</tt> in core to see if replacing it in favour of client-side feature detection is possible. If so, <tt>wp_is_mobile()</tt> should be deprecated.
</p>
<p>
Reported bugs with <tt>wp_is_mobile()</tt>: <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/24541" title="defect (bug): wp_is_mobile() includes tablets (closed: wontfix)">#24541</a>, <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/21667" title="enhancement: Add some user agent to wp_is_mobile (closed: wontfix)">#21667</a>, <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/24252" title="enhancement: Windows Phones are ignored by wp_is_mobile (closed: wontfix)">#24252</a>.
</p>
<p>
History: <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/20014" title="enhancement: Possibly add support for dragging of meta boxes to touch-based interfaces (closed: fixed)">#20014</a>
</p>
johnbillionhttps://core.trac.wordpress.org/ticket/33704
https://core.trac.wordpress.org/ticket/33704Report#33085: Customizer: controls description inside labels are not real labels nor descriptionsWed, 22 Jul 2015 22:45:01 GMTWed, 20 Sep 2017 22:14:46 GMT<p>
Splitting this out from <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/32493" title="defect (bug): Customizer: Improve accessibility of sliding panels (closed: fixed)">#32493</a> (which changed its scope)
</p>
<p>
I'd propose to investigate about the Customizer controls descriptions. Currently, they're inside the label element. The result is they're not a proper form label, since labels should be short. Longer descriptions should be associated with form controls using <tt>aria-describedby</tt>.
As consequence for accessibility: as soon as a form control is focused, its label gets read out. In the following example from the new "Site Icon" functionality in 4.3, all the text highlighted in the blue box will be read out but the actual button text "Select File" won't. <a class="ext-link" href="http://www.w3.org/TR/html5/forms.html#category-label"><span class="icon">​</span>Buttons can have labels</a>, that's correct HTML, but of course the label text will override the button text.
</p>
<p>
Not to mention all the label text is clickable and will activate the button when clicked.
</p>
<p>
<a style="padding:0; border:none" href="https://cldup.com/YrBf73CbMo.png"><img src="https://cldup.com/YrBf73CbMo.png" alt="https://cldup.com/YrBf73CbMo.png" title="https://cldup.com/YrBf73CbMo.png" /></a>
</p>
<p>
Same for input fields, the control description used as label will be read out as... a label.
</p>
<p>
<a style="padding:0; border:none" href="https://cldup.com/cgetk_WbNT.png"><img src="https://cldup.com/cgetk_WbNT.png" alt="https://cldup.com/cgetk_WbNT.png" title="https://cldup.com/cgetk_WbNT.png" /></a>
</p>
<p>
Related: <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/31540" title="enhancement: Dropdown pages Customizer description option (closed: fixed)">#31540</a>
</p>
aferciahttps://core.trac.wordpress.org/ticket/33085
https://core.trac.wordpress.org/ticket/33085Report#33045: New conditional tags for child/parent pagesMon, 20 Jul 2015 10:28:12 GMTThu, 21 Sep 2017 10:11:14 GMT<p>
New enhancements for theme developers with new conditional tags:
</p>
<ul><li><strong>has_parent()</strong> - return boolean result using <tt>$post-&gt;post_parent</tt>.
</li><li><strong>parent_page()</strong> - return the parent page id using <tt>$post-&gt;post_parent</tt>.
</li><li><strong>is_child_of( $id )</strong> - return boolean result using <tt>$post-&gt;post_parent</tt>.
</li></ul><p>
We can change the names, but we need the functionality.
</p>
ramiyhttps://core.trac.wordpress.org/ticket/33045
https://core.trac.wordpress.org/ticket/33045Report#32816: No or inadequate Custom Link URL validationSun, 28 Jun 2015 14:09:19 GMTTue, 26 Sep 2017 17:00:16 GMT<p>
When you add a Custom Link through the Menu Customizer, an invalid URL (non existing protocol for instance) is allowed, but stripped on the front page (by <tt>esc_url_raw</tt>?). An example of such an invalid URL protocol is: hhttps://myurl.com or <a class="ext-link" href="http://"><span class="icon">​</span>http://</a>;.
</p>
<p>
I would expect some some input validation and alert on error. The Menu location doesn't matter (Primary or Social Links). Please see attached images.
</p>
JanRhttps://core.trac.wordpress.org/ticket/32816
https://core.trac.wordpress.org/ticket/32816Report#32399: List table: Lists of items should inform users about the "current view" being displayedThu, 14 May 2015 16:55:09 GMTMon, 25 Sep 2017 16:39:29 GMT<p>
See related <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/32147" title="defect (bug): List table: headings for pagination and views links (closed: fixed)">#32147</a>
</p>
<p>
Several screens in the admin present items in a list and you can filter these lists choosing which "view" you want, whether they're Posts in a List Table or lists generated by other components (see Themes and Plugins), they all have some "views" links.
</p>
<p>
When you select a view, there's no clear, semantic, indication in the markup about the current view being displayed. There's just some bold text.
</p>
<p>
Users, especially the ones who use assistive technologies, would need some feedback about which kind of "view" they're currently in. For example, something like <em>you're currently viewing the Scheduled Posts</em>. Of course this is the semantics that should be conveyed, not the best possible phrasing.
</p>
<p>
There are ways to do this but the main issue would be about translatable strings, as pointed out in <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/32147" title="defect (bug): List table: headings for pagination and views links (closed: fixed)">#32147</a>.
</p>
<p>
Any thoughts and patches more than welcome :)
</p>
<p>
Screenshot for reference:
</p>
<p>
<a style="padding:0; border:none" href="https://cldup.com/KE9MdelYnE.png"><img src="https://cldup.com/KE9MdelYnE.png" alt="https://cldup.com/KE9MdelYnE.png" title="https://cldup.com/KE9MdelYnE.png" /></a>
</p>
aferciahttps://core.trac.wordpress.org/ticket/32399
https://core.trac.wordpress.org/ticket/32399Report#31823: Add ESLint integrationTue, 31 Mar 2015 20:19:57 GMTWed, 28 Jun 2017 23:35:34 GMT<p>
<strong>Update:</strong> The JSCS project has merged into ESLint. So now an ESLint config is needed to be developed for core as opposed to a JSCS one.
</p>
<hr />
<p>
The <a class="ext-link" href="http://jscs.info/"><span class="icon">​</span>JSCS</a> project has <a class="ext-link" href="https://github.com/jscs-dev/node-jscs/issues/1099"><span class="icon">​</span>added</a> a <a class="ext-link" href="https://github.com/jscs-dev/node-jscs/blob/master/presets/wordpress.json"><span class="icon">​</span>wordpress</a> preset. This could be useful to be included in Core. All it needs is a <tt>.jscsrc</tt> file located in the root which contains:
</p>
<div class="code"><pre><span class="p">{</span>
<span class="s2">"preset"</span><span class="o">:</span> <span class="s2">"wordpress"</span><span class="p">,</span>
<span class="s2">"excludeFiles"</span><span class="o">:</span> <span class="p">[</span>
<span class="s2">"**/vendor/**"</span><span class="p">,</span>
<span class="s2">"**.min.js"</span><span class="p">,</span>
<span class="s2">"**/node_modules/**"</span>
<span class="p">]</span>
<span class="p">}</span>
</pre></div><p>
Related:
<a class="new ticket" href="https://core.trac.wordpress.org/ticket/30153" title="enhancement: Integrate PHP_CodeSniffer into build/test tools to enforce coding ... (new)">#30153</a> (PHP_CodeSniffer)
<a class="closed ticket" href="https://core.trac.wordpress.org/ticket/25187" title="enhancement: .jshintrc &amp; .jshintignore support (closed: fixed)">#25187</a> (JSHnt)
<a class="new ticket" href="https://core.trac.wordpress.org/ticket/28543" title="enhancement: Allow stricter JSHint checks for core files (new)">#28543</a> (Allow stricter JSHint checks for core files)
</p>
westonruterhttps://core.trac.wordpress.org/ticket/31823
https://core.trac.wordpress.org/ticket/31823Report#31779: Warn users before using a built-in file editor for the first timeThu, 26 Mar 2015 20:38:24 GMTTue, 26 Sep 2017 17:22:54 GMT<p>
As a person who began tinkering with her WordPress site via the theme and plugin file editors, I am not keen to get rid of them entirely. However, I think we could also do some small amount of education for our users. To that end, I suggest that on a per-user basis, a prompt be shown warning them of the dangers and suggesting alternative methods / linking to more documentation, for both the theme and plugin file editors. If they choose to continue, that prompt should not be shown again for that given editor.
</p>
helenhttps://core.trac.wordpress.org/ticket/31779
https://core.trac.wordpress.org/ticket/31779Report#30738: JS content templates for base WP_Customize_ControlWed, 17 Dec 2014 02:33:15 GMTMon, 25 Sep 2017 16:33:26 GMT<p>
This will make it possible to create all of the base Customizer control types directly in JS, and will allow them to share a single template passed from the server on Customizer init for all controls with the basic types (following up on <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/28709" title="task (blessed): Improve/introduce Customizer JS models for Controls, Sections, and Panels (closed: fixed)">#28709</a>).
</p>
<p>
I think we may need to explore adjusting how register_content_type works since this control handles multiple types and all fallback types. But more likely we'll just do something a bit different, probably adding fallback handling on the other side and hard-coding these types into the Customizer Manager somewhere.
</p>
<p>
Follow-up to <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/29572" title="enhancement: Customizer: add a framework for rendering controls from JS templates (closed: fixed)">#29572</a>. Related to several tickets I'm currently creating.
</p>
celloexpressionshttps://core.trac.wordpress.org/ticket/30738
https://core.trac.wordpress.org/ticket/30738Report#29319: filter dayswithposts in widget calendarFri, 22 Aug 2014 14:28:53 GMTMon, 25 Sep 2017 16:25:06 GMT<p>
Hello
</p>
<p>
here is Konrad, WPML developer. We are fighting now with bug related WordPress calendar widget: it always displays all posts, and we want to filter its results regarding to language of post.
</p>
<p>
Steps to reproduce:
</p>
<ol><li>install WPML
</li><li>publish some post in En language July 1st
</li><li>translate this post July 2nd to Polish language
</li><li>activate calendar widget
</li></ol><p>
Result: calendar will show that there are posts in July 1st and 2nd.
Expected result: when user displays English posts, calendar should display only July 1st. When user switches to Polish language, calndar should display only July 2nd.
</p>
<p>
We want to fix this in WPML but we need filter inside of get_calendar() function.
</p>
<p>
Wordpress gets days with posts by this query inside of get_calendar():
</p>
<pre class="wiki">$dayswithposts = $wpdb-&gt;get_results("SELECT DISTINCT DAYOFMONTH(post_date)
FROM $wpdb-&gt;posts WHERE post_date &gt;= '{$thisyear}-{$thismonth}-01 00:00:00'
AND post_type = 'post' AND post_status = 'publish'
AND post_date &lt;= '{$thisyear}-{$thismonth}-{$last_day} 23:59:59'", ARRAY_N);
</pre><p>
The result should be able to filter, then WPML will hook here.
</p>
<p>
I am attaching proposed diff file.
</p>
<p>
(I see that we can hook into get_calendar filter but this variable has full html output of calendar. This will unefficient to parse this HTML)
</p>
kkarpieszukhttps://core.trac.wordpress.org/ticket/29319
https://core.trac.wordpress.org/ticket/29319Report#29171: empty (and valid) span tags are removed when switching from visual to text editor and back to visualSun, 10 Aug 2014 19:09:52 GMTWed, 05 Jul 2017 20:14:09 GMT<p>
Forwarded from <a class="new ticket" href="https://core.trac.wordpress.org/ticket/28940" title="defect (bug): TinyMCE strips out empty &lt;i&gt; tags, breaking font awesome (new)">#28940</a>, related <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/27391" title="defect (bug): Editor: Word count should exclude ellipsis (closed: fixed)">#27391</a>.
</p>
<p>
The difference with <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/27391" title="defect (bug): Editor: Word count should exclude ellipsis (closed: fixed)">#27391</a> is that when I tried to use a Bootstrap 3 Glyphicon approach while having the 28940.patch installed the editor removes the (empty) span tag. The span tag doesn't use any new schema type of attribute, just a regular class.
</p>
<p>
(see <a class="ext-link" href="http://getbootstrap.com/components/"><span class="icon">​</span>http://getbootstrap.com/components/</a> Glyphicons, How to use for testing)
</p>
ruud@…https://core.trac.wordpress.org/ticket/29171
https://core.trac.wordpress.org/ticket/29171Report#28721: Scheduled changes for the customizerWed, 02 Jul 2014 17:33:12 GMTMon, 25 Sep 2017 17:15:35 GMT<p>
As a user who uses the Customizer to change the layout of my homepage (or some other non-"set it and forget it option"), I'd like to be able to make changes in the Customizer, and schedule them to go live.
</p>
<p>
Depends on <a class="accepted ticket" href="https://core.trac.wordpress.org/ticket/39896" title="enhancement: Customizer: Allow users to Draft changes before Publishing (accepted)">#39896</a>, <a class="new ticket" href="https://core.trac.wordpress.org/ticket/31089" title="enhancement: Customize: Add revisions and statuses for changesets (new)">#31089</a>.
</p>
danielbachhuberhttps://core.trac.wordpress.org/ticket/28721
https://core.trac.wordpress.org/ticket/28721Report#28081: Do a canonical redirect for pages when query var 'paged' is setWed, 30 Apr 2014 19:53:12 GMTMon, 18 Sep 2017 06:35:13 GMT<p>
Example: <a class="ext-link" href="http://make.wordpress.org/core/features-as-plugins/page/2323/"><span class="icon">​</span>http://make.wordpress.org/core/features-as-plugins/page/2323/</a>
</p>
<p>
You can append /page/{any number} to a page and still get the same content as <a class="ext-link" href="http://make.wordpress.org/core/features-as-plugins/"><span class="icon">​</span>http://make.wordpress.org/core/features-as-plugins/</a>
</p>
<p>
The same doesn't happen for posts.
</p>
<p>
<a class="source" href="https://core.trac.wordpress.org/browser/trunk/src/wp-includes/canonical.php#L274">trunk/src/wp-includes/canonical.php#L274</a><a class="trac-rawlink" href="https://core.trac.wordpress.org/export/HEAD/trunk/src/wp-includes/canonical.php#L274" title="Download">​</a>: Seems like l274 and l276 should be !is_singular() as it was before <a class="changeset" href="https://core.trac.wordpress.org/changeset/6115" title="Canonical fixes: Allow Pages to have /page/x/. Always trailing slash home ...">[6115]</a>. (Block was changed in <a class="changeset" href="https://core.trac.wordpress.org/changeset/9697" title="Make Canonical feeds and paging play nice with each other and with ...">[9697]</a>.)
</p>
<p>
Want to use this ticket to get some reasons for <a class="changeset" href="https://core.trac.wordpress.org/changeset/6115" title="Canonical fixes: Allow Pages to have /page/x/. Always trailing slash home ...">[6115]</a>. Currently I only can think of custom page templates which are using a custom pagination, so maybe wontfix.
</p>
ocean90https://core.trac.wordpress.org/ticket/28081
https://core.trac.wordpress.org/ticket/28081Report#27404: Widget Customizer: Allow adding inactive widgets to widget areasThu, 13 Mar 2014 21:24:35 GMTTue, 26 Sep 2017 17:27:20 GMT<p>
Currently a user may add new widget instances to widget areas in the customizer, and they may remove these widgets to send them to the inactive widgets area (aka widget trash). However, there is currently no way to restore these inactive widgets to widget areas without leaving the customizer and going to the widgets admin page.
</p>
<p>
The widget addition panel should be extended to also list out inactive widgets.
</p>
<p>
Originally reported at <a class="ext-link" href="https://github.com/x-team/wp-widget-customizer/issues/46"><span class="icon">​</span>https://github.com/x-team/wp-widget-customizer/issues/46</a>
</p>
<p>
Related: <a class="reviewing ticket" href="https://core.trac.wordpress.org/ticket/39693" title="enhancement: Fix missing assignment of widgets on theme switch (reviewing)">#39693</a>
</p>
westonruterhttps://core.trac.wordpress.org/ticket/27404
https://core.trac.wordpress.org/ticket/27404Report#26829: Use of strpos() in extract_from_markers() and insert_with_markers() can target wrong BEGIN and END markers.Tue, 14 Jan 2014 06:16:21 GMTTue, 11 Jul 2017 00:28:35 GMT<p>
While working on a plugin, I came across the need to have two sections of <tt>BEGIN</tt> and <tt>END</tt> markers in the <tt>.htaccess</tt> file. The most important marker section is located at the end of the file with the marker <tt>"e3r"</tt>, while the second marker section is at the beginning of the file with the marker <tt>"e3r_query_redirects"</tt>. Now when I call <tt>extract_from_markers</tt> while passing <tt>"e3r"</tt> as the marker, the contents between the <tt>"e3r_query_redirects"</tt> markers are returned.
</p>
<p>
Here are steps you can take to see this issue with the function <tt>insert_with_markers()</tt>:
</p>
<ol><li>Open the <tt>.htaccess</tt> file
</li><li>Add <tt># BEGIN WordPress_Foo</tt> to the top of the file, add a couple of newlines, and add <tt># END WordPress_Foo</tt>
</li><li>Save the <tt>.htaccess</tt> file and close it
</li><li>Log into the WordPress Dashboard and navigate to <strong>Settings</strong> -&gt; <strong>Permalinks</strong>
</li><li>Press the <strong>Save Changes</strong> Button
</li><li>Reopen the <tt>.htaccess</tt> file
</li><li>Notice that the marker section originally labeled <tt>WordPress_Foo</tt> is now a duplicate <tt>WordPress</tt> marker section
</li></ol><p>
You can continue to repeat those steps to generate more duplicate <tt>WordPress</tt> marker sections.
</p>
<p>
This issue is caused by the use of the <tt>strpos()</tt> function, which looks for the position of a substring in a string. So when you have a marker section labeled <tt>WordPress_Foo</tt> above the section labeled <tt>WordPress</tt>, the <tt>WordPress_Foo</tt> section is found by <tt>strpos()</tt>, which stops the <tt>WordPress</tt> section from being found.
</p>
<p>
I already wrote a solution that has worked for me so far and I'm including a diff file with the changes. Basically, instead of using the function <tt>strpos()</tt>, which looks for the position of a substring and causes the aforementioned bug, I use the following statement: <tt>if ( "# BEGIN {$marker}" === $markerline )</tt>.
</p>
<p>
Since this is my first patch to core, I would definitely appreciate all feedback :)
</p>
<p>
Thanks,
Faison
</p>
Faisonhttps://core.trac.wordpress.org/ticket/26829
https://core.trac.wordpress.org/ticket/26829Report#25435: Introduce alternative to do_shortcode( '[shortcode]' )Sat, 28 Sep 2013 20:47:26 GMTMon, 17 Jul 2017 15:57:41 GMT<p>
There are times when we want to call a shortcode programmatically. Currently, the easiest way to do this is <tt>do_shortcode( '[shortcode]' )</tt>. But that does lots of unnecessary work. A developer has two alternatives:
</p>
<ol><li>Manually search through the source and find the function that handles the shortcode, and call it directly. The only problem is that this doesn't offer a very forward-compatible solution, especially when the shortcode is being offered by a plugin.
</li><li>Search through <tt>$shortcode_tags</tt> to find and call the function. That's more forward-compatible, but it kind of seems hacky.
</li></ol><p>
I'd like to request that we offer a core function that does number 2 rather than each developer having to implement it themselves.
</p>
<p>
Example:
</p>
<pre class="wiki">call_shortcode_func( 'shortcode', $atts, $content );
</pre><p>
(We can change the name of the function.)
</p>
<p>
Patch forthcoming.
</p>
jdgrimeshttps://core.trac.wordpress.org/ticket/25435
https://core.trac.wordpress.org/ticket/25435Report#25214: Behaviour when deleting menu items with sub-menusMon, 02 Sep 2013 11:57:53 GMTTue, 26 Sep 2017 17:14:26 GMT<p>
If you delete a menu item that has sub-menu items below it, the sub-menu items will move up a level instead of being deleted. I don't think this is desired behaviour for menus. If I delete a menu I expect it to delete all its sub-menus too.
</p>
<p>
Additionally, the "sub item" labels on sub-menus are not removed as they should be when they're moved up a level, which adds to the confusion (see attached screenshots).
</p>
johnbillionhttps://core.trac.wordpress.org/ticket/25214
https://core.trac.wordpress.org/ticket/25214Report#24579: Add Drag'n'Drop UI to plugin and theme manual uploadersFri, 14 Jun 2013 17:03:38 GMTTue, 26 Sep 2017 17:24:14 GMT<p>
We have this nice looking easy to use drag-n-drop UI for our media, is there anything stopping us from having it for our plugin and theme uploaders? I know most people use the search that goes through the .org repo, but it's foolish to think that's the only place people ever get their products. This would help facilitate a consistent user experience throughout the entire WP Admin.
</p>
<p>
Edit:
If possible, support multiple uploads too.
</p>
tw2113https://core.trac.wordpress.org/ticket/24579
https://core.trac.wordpress.org/ticket/24579Report#23328: While editing widgets in accessibility mode the position can be indicated by widget titles instead of numbersWed, 30 Jan 2013 18:32:33 GMTMon, 25 Sep 2017 17:21:24 GMT<p>
Guess it title says it all. Right now you need to figure out the position you want the widget to be at and try remember it while editing the widget.
</p>
<p>
I suggest to change the text text of the position column header from "position" to "position after" and use labels in the drop down
</p>
<p>
1 =&gt; "top"
</p>
<p>
2 =&gt; top widget title
</p>
<p>
3 =&gt; second widget title<br />
</p>
<p>
etc
</p>
mark-khttps://core.trac.wordpress.org/ticket/23328
https://core.trac.wordpress.org/ticket/23328Report#23049: Template hierarchy for 404Sat, 22 Dec 2012 17:19:05 GMTSun, 13 Aug 2017 09:19:37 GMT<p>
load 404-{post-type}.php when url structure matches post permalink structure but there is no post at that address.
</p>
<p>
load 404-{taxonomy}.php when url structure matches taxonomy permalink structure but doesn't match any specific taxonomy tag URL.
</p>
<p>
And so on....
</p>
<p>
The idea is to have different 404 pages based on the context to which the URL refers. For example if a site has a blog and a shop it might be better to show a blog specific 404 page when the URL might be interpreted as a post and a shop specific 404 page when the URL might be interpreted as a product.
</p>
mark-khttps://core.trac.wordpress.org/ticket/23049
https://core.trac.wordpress.org/ticket/23049Report#21819: Use an image size for custom headers instead of duplicating an attachmentWed, 05 Sep 2012 21:19:51 GMTThu, 21 Sep 2017 18:05:03 GMT<p>
The improvements in <a class="new ticket" href="https://core.trac.wordpress.org/ticket/21810" title="enhancement: Improve intermediate image size handling (new)">#21810</a> will allow us to use an image size for custom headers, and we definitely should — it results in fewer attachments, allows the user to recrop the header, and allows us to make intelligent decisions regarding how to treat custom headers when the theme is changed.
</p>
koopersmithhttps://core.trac.wordpress.org/ticket/21819
https://core.trac.wordpress.org/ticket/21819Report#21622: Validate or sandbox theme file edits before saving them (as is done for plugins)Fri, 17 Aug 2012 20:50:45 GMTMon, 25 Sep 2017 15:57:53 GMT<p>
While using the <a class="ext-link" href="http://www.wpzoom.com/themes/academica/"><span class="icon">​</span>academica</a> theme, I accidentally missed an ending bracket while editing functions/wpzoom-seo.php in the theme editor. This is used as part of a set of pages creating a theme options page on the dashboard. When the function went bad, it caused my entire installation to be unaccessible.
</p>
<p>
It was necesssary to ftp to fix the error, because even the dashboard was blanked out by a fatal error. Messing something up in the theme should not cut off access to the dashboard.
</p>
eschwartz93https://core.trac.wordpress.org/ticket/21622
https://core.trac.wordpress.org/ticket/21622Report#21170: JavaScript actions and filtersThu, 05 Jul 2012 21:34:03 GMTTue, 26 Sep 2017 21:06:03 GMT<p>
The concept of adding JavaScript actions and filters has been tossed around for some time. We've experimented with various configurations of actions in both the fullscreen and customizer APIs, and they've proven their utility enough to graduate them to a core feature in their own right.
</p>
<hr />
<p>
I think that a good events API should satisfy these parameters:
</p>
<ol><li><strong>Support jQuery-style dot namespacing</strong> to allow functions to be easily removed.
</li></ol><ol start="2"><li><strong>Should (likely) support priorities.</strong> While seemingly random numbers aren't fun to use, it allows plugins to cooperate without having to know of each other's existence. We can't expect plugin authors to rearrange the array of callbacks.
</li></ol><ol start="3"><li><strong>Should <em>not</em> force functions to have unique IDs.</strong> Anonymous functions are extremely common in JavaScript — forcing them to be named is contrary to the nature of the language.
</li></ol><ol start="4"><li><strong>Should be structured as a mixin.</strong> The global event loop should be an instance of the core Events object. Using a mixin will allow developers to easily create event loops for their own plugins (to prevent polluting the global namespace — think about large plugins, like bbPress). An events mixin will also enable developers to create more powerful abstractions, such as observable values, collections, and pretty much any structural JS object you can dream up.
</li></ol><ol start="5"><li><strong>Should allow the looping process to be overwritten.</strong> This will result in less code and added flexibility. The only difference between actions and filters is how they handle the callbacks object. There are other types of looping processes that could be beneficial in JS. One example would be returning false if any callback returns false, which could be used to stop a process, much like the native event.stopPropagation method.
</li></ol><hr />
<p>
<strong>Why not use custom jQuery events?</strong>
</p>
<p>
Custom jQuery events are great when we need to trigger actions on a DOM element. Triggering plain events on the body element (or any other hidden element) is not performant — every jQuery event normalizes an DOM Event object, which we then completely ignore.
</p>
<p>
<strong>Should we require jQuery to use the API?</strong>
</p>
<p>
I'm not sure. jQuery.Callbacks may be a helpful solution here, provided we can properly integrate priorities and namespacing. jQuery.Callbacks also only requires jQuery.each and jQuery.extend, so writing a shim that doesn't use the rest of jQuery would not be exceptionally difficult. Either way, switching between one and the other as we develop should not be exceptionally difficult.
</p>
koopersmithhttps://core.trac.wordpress.org/ticket/21170
https://core.trac.wordpress.org/ticket/21170Report#20383: Strip trailing punctuation with canonical URLsSat, 07 Apr 2012 03:59:49 GMTMon, 17 Jul 2017 16:02:57 GMT<p>
A follow-up to <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/7537" title="enhancement: Strip trailing spaces with canonical URLs (closed: fixed)">#7537</a> where we removed %20 and " " from the end of URLs, we should try to remove all sorts of punctuation from the end of a URL, both URL-encoded and decoded.
</p>
<p>
Example bad URLs we should surely be able to resolve:
</p>
<p>
<a class="ext-link" href="http://ma.tt/2012/03/productivity-per-square-inch/%7B"><span class="icon">​</span>http://ma.tt/2012/03/productivity-per-square-inch/%7B</a>
</p>
<p>
<a class="ext-link" href="http://ma.tt/2012/03/productivity-per-square-inch/"><span class="icon">​</span>http://ma.tt/2012/03/productivity-per-square-inch/</a>)
</p>
<p>
<a class="ext-link" href="http://ma.tt/2012/03/productivity-per-square-inch/"><span class="icon">​</span>http://ma.tt/2012/03/productivity-per-square-inch/</a>,
</p>
<p>
<a class="ext-link" href="http://ma.tt/2012/03/productivity-per-square-inch/"><span class="icon">​</span>http://ma.tt/2012/03/productivity-per-square-inch/</a>!
</p>
<p>
More difficult when there is no trailing slash in the permalink structure (or the link requested, regardless of permalink structure), but if is_404() is taken into account, it should be doable to trail various pieces of punctuation and see if we can get things to resolve.
</p>
nacinhttps://core.trac.wordpress.org/ticket/20383
https://core.trac.wordpress.org/ticket/20383Report#18449: List Table Factory Needs to be PluggableTue, 16 Aug 2011 19:51:33 GMTMon, 04 Sep 2017 01:12:30 GMT<p>
Better design planning should have been considered for <a class="ext-link" href="http://core.trac.wordpress.org/browser/trunk/wp-admin/includes/list-table.php"><span class="icon">​</span>http://core.trac.wordpress.org/browser/trunk/wp-admin/includes/list-table.php</a>
</p>
<p>
function _get_list_table() is identical to an object factory pattern, which would make more sense as a static member of WP_List_Table. In other words...
</p>
<pre class="wiki">$wp_list_table = _get_list_table('WP_Terms_List_Table');
</pre><p>
... which looks simple, is actually confusing because it would be more intuitive if written as ...
</p>
<pre class="wiki">$wp_list_table = WP_List_Table::factory('Terms');
</pre><p>
Further, the factory hasn't offered any extensibility. Locking edit-tags.php against WP_Terms_List_Table makes it unusable for custom taxonomies that need a custom UI. Despite all of the great API improvements for taxonomies, this case still necessitates duplicating the entire category editing UI within a plugin just to tweak a table column or a link path.
</p>
<p>
Please adjust the ticket Type and Component as necessary. It could be a taxonomy design flaw or an administration enhancement, depending how you look at it.
</p>
miqrogroovehttps://core.trac.wordpress.org/ticket/18449
https://core.trac.wordpress.org/ticket/18449Report#17133: Code Editor: Register ctrl + s event for plugin/theme editorThu, 14 Apr 2011 12:20:34 GMTTue, 26 Sep 2017 17:17:15 GMT<p>
Often when modifying code or writing a post using the wordpress editor I instinctively hit ctrl + s to save it. Up pops the save website dialog which I then have to close. In Gmail when I hit ctrl+ s it saves the email to drafts. I think a similar thing would be useful for wordpress.
</p>
jcnetsyshttps://core.trac.wordpress.org/ticket/17133
https://core.trac.wordpress.org/ticket/17133Report#16886: Adding readonly function to wp-includes/general-template.phpFri, 18 Mar 2011 16:00:34 GMTThu, 24 Aug 2017 23:30:16 GMT<p>
A quite simple improvement, really.
</p>
<p>
Just like the <em>checked</em>, <em>selected</em> and <em>disabled</em> function, <em>readonly</em> would be a shortcut to <em><span class="underline">checked_selected_helper</span></em><span class="underline">.
</span></p>
<p>
I was doing a theme option page and realized that disabling fields removes the data from the data submission.
</p>
<p>
I have a bunch of fields that gets used (or not) in the theme, depending on a on/off switch. At first, depending on the switch, I was disabling the fields, but all the data is removed on submit if the switch is at off. Meaning that the user would have to reenter every fields if he wants to activate the functionality.
</p>
<p>
Putting the fields on readonly gives a nice feedback to the user that those fields are not use, depending on the switch, AND the data is kept if the user changes his mind.
</p>
<p>
So, here's the patch.
</p>
<pre class="wiki">/**
* Outputs the html readonly attribute.
*
* Compares the first two arguments and if identical marks as readonly
*
* @since 3.1.#
*
* @param mixed $disabled One of the values to compare
* @param mixed $current (true) The other value to compare if not just true
* @param bool $echo Whether to echo or just return the string
* @return string html attribute or empty string
*/
function readonly( $readonly, $current = true, $echo = true ) {
return __checked_selected_helper( $readonly, $current, $echo, 'readonly' );
}
</pre>kakidcmhttps://core.trac.wordpress.org/ticket/16886
https://core.trac.wordpress.org/ticket/16886Report#16483: Visibility: password-protected exposes multiple pagesMon, 07 Feb 2011 19:02:15 GMTTue, 13 Jun 2017 18:04:36 GMT<ol><li>password protect a page ('protected') with a password
</li><li>password protect another page ('thistoo') with the SAME password
</li><li>visit 'protected' and enter the password. Page is visible
</li><li>visit 'thistoo'; expected: prompt for password. What happens: Page is visible
</li></ol><p>
Regardless of whether someone with a password has the right to try it in as many pages as they want (and would therefore successfully see the page if the passwords were the same), the user should still be prompted on a page-by-page basis. Global authentication to multiple pages is possible with user accounts and roles. It should not be possible with visibility: password-protected pages.
</p>
monkeyhousehttps://core.trac.wordpress.org/ticket/16483
https://core.trac.wordpress.org/ticket/16483Report#15448: wp_mail() sets Content-Type header twice for multipart emailsWed, 17 Nov 2010 12:15:04 GMTMon, 17 Jul 2017 15:53:58 GMT<p>
When trying to send emails via <tt>wp_mail()</tt> with a Content-Type of multipart/alternative, the Content-Type header will be set with <tt>$phpmailer-&gt;ContentType</tt>, and again with <tt>$phpmailer-&gt;AddCustomHeader()</tt>, which causes two Content-Type headers in the email:
</p>
<pre class="wiki">Content-Type: multipart/alternative;
boundary="example_boundary"
Content-Type: multipart/alternative; charset=""
</pre><p>
This appears to cause errors in Outlook, as there is no boundary on the latter.
</p>
<p>
The cause of this is <tt>PHPMailer::GetMailMIME()</tt>, as it does not know that the email is a multipart email. The easiest way to achieve this appears to be to simply allow the user to set the AltBody via <tt>wp_mail()</tt>. In order to achieve backwards compatibility, <tt>wp_mail()</tt> should work out which part is the text/plain one and which is the text/html one based on the boundary.
</p>
<p>
I'll be working on a patch for this.
</p>
rmccuehttps://core.trac.wordpress.org/ticket/15448
https://core.trac.wordpress.org/ticket/15448Report#14060: Misleading "You do not have sufficient permissions to access this page."Wed, 23 Jun 2010 14:46:16 GMTFri, 22 Sep 2017 10:17:08 GMT<p>
When accessing a page of a plugin in the admin that does not exists any longer, you're told by an error message, that:
</p>
<blockquote class="citation">
<p>
You do not have sufficient permissions to access this page.
</p>
</blockquote>
<p>
This message is a little misleading, because there is no such page.
</p>
<p>
A message that better reflects the decision to display it would be less misleading, e.g.:
</p>
<blockquote class="citation">
<p>
The requested page is not accessible.
</p>
</blockquote>
hakrehttps://core.trac.wordpress.org/ticket/14060
https://core.trac.wordpress.org/ticket/14060Report#13910: Get Menu name with wp_nav_menu()Tue, 15 Jun 2010 19:17:20 GMTMon, 17 Jul 2017 16:06:14 GMT<p>
There is no way to get the actual "Menu name" in wp_nav_menu()
</p>
<p>
For example if you want to create a left sidebar menu you want a header to go with it. In previous versions you could do use wp_list_pages() with "title_li".
</p>
<p>
With wp_nav_menu() you have to hard code &lt;h3&gt;Static menu name&lt;/h3&gt; into the template before calling the function.
</p>
<p>
If you could get the "Menu name" as defined in backend interface from the wp_nav_menu() it would create the menu title automatically.
</p>
jowohttps://core.trac.wordpress.org/ticket/13910
https://core.trac.wordpress.org/ticket/13910Report#9757: Allow Plugin/Theme updates from a uploaded .zip file.Fri, 08 May 2009 00:17:07 GMTWed, 20 Sep 2017 22:14:46 GMT<p>
Plugin administration lacks of an update possibility by uploading zip files. This feature is only half-done in 2.7, you can only upload plugins as zip to install them, not to update them.
</p>
<p>
Zip file uploads should be treated the same as the other install/update possibilities like remote.
</p>
<p>
<a class="closed ticket" href="https://core.trac.wordpress.org/ticket/9708" title="defect (bug): Multiple plugins in the single folder can cause unexpected situations with ... (closed: wontfix)">#9708</a> provides a testcase that can be used to test such am update by zip.
</p>
<p>
currently a over-upload in the install page does throw an error that the directory already exists:
</p>
<pre class="wiki">Installing Plugin from uploaded file: 9708-plugin-testcase-9708-plugin-a-v-0.2.zip
Unpacking the package.
Installing the plugin.
Destination folder already exists. [...]worpress-trunk/wp-content/plugins/9708-plugin-testcase/
Plugin Install Failed.
</pre>hakrehttps://core.trac.wordpress.org/ticket/9757
https://core.trac.wordpress.org/ticket/9757Report#6531: Recursively search for files in theme and plugin editorsTue, 01 Apr 2008 19:44:11 GMTTue, 26 Sep 2017 19:39:49 GMT<p>
Themes (like Subtle: <a class="ext-link" href="http://gluedideas.com/downloads/subtle/"><span class="icon">​</span>http://gluedideas.com/downloads/subtle/</a>) might contain numerous CSS files. The theme editor, however, does not recognize any other CSS files other than <em>style.css</em>.
</p>
<p>
The files might be located some levels deeper in sub directories like '/wp-content/themes/glued-ideas-subtle-01/assets/css/print.css'.
</p>
torbenshttps://core.trac.wordpress.org/ticket/6531
https://core.trac.wordpress.org/ticket/6531Report#4575: Add functions to return the last-modified timestamp of a category/tagMon, 02 Jul 2007 12:36:26 GMTThu, 21 Sep 2017 20:40:50 GMT<p>
Hi,
</p>
<p>
All categories Last-Modified dates are the same, and thats a one big rss file i guess.
Is there a chance to send individual Last-Modified dates to these feed ?
</p>
<p>
Thanks
</p>
delusionshttps://core.trac.wordpress.org/ticket/4575
https://core.trac.wordpress.org/ticket/4575Report#2833: wpautop breaks style and script tagsSat, 17 Jun 2006 20:36:00 GMTWed, 12 Jul 2017 03:34:55 GMT<p>
When I create a post in which I want to include Javascript or some styles, WordPress 'breaks'when showing those posts, because all newlines in the SCRIPT and STYLE tag are converted into BR tags.
</p>
<p>
Example:
</p>
<pre class="wiki">&lt;style type="text/css&gt;
.matt { color: #FFFFFF; }
&lt;/style&gt;
</pre><p>
Becomes:
</p>
<pre class="wiki">&lt;style type="text/css&gt;&lt;br /&gt;
.matt { color: #FFFFFF; }&lt;br /&gt;
&lt;/style&gt;&lt;br /&gt;
</pre><p>
And:
</p>
<pre class="wiki">&lt;script type="text/javascript"&gt;&lt;!--
google_ad_client = "xxxxxxxx";
google_ad_width = 120;
google_ad_height = 60;
google_ad_format = "120x60_as_rimg";
google_cpa_choice = "CAAQ2eOZzgEaCD4zuVkdzt_CKI-293M";
//--&gt;&lt;/script&gt;
</pre><p>
Becomes
</p>
<pre class="wiki">&lt;script type="text/javascript"&gt;&lt;!--&lt;br /&gt;
google_ad_client = "xxxxxxxx";&lt;br /&gt;
google_ad_width = 120;&lt;br /&gt;
google_ad_height = 60;&lt;br /&gt;
google_ad_format = "120x60_as_rimg";&lt;br /&gt;
google_cpa_choice = "CAAQ2eOZzgEaCD4zuVkdzt_CKI-293M";&lt;br /&gt;
//--&gt;&lt;/script&gt;&lt;br /&gt;
</pre><p>
This happens because wpautop adds those BR tags to the post. (As it should, just not within STYLE or SCRIPT tags.)
</p>
<p>
I've made a (temporary?) workaround for this by creating a pre and post event for wpautop, which substitute the necessary newlines by a temporary value in the pre event and placing them back in the post event. Although I think this should be incorporated in wpautop itself.
</p>
<p>
See also: <a class="ext-link" href="http://wordpress.org/support/topic/76433"><span class="icon">​</span>http://wordpress.org/support/topic/76433</a> and <a class="ext-link" href="http://wordpress.org/support/topic/76297"><span class="icon">​</span>http://wordpress.org/support/topic/76297</a>
</p>
<p>
While searching trac I also found ticket <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/2346" title="defect (bug): wordpress editor adds &lt;br /&gt; after each line, breaking adsense code (and ... (closed: fixed)">#2346</a>, which is about the same problem, but which was for 2.0 and self-closed by the submitter?
</p>
<p>
P.S. I have TinyMCE turned of.
</p>
Nazgulhttps://core.trac.wordpress.org/ticket/2833
https://core.trac.wordpress.org/ticket/2833Report#2691: HTML comments in posts aren't handled properly.Tue, 25 Apr 2006 03:16:37 GMTWed, 12 Jul 2017 12:59:27 GMT<p>
When an HTML comment is added in a post, autop adds paragraph ( &lt;p&gt; ) tags around the comment and for multi-line comments line breaks ( &lt;br /&gt; ) are added after every line. This should not happen in HTML comments.
</p>
<p>
This ticket is similar to <a class="closed ticket" href="https://core.trac.wordpress.org/ticket/712" title="defect (bug): HTML Comments in posts are mangled (closed: wontfix)">#712</a> which was closed with wontfix. I would like to know why this isn't seen as an issue? It prevents the addition of RDF and other metadata, not to mention just plain old HTML comments in posts.
</p>
gordhttps://core.trac.wordpress.org/ticket/2691
https://core.trac.wordpress.org/ticket/2691Report