onOffice-Web-Org / oo-wp-plugin

onOffice for WP-Websites
https://wp-plugin.onoffice.com
GNU General Public License v3.0
9 stars 9 forks source link

#72651 Show pages with ACF where shortcodes are used #251

Closed jmaas-onoffice closed 2 years ago

jmaas-onoffice commented 2 years ago

Current state

When using the plugin Advanced Custom Fields (ACF), the shortcodes used are not recognized and the estate list table does not correctly show where a list is used. This feature was introduced in P#56183.

grafik

This is because ACF stores the contents in post meta fields where the WordPress functions do not detect shortcodes. A fix for detecting the shortcode for the detail view in ACF is in P#65189.

Desired state

In the estate list overview, the "Pages using the shortcode" should also show up when the shortcode is used in ACF or other page builders that store content in post meta fields.

Notes

It might be useful to do it together with #243.

LongTrong-exe commented 2 years ago

@jmaas-onoffice "Pages using the shortcode" will show the pages containing ACF in "page" (1.) or show the page "field group" of the ACF in "Custom Fields" (2.)?

1. image

2. image

LongTrong-exe commented 2 years ago

I think (1.) would be better

LongTrong-exe commented 2 years ago

Now I'm seeing "Page use shortcode" showing the ACF fields in the ACF field group, not the WP pages containing the ACF (1.). And quite a few errors appear.

image image

jmaas-onoffice commented 2 years ago

The motivation is this: Sometimes when we log into customer's WordPress, we want to see where a certain list is used, but we don't want to go through all the pages that they have. So that's why the "Pages using the shortcode" column is valuable to us, because then we can go directly to the pages where the list is used.

So we are not interested in the field group, we only want to see the pages where the shortcode is used. Field groups are not interesting to our plugin's users.

Does this help clarify? :)

LongTrong-exe commented 2 years ago

If the user adds different shortcode in custom fields in the one page, which one do we get? Example: shortcode of form, estate, address in the one page

I think it will show up on all lists or forms where the shortcode is added

jmaas-onoffice commented 2 years ago

Exactly, the overviews for each of them should show that they are used on that page. So if you use a form and the detail view, that page is the detail page and the form should show that it is used on that page.

In the frontend, the shortcode is basically replaced by the template.