Question
How can I make work these functions not just when the user profile is updated. Also when a frontend form is submited? Here the functions: function get_channel_by_author( $user_id ) : int { // if we don't find anything then a value of 0 ... 0 2 hours 0 Answers 3 views Set img attributes on the database Question Why doesn't it work class Abbas_FiLL_Images_Dimensions { private static$instance; private function __construct() {} public function run() { add_action( 'admin_notices', [$this, 'do_fill_missing_dimensions'] ); ... 0 3 hours 0 Answers 3 views How to listen on WordPress REST API calls ( single post ) Question I'm building a mobile app and need to collect site visitors count through the mobile app using the only way available to me and that's The REST API. I found a plugin called WordPress Popular Posts collect visitors but only on ... 0 11 hours 0 Answers 3 views Getting IDs from Child Categories in Woocommerce Question So I have a script that is/was working perfectly, but now have an issue as 2 of the categories fall under a parent category. The categories without a parent work fine, but the 2 categories that now have a parent are ... 0 12 hours 0 Answers 4 views what is the best practice to add new field to an api route Question I'm modifying the WP REST API for mobile app usage, and I went through at the first registering new fields route using the rest_api_init action or hook using the func register_rest_field, but I found there's a lot of fields I ... 0 14 hours 0 Answers 5 views Gutenberg Blocks doesn’t render correctly when using do_blocks Question I'm trying to render a post_content with blocks using the do_blocks function, that takes a gutenberg content, parses every block, and returns an HTML string. The problem is that some blocks aren't rendering correctly. I suppose it is because do_blocks ... 0 21 hours 0 Answers 5 views Get specific post in MODAL popup Question I need to load posts in modal popup dynamically. I have found many solutions but upon trying nothing works for me. The solutions do not load the modal popup at all. I tried getting the ID from the post and then ... 0 1 day 0 Answers 4 views wp_get_post_terms is difference obj model than the one in rest api response Question I'm building a mobile app and using the rest API on WordPress to do that, I am customizing the /wp/v2/posts response by using the following code: add_filter('rest_prepare_post', 'custome_posts_response', 10, 3); function custome_posts_response($data, $post,$context) { $newspapers = wp_get_post_terms($post->ID, ...
0
1 day 0 Answers 1 views

Why add_action work only one time?

Question
i have a function that create a page programmatically if a new value it s added on db. add_action("init", "mic_create_new_page", 10); function mic_create_new_page() { global $wpdb;$res = $wpdb->get_results('select * from '.$wpdb->prefix. ' mic_secteurs'); ...
0
2 days 0 Answers 2 views

PHP parse_str() function allowing passing shorthand array

Question
We are accepting strings from templates to a markup engine, which allows for configuration to be passed in a "simple" form. The engine parses the strings via PHP, using an adapted version of the parse_str() function - so we can parse ...
0
2 days 0 Answers 4 views