Mixed content with the menu_icon.png in admin, plugins_url
-
Got a misterious mixed-content for the menu_icon.png in https mode, while taxonomy-terms-order did not have this problem, but anyways:
https://codex.www.ads-software.com/Function_Reference/plugins_url
The plugins_url() function should not be called in the global context of plugins, but rather in a hook like “init” or “admin_init” to ensure that the “plugins_url” filters are already hooked at the time the function is called.
So changing class.cpto.php as detailed below can prevent the wrong scheme, that is caused by the too early ‘define’ of CPTURL.
Line 225:
From:src=”‘. CPTURL .’/images/menu-icon.png”
To:
src=”‘. set_url_scheme(CPTURL) .’/images/menu-icon.png”
- The topic ‘Mixed content with the menu_icon.png in admin, plugins_url’ is closed to new replies.