wp_parse_args is a generic utility for merging together an array of arguments and an array of default values. It can also be given a URL query type string which will be converted into an array (i.e. "id=5&status=draft").
2
votes
1answer
71 views
How to implement time filter to show random post 1 month for one category and 3 months for other categories
I started to work on one website after another developer and there is problem with his "popular widget" which is basically showing 3 random posts from category. There is some Switch statement which is ...
1
vote
1answer
270 views
wp_parse_args & category parameter
Am trying to use this code:
function wp_custom_archive($args = '') {
global $wpdb, $wp_locale;
$defaults = array(
'cat' => 6, //doing nothing
'format' ...
1
vote
1answer
119 views
Creating a Search Array From Multiple Tables
I'm working with a client's WordPress site that has user submissions (via TDO Mini Forms) from multiple countries, and they would like to be able to search for posts by region – Europe, Africa, ...
0
votes
1answer
159 views
Using wp_parse_args to set up Plugin Default Settings
So I want to have defaults set up for each of my plugins settings, and I'm using wp_parse_args to do so which I believe is the correct way, but I'm hitting a roadblock.
Here's my code at the moment:
...
0
votes
1answer
126 views
when the incoming url is a query, in which function does WP begin to work with it?
I need to debug a problem with filters I have in place. they're affecting any url that includes a query; eg, http://my.domain.hk/?attachment=1. does anyone know in which function WP begins to work ...
0
votes
1answer
46 views
Get WP_Query query after execution?
It it possible to get the configuration of a the latest called WP_Query? I need to use it for debugging.
For example, if i run something like:
$the_query = new WP_Query( $args );
...
Could i get ...
