aaylasecura
Forum Replies Created
-
Thank you for the reply! Do you have any estimated release date for the membership plugin?
Just to add, perhaps the misunderstanding is coming from the fact that if I detach ALL the instances of the synced on the page, then indeed they do get different IDs. But my issue comes from wanting to have a synced pattern on the page and have a detached copy of it that is then modified on the same page. Not sure if this is just a shortcoming of WordPress that the IDs seem to always be linked.
Hi there, sure, I just made a video: https://youtu.be/YocM393DVEE
Forum: Plugins
In reply to: [Core Framework] Any way to inject our own classes programatically?Hi and thank you for replying. I’m developing a plugin for adding custom CSS based on user interactions and other triggers, and I would like to integrate this with CoreFramework and its search and auto-completion of classes inside a block editor.
For example, one of the things that my plugin (when CoreFramework integration is enabled in settings) will do, is get the list of classes from
CoreFramework\Helper
and for each one create a “responsive variation” in the form of, e.g.on-max-tablet--<class>
so that if this class name (or corresponding data attribute) is applied to the element, the<class>
will be added to the element when the device width hits a “tablet” breakpoint. And many similar interaction-triggers. I would like these, and other class names, that my plugin supports to be searchable and insertable via CoreFramework’s block editor integration (of course if the user enables this in settings).I’m sorry, I’m confused… I’m saying I did detach the pattern, and then duplicated it (the detached container), and it still didn’t generate a new ID. Am I misunderstanding you? Did you try my steps above and confirm that it generated a new ID for you?
Hi there and thank you for replying. However this is not what I’m seeing. I just tested this on a new clean WordPress install with just Greenshift, even with refreshing the page at each step:
- Create a new page
- Insert a Container block and set size and background color for it
- Save and refresh the page
- Save the container as a synced pattern
- Save and refresh the page
- Duplicate the synced patter or reinsert it again
- Detach the clone
- Save and refresh the page
- Duplicate the detached clone
- Save and refresh the page
- Change the background color for the detached clone
- Save and refresh the page
- The detached and later duplicated clone still has the same ID as the original synced pattern and its new background color applies to both blocks
There’s no way to force it to regenerate its ID once it’s been saved as a synced copy. This only happens if it has been saved as a synced copy; otherwise, as you say, it will regenerate its ID when it’s duplicated and page is refreshed and resaved
Thank you for replying, I’ve emailed the details above to the given address.
Thank you!
Aah, good point, I did some testing with the top suspects from among my plugins, which are Greenshift, JetEngine and Folders and I figured out after some testing that the Folders plugin adds the ‘ver’ parameter if the file had been replaced (Folders supports the media replacement feature), but it only happens if I insert the image on the post/page after it had been replaced, and furthermore it doesn’t happen for the built-in Image block by Gutenberg (only for Greenshift and JetEngine, and I suspect other third party plugins). It adds the ‘ver’ parameter inside the ‘wp_prepare_attachment_for_js’ filter.
So if it is not possible for WP-Optimize to support this and server webp version in case of URL parameters, I will dynamically remove the filter that Folders attaches to ‘wp_prepare_attachment_for_js’ cause that’s all it does: add the ‘ver’ parameter.
Thank you for replying! I couldn’t figure out why some images are rendered with a version parameter and some not. They are all inserted with the same type of block and I just reselected the image so as to make sure it’s the latest one. But still: one image has the ver parameter and the other does not. Do you know what’s causing this?
Also, is it possible for WP-Optimize to serve webp versions even when there is versioning in the URL?
Hi and thank you for replying. Please see my original reply above for instructions on how to login in order to bypass the under construction screen. Quoting here:
The website I’m working on is in its very early stages so it’s not publicly available, but I can provide temporary subscriber user login so you can bypass the “under construction” screen. (replace “[.]” with “.” in the links obviously)
Here is the site: staging30[.]dev[.]meditateinwellington[.]org
The low-privileged login details are here (link expires tomorrow): send[.]bitwarden[.]com/#c5MwuL0NYUKuXLGFAN6Afw/Zmtd0jVGv5GGqCdBpduw4w
On the home page, the image under “Our Founder” is loaded as webp, but the top banner (homepage.jpg) as well as the image under “Our Resident Teacher” are not loaded as webp.
Sorry, it wasn’t obvious: here is the site: staging30.dev.meditateinwellington.org
Thank you for replying. The website I’m working on is in its very early stages so it’s not publicly available, but I can provide temporary subscriber user login so you can bypass the “under construction” screen. (replace “[.]” with “.” in the links obviously)
Here is the site: staging30[.]dev[.]meditateinwellington[.]org
The low-privileged login details are here (link expires in 2 days): send[.]bitwarden[.]com/#c5MwuL0NYUKuXLGFAN6Afw/Zmtd0jVGv5GGqCdBpduw4w
On the home page, the image under “Our Founder” is loaded as webp, but the top banner (homepage.jpg) as well as the image under “Our Resident Teacher” are not loaded as webp.
The same issue happens with simple element blocks like a DIV container, even though they don’t have an element ID set; rather the block’s CSS is set as
[data-style-id=gsbp-3df3e6b]{ ... }
and that id is not regenerated for a block when it’s detached from a synced pattern. And even though the CSS for these is in fact a scoped style, it’s inserted in the parent element, so it applies also to siblings of the element. So I create a DIV container, save it as a synced pattern, duplicate it, detach the copy, apply color red to the detached copy and the result on the page is this:<div class="entry-content wp-block-post-content has-global-padding is-layout-constrained wp-block-post-content-is-layout-constrained"><style scoped="">[data-style-id=gsbp-3df3e6b]{color:red;}</style> <div data-style-id="gsbp-3df3e6b"></div> <!-- this is a synced pattern with no style --> <div data-style-id="gsbp-3df3e6b"></div> <!-- this is the same synced pattern but has been detached and has had color: red applied to it--> </div>
Both have the same ID and the style applied to the detached on is scoped to the parent that contains both block, so applies to both.
Thank you for explaining ?? Perhaps I was trying to remove it the wrong way, that’s all good.