Author | Replies |
---|---|
sitesurety | # Posted on November 5, 2014 at 8:32 pm |
Thanks for the help! Very much appreciated. I want to keep my code as slick and clean as possible.. I like how the MP plugin is very Java collection-ishs. Two other things I’ve been doing which I’m not entirely happy about: Creating a multi-dimensional array for all the filtered options by data type, which I then output to a form using a double loop: $filters = array( // Loop code with de-dup here as $key Then create a form with all the unique filter options: <!– Filter form –> <?php } ?> Then I’ve got some jQuery over the top which responds when an option is selected and posts the updated id => keys via Ajax back to the form, which updates the results table: $.ajax({ }); // Return select name and value return values; }); Ideally, I was thinking of moving the data filtering into the controller (functions.php) file, with different case rules…so I just have to output the view in the template. |
MasterPress 1.3.10 is now available
9th November 2023
MasterPress 1.3.10 is a feature and bugfix release. Workaround for fatal error introduced by changes to WordPress’ wpdb class in WordPress 6.4. Added actions to MPC files upload_field & WF image save_image functions.