Closed wkirby closed 13 years ago
The filter is already the way for a theme to set the path.
Sorry. I'm a moron. I don't know where my brain was earlier.
hi! how to include in a theme's functions.php file?
i'm using this working code functions.php: // wp post formats require_once('library/wp-post-formats/cf-post-formats.php'); cf-post-formats.php: function cfpf_base_url() { /* return trailingslashit(apply_filters('cfpf_base_url', plugins_url('', FILE)));*/ return trailingslashit(apply_filters('cfpf_base_url', get_template_directory_uri() . '/library/wp-post-formats/')); }
Updated cfpf_base_url() to work regardless of directory location, allowing plugin to be used both as a WordPress plugin, but also as an include in a theme's functions.php file. Doing so allows theme developers to include the functionality without asking users to install a plugin.
Also fixes problem #8.