Switching over to building the table with JS — wp.template.
We are now using the same JS template for existing rows and newly
generated rows on the fly — this should simplify things moving forward.
I’ve also started building stuff in an external JS file rather than
straight on the page. Will continue migrating things to it and
localizing as needed.
Saved ( 2 * displayed tax rates - 1 ) db queries per page load by doing
the locations all in one query and then parceling them out in php.
More coming.
When inserting a new set of API keys via the visual API endpoint, only 5 format
values were specified in the 3rd param passed to the $wpdb->insert(); however,
6 values were specified in the 2nd param. This meant that the truncted_key value
was being formatted as an integer only the first numerical characters of the last
7 character of the consumer key were being stored. For example, given a consumer
key value of ck_e91f2aeae6c3dea3045293a3dbdf55c317ad762c the truncated_key value
should be 7ad762c but instead, it was being stored at 7.
This is by no means complete. A number of things need to be relocated
and optimized still, but it does a rough search, purely in JS, and
highlights the results in yellow.
Warren, Nicole and I have worked on a revised blurb for the description page. It was mostly Nicole, I just did some little tweaks.
Copy in this doc: https://docs.google.com/document/d/1NhaPzGg9I_Esf3N_YqH7ox9s0PiEilEgni_a4DlGqpw/edit
I have edited the existing 'description' as per the google doc, and then added links (as there were none in the doc) for the various extensions mentioned, and a couple of other things that made sense to have links.
Over to you :)
Sanitize early, escape late. Rather than double escaping, I figured
it’d be better to sprintf it in, and then escape that string — closer
to the output.
Also, I’m not sure why `urlencode` was used to escape a name?
There’s a lot of them, so I’m breaking them into multiple commits.
This is safeguarding stuff in case some translation uses a double
quote, it will no longer risk breaking out of the attribute.