Counting And Monitoring How Much Queries My Script Used

Actually there happens more than single query behind the scene. They are both for getting some needed data and also for updating or creating or inserting data. Say for post terms wp_insert_post() get those data by query. So, where you’re assuming that it should run 40,000 query it actually run more than that. Please have … Read more

Query String for the WP_QUERY parameters

PHP function http_build_query(); would return different string for this array. It won’t remain readable like an array but, I believe, it will work as parameter to WP_Query. build_query is the WordPress equivalent for the same functionality. Turns out that build_query is a bit different from http_build_query. http_build_query returned date_query%5B0%5D%5Bafter%5D=24+hours+ago and build_query returned date_query%5B0%5D%5Bafter%5D=24 hours ago. … Read more

Create a new post on a specified publish date via link?

Here is the solution I came up with! In my plugin functions: <?php function ficma_inline_script() { $datedata = explode(“-“, $_POST[‘date’]); $year = $datedata[0]; $month = $datedata[1]; $day = $datedata[2]; $newdate = date(“M d, Y”, mktime(0, 0, 0, $month, $day, $year)); ?> <script type=”text/javascript”> document.getElementById(“mm”).value = “<?=$month ?>”; document.getElementById(“cur_mm”).value = “<?=$month ?>”; document.getElementById(“hidden_mm”).value = “<?=$month ?>”; … Read more

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