henkludis
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Design question about custom post types and taxonomiesThanks Linards,
so I call register_post_type and register_taxonomy twice, both on plugin activation and using the ‘init’ hook, right?
Forum: Plugins
In reply to: [Fixed Bottom Menu] Multiple version for multi language siteThanks a lot, exactly what I needed.
BTW, do you think it’s feasible to language switch button created by Polylang inside the fixed bottom menu?
Forum: Plugins
In reply to: [ShareThis Dashboard for Google Analytics] Anonymization Feature+1
Same here!
My FB registration & login used to work until one or two weeks ago, so I guess something has changed on the side of FB.I did take a look at the FB developers page. It appeared App Domains and a Privacy Policy URL were missing. But even adding these didn’t help.
Forum: Plugins
In reply to: [Ultimate Product Catalog] Filtering on custom field containing commaThanks Rustaurius,
it looks like we still can’t use comma in our custom fields, right? Do you still have plans to include something along the lines of my code snippet above? Updating the plugin is a real pain this way…Forum: Plugins
In reply to: [Ultimate Product Catalog] Filtering on custom field containing commaOK, thanks.
Now may I suggest the following for the next version of the plugin: instead of exploding the string by comma, explode it by regex.
I’ve written this function:
function splitByReg($str,$pat){ $chunks = preg_split($pat, $str, -1, PREG_SPLIT_DELIM_CAPTURE); $items = []; $item = ''; foreach ($chunks as $chunk){ if (preg_match($pat,$chunk)){ $item = ltrim($chunk,','); } else { $item .= $chunk; array_push($items,$item); } } return ($items); }
Now instead of Shortcodes.php:277:
$Custom_Field_IDs = explode(",", $custom_fields);
I do:
$pat = "/(,\d+=)/"; $Custom_Field_IDs = splitByReg($custom_fields,$pat);
That way there’s next to no constraints to the values custom fields can have.
Forum: Plugins
In reply to: [Ultimate Product Catalog] Filtering on custom field containing commaI’m sorry, I didn’t talk about sorting but about filtering. I can set a custom field value to searchable and set it’s control type to checkbox. That way I can filter the items in the catalogue. The thing is that custom field values can’t contain commas because of the way you split the search string (see my first post).
Same here, and not only email, but also first and last name.
Changing password does work, BTW.Forum: Plugins
In reply to: [Ultimate Product Catalog] Custom fields issueAha, thanks, my mistake.