Forum Replies Created
-
AuthorPosts
-
P.
ParticipantSwitching to Shortcode block for embedding shortcodes instead of using Custom HTML block didn't fix the issue. Disabling wptexturize() function is still needed in my case.
P.
ParticipantOne more remark: I embed MB shortcodes in the Custom HTML block, not the Shortcode block, because I noticed that the latter one often broke my layout. I guess those two blocks handle wptexturize() function not the same way.
P.
ParticipantHi,
I have also had problems with WYSIWYG Editor’s content, check this, maybe will be helpful.P.
ParticipantOkay I found the reason why this happens: WP's wptexturize() function.
Disabling it withadd_filter( 'run_wptexturize', '__return_false' );fixes the issue.Probably a better solution would be to use no_texturize_tags filter to have better control over which tags should not go through wptexturize().
I don't remember this happening before, I've only noticed this recently.
P.
ParticipantI did that but nothing has changed. Every time I submit a form, additional quotation marks are added to the html code.
I made another test: I put this into the frontend visual editor:
"there"
(note typewriter quotation marks)
Upon saving the form, typewriter quotation marks were replaced with typographic ones:
”there”
However, when I edit the post in the WP backend, I see the classic editor block, with "there" (typewriter quotation marks).
So something interferes with the content in the frontend? Might that be any missing/present php module? I tested the issue with php 7.4.33 and 8.2.4.
P.
ParticipantAdding up to the above thread:
2. the "x" in the file name was replaced by multiplication symbol, while the actual file name has a regular "x" letter; check Screen 2 (marked in blue).
Inspecting the image with a browser's dev tools shows that the WYSIWYG Editor tries to display an image with the following name:
8c8d84253f9d31f33210869c6184ecc3-150%C3%97150.jpg
So, multiplication symbol is replaced with a code, which obviously points to a nonexistent file.
P.
ParticipantHi,
First, try to modify WP_Query arguments with rwmb_frontend_dashboard_query_args (check docs); e.g., adding this would let the moderator see all posts:
$args['author'] = 0;
You will have to use conditions within above-mentioned filter to allow only selected users/roles see all posts in a dashboard.
Next, not sure what you mean by "moderation", is it to hide/publish the post? If so, I use custom field group with radio buttons having options corresponding with post status, e.g., "publish", "draft". The field group is then assigned to a post type. Upon submitting the form, you might fire wp_update_post to update post status according to the option selected in the form's field group with rwmb_after_save_post action (see docs).
P.
ParticipantHi,
To make it more precise, I am validating front end form with php, so I userwmb_frontend_validate.If the validation fails, the form clears (new submissions) or restores to original post (existing submissions). As I understand, this can be overcome by using remote validation? I didn't try it yet as the other thread you recall concerned WP back end, but will check it for the front end forms so.
March 11, 2023 at 6:50 PM in reply to: ✅Populate Select Advanced Field With Data From WP_Query #40956P.
ParticipantHi Peter,
I missed one crucial part: I forgot that the php hook have to actually ECHO the data that is to be used by JavaScript... Now the link you provided makes sense.
Thank you!
P.
ParticipantThank you, will check it further.
P.
ParticipantHi Peter,
Yes, I'd like to validate the field on the server side, but while submitting/editing the form in the WP admin, not from the frontend (on the frontend I can use the rwmb_frontend_validate, which doesn't work while in the admin).
P.
ParticipantOkay, thanks!
P.
Participant+1, this would be very handy.
P.
ParticipantDitto. Any plans to fix it?
P.
ParticipantI'm new to Meta Box and only started exploring its features. From my experience, managing posts/translations through the frontend in multilanguage websites is tough.
I am moving to Meta Box from Toolset where I create translations on the frontend the following way: After a new post has been created, a link "Add Translation" shows up above the post title, which redirects an author/editor to an empty form (it only asks for confirmation before creating translation) which, upon submission, results in adding a translation of the original post with a draft status (specific hooks are added that fires on the form submission). The draft may be then edited and published. Users have links available above original/translated post title allowing them to edit and remove the post. This is very simple approach, but it fits the bill.
Alternatively, if I have to stick to the backend (normally I prefer to keep authors/editors off the backend), would you recommend a compatible with MB solution that could help me to organize access to the backed parts for non-admins? Like switching off menus, options, etc. Maybe that's eventually simpler than creating the whole workflow for managing posts and their translations on the frontend.
Thanks.
-
AuthorPosts