Connections-Business-Directory / Connections

Directory Plugin for WordPress
https://connections-pro.com
GNU General Public License v2.0
26 stars 18 forks source link

Implement cnQuery #438

Open shazahm1 opened 9 years ago

shazahm1 commented 9 years ago

This is a new class with the intention to mimic WP_Query

ref: http://codex.wordpress.org/Class_Reference/WP_Query

Just like WP_Query it should be responsible for parsing the query vars but obviously only the ones registered to Connections. The parsed results should apply a filter to either the [connections] shortcode options or the cnRetrieve::entries() method. On that thought ... maybe cnQuery should replace cnRetrieve. It would be good to start fresh since there's a lot of ugly code in cnRetrieve.

cnQuery should include all the similar filters that WP_Query does.

shazahm1 commented 9 years ago

When this is introduced, there should be an attribute parse_query which can be set (bool) to determine whether or not the query vars should be used.

shazahm1 commented 9 years ago

Part of this implementation an action should be added on the core WP parse_query hook to set the cnQuery class properties. The parse_query attribute mentioned in https://github.com/Connections-Business-Directory/Connections/issues/438#issuecomment-74004439 will determine if the should be used or not.