voceconnect / multi-post-thumbnails

Adds multiple post thumbnails to a post type. If you've ever wanted more than one Featured Image on a post, this plugin is for you.
143 stars 63 forks source link

Moved all setPostThumbnailL10n string calls to wp.i18n calls to match… #148

Closed szczys closed 4 months ago

szczys commented 4 years ago

This works but it needs to be reviewed by the plugin author as I do not have any deep knowledge of the changes made. As mentioned in #146 it looks like Wordpress changed the method of accessing strings that was used by this plugin. I took what Wordpress core used for these messages in set-post-thumbnail.js and used them in the plugin.

… what's found in WordPress 5.5. core updates:

https://github.com/WordPress/WordPress/commit/4377e9a44e2c10ac66cb9cc49a4a3c8dff6a433f#diff-4bfa11da57ff2600004bb500368247f4

aliciaduffy commented 4 years ago

This fixed the plugin for us in WordPress 5.5

oliverands commented 4 years ago

I've installed this version, and unfortunately it didn't resolve the issue for us in WordPress 5.5. Still not able to assign a second thumbnail to posts.

ricdva commented 4 years ago

This appears to be working correctly for me. I manually edited the multi-post-thumbnails-admin.js with these changes, just had to make sure the local browser cache was cleared and the new JS file was loading.

oliverands commented 4 years ago

Ah, that was it! Needed to clear the cache. It's working fine now. Thank you.

undermeadow commented 4 years ago

Just joined to thank for this solution and for the cache fix, ended up working perfectly and solved a huge issue for us.

twentyfortysix commented 4 years ago

Works for me too

kasparsd commented 4 years ago

Fixes #146 similar to #147.

kasparsd commented 4 years ago

The only potential issue with this is that the new helper methods are not available in older versions of WP. Ideally, we could add a dedicated helper method that picks the right method for printing strings.

szczys commented 4 months ago

Closing this as outdated.