Placeholders aren't helpful and it's much easier to make a mistake if you're dealing with placeholders.
Introduced in [31388].
props pento.
fixes#26553.
git-svn-id: https://develop.svn.wordpress.org/trunk@31821 602fd350-edb4-49c9-b593-d223f7449a82
Both methods are using *nlist() which returns a list of files in a given directory or the file itself for a given file. If the result was an empty list we assumed that the file doesn't exists. This includes also cases where $file is actually an empty directory. To prevent this we now check if $file is a directory before returning the result of an empty list.
Other filesystem methods are using `file_exists()` which already checks whether a file or directory exists.
fixes#30815.
git-svn-id: https://develop.svn.wordpress.org/trunk@31815 602fd350-edb4-49c9-b593-d223f7449a82
This is a restoration of [31749] which was reverted in [31755].
It includes a number of enhancements from the original version. Namely:
* Not doing a credential check in src/wp-includes/script-loader.php
* Add new function `wp_print_request_filesystem_credentials_modal`
* update the version number in the list table when a plugin is updated
UI still needs further work, but this basic version should enable more testing
Props ericlewis, jorbin
See #31528
git-svn-id: https://develop.svn.wordpress.org/trunk@31811 602fd350-edb4-49c9-b593-d223f7449a82
- Strip slashes while running side_load_images(), add slashes after.
- Simplify and clean up side_load_images().
- Add another arg to media_sideload_image() to return the uploaded image src only, and fix it to always return WP_Error on errors.
Fixes#31660.
git-svn-id: https://develop.svn.wordpress.org/trunk@31799 602fd350-edb4-49c9-b593-d223f7449a82
- Test image sizes from JS after Press This loads, before adding them to "Suggested media".
- Clean up and simplify the HTML and JS a bit.
Fixes#31561.
git-svn-id: https://develop.svn.wordpress.org/trunk@31797 602fd350-edb4-49c9-b593-d223f7449a82
Core style dictates that the default arguments should be documented in the same function or method where they are defined.
See [31793].
Fixes#24826.
git-svn-id: https://develop.svn.wordpress.org/trunk@31795 602fd350-edb4-49c9-b593-d223f7449a82
* Introduce a `__construct()` method, which can accept an array of query vars.
* Move query logic out of `query()` method and into a new `get_comments()` method.
* Ensure that `$this->comments` is set whenever `get_comments()` returns a value.
* Introduce a `parse_query()` method, where query vars are parsed with default values and the 'parse_comment_query' action is fired.
These changes bring `WP_Comment_Query` syntax closer to that of `WP_Query`.
Props westonruter, morganestes, boonebgorges.
Fixes#24826.
git-svn-id: https://develop.svn.wordpress.org/trunk@31793 602fd350-edb4-49c9-b593-d223f7449a82
`wp_insert_term()` protects against the creation of terms with duplicate names
at the same level of a taxonomy hierarchy. However, it's historically been
possible to override this protection by explicitly providing a value of `$slug`
that is unique at the hierarchy tier. This ability was broken in [31734], and
the current changeset restores the original behavior.
A number of unit tests are added and refactored in support of these changes.
See #17689 for discussion of a fix that was superceded by [31734]. This commit
retains the fix for the underlying bug described in that ticket.
See #31328.
git-svn-id: https://develop.svn.wordpress.org/trunk@31792 602fd350-edb4-49c9-b593-d223f7449a82
- Add the styling for the replacement images to the admin CSS.
- Revert to using `.emoji` as replacement image class.
- When pasting in the editor, convert emoji images to our format so we can replace them with chars on saving.
- Some more clean up of both the plugin and wp-emoji.js.
See #31242.
git-svn-id: https://develop.svn.wordpress.org/trunk@31786 602fd350-edb4-49c9-b593-d223f7449a82
Another fun fact is that `mysql_get_client_version()` doesn't exist, but `mysql_get_client_info()` (along with `mysqli_get_client_info()') do. So, we're switching to them, in order to add a pleasing symmetry to the client version check.
Fixes#31644
git-svn-id: https://develop.svn.wordpress.org/trunk@31783 602fd350-edb4-49c9-b593-d223f7449a82