Releases: ThemeFuse/Unyson
v1.2.3
- Fix for action that is not called after the v1.2.1 release
In v1.2.1 we added the possibility to use the framework as a plugin. To accomplish that, we moved the framework initialization to the after_setup_theme
action to prevent undefined constant TEMPLATEPATH
errors because the theme is not yet loaded when the plugin is initialized.
But in framework-customizations/theme/hooks.php
there is an add_action( 'after_setup_theme', '_action_theme_setup' );
that is not executed anymore. Now we changed that line to add_action( 'fw_init', '_action_theme_setup' );
. But the users that downloaded the framework before v1.2.3 have that code in the theme. In this release we added a piece of code that executes that function if it exists.
v1.2.2
v1.2.1
- Added the possibility to use the framework as a plugin
How to use the framework as a plugin:
-
Create the
wp-content/plugins/unyson
directory. -
Extract the framework in
wp-content/plugins/unyson/framework
. -
Create the
wp-content/plugins/unyson/unyson.php
file with the following contents:<?php if (!defined('ABSPATH')) die('Forbidden'); /** * Plugin Name: Unyson Framework * Plugin URI: http://unyson.themefuse.com/ * Description: A framework that facilitates the development of themes. * Version: 1 * Author: ThemeFuse * Author URI: http://themefuse.com * License: GPL2 */ function _filter_fw_framework_plugin_directory() { return plugin_dir_path(__FILE__) .'framework'; } add_filter('fw_framework_directory', '_filter_fw_framework_plugin_directory'); function _filter_fw_framework_plugin_directory_uri() { return plugin_dir_url(__FILE__) .'framework'; } add_filter('fw_framework_directory_uri', '_filter_fw_framework_plugin_directory_uri'); require dirname(__FILE__) .'/framework/bootstrap.php';
-
You must have a theme with the
framework-customizations/
directory (like framework default theme).
v1.2.0
- Removed constants
Do not use the FW_*
constants, they are deprecated and will be removed in the next major release.
How to migrate from constants to functions:
- Replace the
FW_CT_*
constants with thefw_get_stylesheet_customizations_directory()
andfw_get_stylesheet_customizations_directory_uri()
functions - Replace the
FW_PT_*
constants with thefw_get_template_customizations_directory()
andfw_get_template_customizations_directory_uri()
- Replace the
FW_DIR
,FW_EXTENSIONS_DIR
,FW_URI
,FW_EXTENSIONS_URI
with thefw_get_framework_directory()
andfw_get_framework_directory_uri()