Unanswered Questions
852 questions with no answers
2
votes
0
answers
332
views
@wordpress/hooks use to add actions/filters within multiple plugin
I am trying to use @wordpress/hooks package in one of my react based plugin. I have added some hooks(filters/actions) and I need to hook into these from different plugin.
I am able to add filter for ...
2
votes
0
answers
928
views
Block editor: How to check if block editor has initialized and populated the data store?
Within some JavaScript I have to get the current post content of Gutenberg. I am accessing this from jQuery (might be bad practice, however):
$(document).ready(function() {
const { select }...
2
votes
0
answers
636
views
Gutenberg List Extension Block
I'm trying to extend the default Gutenberg unordered list that renders like this;
<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
To something like this when ...
2
votes
0
answers
175
views
Extending wp JavaScript base class to make a post request to a custom REST endpoint
I've defined a REST endpoint /my-plugin/v1/post-read to show whether a post has been read or not, per-user. In PHP, my plugin keeps track of this depending on page views while logged in.
I'm now ...
2
votes
0
answers
143
views
How to check if customize previewer is refreshing?
I am trying to send data from customize control to customize previewer. The scripts work fine until the customize previewer is refresh. The problem is only the previewer is refresh, the customize ...
2
votes
0
answers
3k
views
How to use wp_trash_post (or wp_delete_post) for deleting a (or all) post(s) from custom post type?
I know, my question is general and here is some similar questions, I checked the all, but I dont find any solution for my problem... I try using the wp_trash_post() in my function.php, but for some ...
2
votes
0
answers
411
views
Display notification only once
I am trying to use the getItem and setItem method to display notifications in an array only once.
It works for the first 5 notifications but once you go above 5 there are a few issues that arise. For ...
2
votes
0
answers
758
views
Search user metadata with checkboxes via ajax (almost working)
I have created an ajax search form following some tutorials online, it is working but not exactly how I need it to. Here is where I got the search from.
I have US states setup as a user meta field ...
2
votes
0
answers
2k
views
Remove type attribute from script added by wp_localize_script
How can I remove type attributes from all scripts added by wp_localize_script ?
Have the same problem with W3C validation as described here - Remove type attribute from script and style tags added by ...
2
votes
0
answers
1k
views
Prevent Javascript Facebook SDK Conflicts in plugin
I have plugin that uses Facebook's Javascript SDK to display a Facebook's Customer Chat Plugin.
I've been getting feedback that it doesn't work well with other Wordpress plugins that load the ...
2
votes
0
answers
1k
views
Hook (upgrader_process_complete) running moment
i want to use the upgrader_process_complete (documentation) to check if my plugin was updated (to run some scripts).
My question is: when this action is triggered, WordPress is already running the ...
2
votes
0
answers
150
views
Trigger Plugin database update after git pull
I have a couple of WordPress websites that I'm maintaining. The websites are on various git repositories (one for each site) with individual remotes.
Currently when there is a plugin update ...
2
votes
0
answers
67
views
How get list all users who edited post?
How get user list who's edited post?
Ex.: admin1 create post, editor1 make changes an update, editor2 make changes and update.
Function result:
admin1
editor1
editor2
Thank you!
2
votes
0
answers
25
views
How to add unique image class to Wordpress
I want my in-image ads to appear only on the first long vertical images of my blog posts. I need to add a unique image class to the first images, but I don't know how to do this or what code to use.
...
2
votes
0
answers
385
views
Access/update database with jQuery
Goal: Update wpdb each time a user clicks on a specific button.
Every time a user clicks on a button, I need jQuery to run a function that will update my wordpress database. As far as I understand, ...