The DOM traversal of the plugins list table was less than ideal. By switching to data attributes, we can better target the DOM elements we want to update.
Props ericlewis
Fixes#31621
git-svn-id: https://develop.svn.wordpress.org/trunk@31831 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
- 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
Since [31172], it caused the comment's `user_id` field to be unexpectedly changed to the user who edits the comment.
fixes#30307.
git-svn-id: https://develop.svn.wordpress.org/trunk@31776 602fd350-edb4-49c9-b593-d223f7449a82
This is a first pass at requesting FTP and SSH credentials when needed during shiny updates. Styling and some UX improvements are still needed, but we do show the prompt and use the passed data when doing plugin installs and updates for shiny updates. There are also a couple of areas that we could improve code wise such how we create the requestFilesystemCredentials part of the localized _wpUpdatesSettings. Over the past half century, we've split the atom, we've spliced the gene and we've roamed Tranquility Base. We've reached for the stars and never have we been closer to having them in our grasp. That has nothing to do with shiny updates.
Props ericlewis, jorbin, and drewapicture for testing
Fixes#31528
git-svn-id: https://develop.svn.wordpress.org/trunk@31749 602fd350-edb4-49c9-b593-d223f7449a82
It was like this before 3.6 and got a bit lost during that development cycle. Also uses the terminology more consistently in the nav menu UI.
props tyxla.
fixes#31344.
git-svn-id: https://develop.svn.wordpress.org/trunk@31748 602fd350-edb4-49c9-b593-d223f7449a82
- Abstract the code for creating floating toolbars.
- Introduce `editor.wp` namespace to hold exported methods from our plugins.
- Create the wpView toolbar(s) with the new method. This makes them work the same as the image toolbar: shortcuts, esc key, etc.
Props iseulde. See #30619.
git-svn-id: https://develop.svn.wordpress.org/trunk@31725 602fd350-edb4-49c9-b593-d223f7449a82