Proxy External API request in PHP from Edit.js in Block Plugin

Okay, I figured it out! First, I created a rest endpoint in PHP. https://github.com/bbuilds/ih-top-nurses-block/blob/main/inc/rest.php#L11 The rest point has optional parameters using regex and then in the register_rest_route() callback builds a fetch URL depending on the parameters passed to the WP-REST endpoint. It then fires to the external API wp_remote_get($fetch_url) and dumps the data into the … Read more

How to write txt file?

How does these functions relate to writing file? Do you want to write to file in general or modify functions to accomplish that? Simple approach – do it with PHP, for example with file_put_contents(). However between different hosting configurations this is not always reliable. Actually workflows in WP make real effort to not write any … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)