Block Root REST API Route using custom &/or iThemes

For all REST API routes, the rest_api_init action hook fires when preparing to serve a REST API request. The request URI ($_SERVER[‘REQUEST_URI’]) can be inspected with a regular expression to detect the root (e.g. wp-json) and the route (e.g. /wp/v2/posts) of the request. You can then decide what to return to the client (e.g. WP_Error, … Read more

Can’t save formdata in DB

You must define the checkbox to store array in order to get all the selected values. Change your input name from “data-ids” to “data-ids[]”. <input name=”data_ids[]” value=”<?php echo get_the_ID(); ?>” <?= isset($results[get_the_ID()]->data_id) == get_the_ID() ? ‘checked’ : ” ?> type=”checkbox” />

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