Skip to content

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

Closed
szczys wants to merge 1 commit intovoceconnect:masterfrom
szczys:master
Closed

Moved all setPostThumbnailL10n string calls to wp.i18n calls to match…#148
szczys wants to merge 1 commit intovoceconnect:masterfrom
szczys:master

Conversation

@szczys
Copy link
Copy Markdown

@szczys szczys commented Aug 13, 2020

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:

WordPress/WordPress@4377e9a#diff-4bfa11da57ff2600004bb500368247f4

@aliciaduffy
Copy link
Copy Markdown

This fixed the plugin for us in WordPress 5.5

@oliverands
Copy link
Copy Markdown

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
Copy link
Copy Markdown

ricdva commented Aug 19, 2020

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
Copy link
Copy Markdown

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

@undermeadow
Copy link
Copy Markdown

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

@twentyfortysix
Copy link
Copy Markdown

Works for me too

@kasparsd
Copy link
Copy Markdown

Fixes #146 similar to #147.

@kasparsd
Copy link
Copy Markdown

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
Copy link
Copy Markdown
Author

szczys commented May 21, 2024

Closing this as outdated.

@szczys szczys closed this May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants