thewirelessguy/cornerstone — pull request #23 by thetrickster (2014-01-18 02:57:27+00:00)
Title: adding cornerstone_asset_uri function to serve child theme assets if the...

...y exist.

In order to better equip this theme for child themes, it's important that the assets like CSS and JS loaded in the theme pull from the child theme first if the file exists-- and if not, load the main template asset.

I checked the WP codex and get_stylesheet_directory_uri(), as far as I understand it, would error if there are no assets in the child theme where they exist in the parent theme. In order to optionally serve those assets if they exist, I created a function that checks for a file in the child theme and returns that path to the asset. If there's no file there, it returns the path to the asset in the parent template directory.