Unyson icon indicating copy to clipboard operation
Unyson copied to clipboard

Feature request - is it possible to add location filters for "framework-customizations" folder?

Open dk-wordpress opened this issue 11 years ago • 5 comments

Hello, creators!

I really need this because i want to use Unyson as a part of my plugin. Indeed, it would be cool to change location of "framework-customizations" directory via filters into my plugin folder, for example.

Could you add these filters to the official Unyson release?

Thank you for a great product!

    /**
     * Full path to the child-theme framework customizations directory
     * @param string $rel_path
     * @return null|string
     */
    function fw_get_stylesheet_customizations_directory($rel_path = '') {
        if (is_child_theme()) {
            return get_stylesheet_directory() . fw_get_framework_customizations_dir_rel_path($rel_path);
        } else {
            // check is_child_theme() before using this function
            return null;
        }
    }

    /**
     * URI to the child-theme framework customizations directory
     * @param string $rel_path
     * @return null|string
     */
    function fw_get_stylesheet_customizations_directory_uri($rel_path = '') {
        if (is_child_theme()) {
            return get_stylesheet_directory_uri() . fw_get_framework_customizations_dir_rel_path($rel_path);
        } else {
            // check is_child_theme() before using this function
            return null;
        }
    }

dk-wordpress avatar Jul 02 '15 09:07 dk-wordpress

Hello, it has no sense. framework-customizations is for theme. If you will do that, any theme with framework-customizations will not work.

Why do you need to change that, why you are trying to achieve? More details please

ghost avatar Jul 02 '15 09:07 ghost

I planned to use your framework as a part of plugin (just for creating necessary options pages and options for custom post types), not a part of theme :)

Is any way to hook plugin options from another plugin, not from theme?

Thank you for fast response!

dk-wordpress avatar Jul 02 '15 11:07 dk-wordpress

Yes 1, 2, 3, 4

ghost avatar Jul 02 '15 11:07 ghost

Thank you for a fast response! I had to check on the availability of these hooks before asking here. Sorry for your time!

dk-wordpress avatar Jul 02 '15 11:07 dk-wordpress

No problem. Good luck with the plugin

ghost avatar Jul 02 '15 11:07 ghost