Alternative for URLSearchParams

IE doesn’t support “URLSearchParams”. So sometimes your script will not work in IEs. So the alternative for the “URLSearchParams” is as below. window.getUrlParameter = function( keyword, query_string ) { keyword = keyword.replace(/[\[]/, ‘\\[‘).replace(/[\]]/, ‘\\]’); var regex = new RegExp( keyword + ‘=([^&#]*)’); var results = regex.exec( query_string ); return results === null ? ” : […]

Alternative for URLSearchParams Read More »

Add custom filter for searching post or users in WordPress backend

For this, two parts are important. Part 1: Adding select dropdown Below is the action by which we can add a new search filter for users: add_action( ‘manage_users_extra_tablenav’,  ‘add_custom_search_filter’ ); /** * Add new filter for users list in backend by filter with church name * * @param string $which Button position top or bottom.

Add custom filter for searching post or users in WordPress backend Read More »

Fix cURL error 28: Resolving timed out after 10003 milliseconds on local

Ref: https://www.digitalocean.com/community/questions/how-do-i-switch-my-dns-resolvers-away-from-google NOTE: This is for Mac users. Linux I am not sure, but can try. This is the temporary fix. You have to do every time when you restart your computer. Open the following file: /etc/resolv.conf Which should look something like this: nameserver 8.8.8.8 nameserver 8.8.4.4 Change those lines with following: nameserver 208.67.222.222 nameserver

Fix cURL error 28: Resolving timed out after 10003 milliseconds on local Read More »

Check the largest value of autoload filed in options table

Below query can help you to find which field contains the largest value of autoload field in options table. SELECT option_name, LENGTH(option_value), autoload FROM wp_options WHERE autoload = ‘yes’ ORDER BY `LENGTH(option_value)` DESC NOTE: change your table prefix as per your site. WP-CLI: wp db query “SELECT option_name, LENGTH(option_value), autoload FROM wp_options WHERE autoload =

Check the largest value of autoload filed in options table Read More »

Errors were encountered while processing:

[code language=”css”] dpkg: error processing package mariadb-server (–configure): dependency problems – leaving unconfigured Processing triggers for libc-bin (2.23-0ubuntu7) … No apport report written because the error message indicates its a followup error from a previous failure. Errors were encountered while processing: mariadb-server-10.1 mariadb-server E: Sub-process /usr/bin/dpkg returned an error code (1) 2017-07-15 16:15:35,896 (INFO) ee

Errors were encountered while processing: Read More »