Path Issue for admin-options.js
-
The settings page raises Browser GET errors
<script type='text/javascript' src='http://192.168.0.66JUPITERSHAREDwwwrootwordpresswp-contentpluginswp-uiadminadmin-options.js?ver=3.6.1'></script>This is due to the script_action function in the admin-options.php file.
A more robust function would be:
function script_action() { do_action( 'plugin_' . $this->page_prefix . '_load_scripts' ); if ( file_exists( str_ireplace( ".php", ".js", __FILE__ ) ) ) { $js_file = str_ireplace( '.php', '.js', basename( __FILE__ ) ); $js_url = plugins_url( $js_file, __FILE__ ); $js_url = ( is_ssl() ) ? str_ireplace( 'http://', 'https://', $js_url ) : $js_url ; wp_enqueue_script( $this->page_prefix . "_option_js", $js_url ); } }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Path Issue for admin-options.js’ is closed to new replies.