Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter DanielBachmann

    (@danielbachmann)

    I solved it for now:

    When downloading from Fontello the suggested file name is fontello-<somehash>.zip.
    When uploading with this file name Iconize creates some files and classes with that hash and some without which breaks things.

    Easiest solution and working for me now: just rename the file downloaded from Fontello as “fontello.zip”

    P.S.: Codewise this probably is one of the cleanest plugins I ever seen, considering the complex UI, which helped me immensly to fix my problem.
    Awesome work, useful plugin

    Thread Starter DanielBachmann

    (@danielbachmann)

    Ok I found a solution on this thread:

    https://ww.wp.xz.cn/support/topic/how-to-change-plugins-load-order

    Basically jsdalton (bless him) suggests manipulating the array saved as the option “active_plugins” and writing it back. The code from above mentioned thread:

    function this_plugin_first() {
    	// ensure path to this file is via main wp plugin path
    	$wp_path_to_this_file = preg_replace('/(.*)plugins\/(.*)$/', WP_PLUGIN_DIR."/$2", __FILE__);
    	$this_plugin = plugin_basename(trim($wp_path_to_this_file));
    	$active_plugins = get_option('active_plugins');
    	$this_plugin_key = array_search($this_plugin, $active_plugins);
    	if ($this_plugin_key) { // if it's 0 it's the first plugin already, no need to continue
    		array_splice($active_plugins, $this_plugin_key, 1);
    		array_unshift($active_plugins, $this_plugin);
    		update_option('active_plugins', $active_plugins);
    	}
    }
    add_action("activated_plugin", "this_plugin_first");

    As I only need to load my manipulation before ‘WordPress Social Login’ I intend to adjust above function accordingly.
    However to make this work you still have to code it like this:

    if(!function_exists(wsl_render_redirect_to_provider_loading_screen))
    {
        function wsl_render_return_from_provider_loading_screen([...] )
        {
            [...]
        }
    }

    That is before the plugin overiding the function is activated you allready have the function defined from WSL and the hack only fires on succesfull activation.

    Hope this helps someone else in my situation.

Viewing 2 replies - 1 through 2 (of 2 total)