Just notes on problems I face:
-
[Tips and Tricks for Writing WordPress Themes and Plugins] Forcing the browser to refresh your scripts and styles
I’m starting a some kind of thread of posts where I write down some of the nice tricks I meet in WordPress development. First one is how to write your custom theme and plugin files so after each deployment / update you’ll be sure that the browser doesn’t use the cached version of your JS and CSS.…
-
Leaflet tiles: Failed to load resource: the server responded with a status of 403 (Forbidden)
If you recently encounter a 403 error for your Leaflet tiles and your map is just showing gray it’s most likely that you’re using the tiles from Cloudmade which decided to discontinue their MapTile service for non-enterprise users. The easiest way to fix it is to change the cloudmade tile url: var tileUri = ‘http://tile.cloudmade.com/APIKEY/88233/256/{z}/{x}/{y}.png’; With…
-
jQuery error .apply( matched.elem, args ); undefined is not a function
If you’re having an error in your site/app that says that is undefined is not a function and the error happens on the row containing .apply( matched.elem, args ); (jquery.js:4676 for version 2.0.3). You can do the following 2 things to figure out the error: 0. You need Chrome Dev Tools 1. Enable async for your dev…
-
It’s time to stop fooling ourselvs with touch device detection
To all you JS guys out there: It’s time to stop fooling ourselves. The fact that a user has a touch capable device doesn’t mean he’ll be using it with touch only. Not sure what I’m talking about? There you go: var clickEventToUse = ( ‘ontouchstart’ in window ? ‘touchend’ : ‘click’ ) Still not sure? Now…
-
Making async ajax calls to an array of url’s and processing their responses at once
Today I had a very interesting case where we needed to get a specific amount of SVG files with ajax calls that were to be processed once after all of the requests are done. I was familiar with the $.when and used it before but only in casese where the number of the calls were…
-
Async Call Stack в Chrome Canary
Ако използвате Chrome Canary за разработка, вече може да използвате async радио бутон в полето с Call Stack-а, който ви показва състоянието на стека ви при breakpoint, Ако го пуснете в Call Stack-а на функциите които са в резултат на асинхронно действиие имате пълния списък на тези които са ги извикали. Якотата тук е, че няма…
-
A new async callstack have landed in Chrome Canary
If you’re using Chrome Canary for your development work now you can find a asyc radio button next to the callstack when you stop on a breakpoint in the DevTools. Enabling it adds the functions that triggered an asynchronous action that called in the end the function you’ve your breakpoint in. The awesome about this is…
-
Sublime Text 2/3
This is an article about Sublime Text 2 and 3 and the reasons I use it. Recently Sublime Text is becoming a buzz-word and seems like big amount of people are using it. I’ve already heard people complaining about it’s mass popularity but here’s what led me to the point using it and why I…
-
Google analytics is no loger working with WooCommerce out of the box
Recently I updated WooCommerce site from version 2.0.* to 2.1.* and today I noticed that the site stats from Google Analytics are no longer working. I went to the settigns page and noticed that the Integration tab where the google analytics ID was suposed to be was gone. Turns out that they dropped the Google…
-
Regenerating WooCommerce System Pages (When you forgot to add them)
Update: recently I found the tools tab of WooCommerce http://example.com/wp-admin/admin.php?page=wc-status&tab=tools. (It’s located in the WooCommerce -> System Status, in the Tools Tab). From there you can create your WooCommerce special pages and many more nice things. When you install WooCommerce it asks you if you want to add the system pages – Shop, Checkout and so…