Mr Papa said
okay, think I may have a way around this themes and bootstrap breaking wp jquery ui… but need help testing…a handful of small changes…
in file simple-press/sp-startup/sp-load-forum.php, find this line
<br />add_action('wp_enqueue_scripts', 'sp_load_forum_scripts', 1);<br />and add this line right after it:
<br />add_action('wp_enqueue_scripts', 'sp_load_forum_footer_scripts', 9999);<br />then in file simple-press/sp-startup/forum/sp-forum-framework.php, find these lines and remove them:
<br /># load up forum front end javascript that must be in footer $footer_dep = array('jquery'); if ($tooltips) $footer_dep = array_merge($footer_dep, array('jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-tooltip')); $script = (defined('SP_SCRIPTS_DEBUG') && SP_SCRIPTS_DEBUG) ? SFJSCRIPT.'sp-forum-footer-dev.js' : SFJSCRIPT.'sp-forum-footer.js'; wp_enqueue_script('spforumfooter', $script, $footer_dep, false, true); # sp_platform_vars is not static so cannot be in combined js cache but can be localized $platform = array( 'focus' => 'forum', 'mobile' => $spMobile, 'device' => $spDevice, 'tooltips' => $tooltips, 'mobiletheme' => (current_theme_supports('sp-theme-responsive')) ? 1 : 0, 'headpadding' => ($spMobile) ? 0 : sp_get_option('spheaderspace'), 'saveprocess' => 0, 'checkiframe' => $iframe, 'pageview' => $spVars['pageview'], 'editor' => $spGlobals['editor'], 'waitimage' => sp_paint_file_icon(SPFIMAGES, 'sp_Wait.png'), 'successimage' => sp_paint_file_icon(SPFIMAGES, 'sp_Success.png'), 'failimage' => sp_paint_file_icon(SPFIMAGES, 'sp_Failure.png'), 'customizertest' => isset($_GET['sp-customizer-test']), 'autoupdate' => $sfauto['sfautoupdate'], 'autoupdatelist' => $arg, 'autoupdatetime' => $timer ); $platform = apply_filters('sph_platform_vars', $platform); wp_localize_script('spforumfooter', 'sp_platform_vars', $platform);<br />now, in same file, scroll down a bit to the end of this routine and find this code:
<br />do_action('sph_scripts_end', $footer); } function sp_load_plugin_styles($ahahCall = false) {<br />and then change it to:
<br />do_action('sph_scripts_end', $footer, $tooltips); } function sp_load_forum_footer_scripts() { $tooltips = (defined('SP_TOOLTIPS') && SP_TOOLTIPS == false) ? 0 : 1; do_action('sph_scripts_footer_start', $tooltips); # load up forum front end javascript that must be in footer $footer_dep = array('jquery'); if ($tooltips) $footer_dep = array_merge($footer_dep, array('jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-tooltip')); $script = (defined('SP_SCRIPTS_DEBUG') && SP_SCRIPTS_DEBUG) ? SFJSCRIPT.'sp-forum-footer-dev.js' : SFJSCRIPT.'sp-forum-footer.js'; wp_enqueue_script('spforumfooter', $script, $footer_dep, false, true); # sp_platform_vars is not static so cannot be in combined js cache but can be localized $platform = array( 'focus' => 'forum', 'mobile' => $spMobile, 'device' => $spDevice, 'tooltips' => $tooltips, 'mobiletheme' => (current_theme_supports('sp-theme-responsive')) ? 1 : 0, 'headpadding' => ($spMobile) ? 0 : sp_get_option('spheaderspace'), 'saveprocess' => 0, 'checkiframe' => $iframe, 'pageview' => $spVars['pageview'], 'editor' => $spGlobals['editor'], 'waitimage' => sp_paint_file_icon(SPFIMAGES, 'sp_Wait.png'), 'successimage' => sp_paint_file_icon(SPFIMAGES, 'sp_Success.png'), 'failimage' => sp_paint_file_icon(SPFIMAGES, 'sp_Failure.png'), 'customizertest' => isset($_GET['sp-customizer-test']), 'autoupdate' => $sfauto['sfautoupdate'], 'autoupdatelist' => $arg, 'autoupdatetime' => $timer ); $platform = apply_filters('sph_platform_vars', $platform); wp_localize_script('spforumfooter', 'sp_platform_vars', $platform); do_action('sph_scripts_footer_end', $tooltips); } function sp_load_plugin_styles($ahahCall = false) {<br />we are inserting a new routine here after the first one…. save both files, clear your combined js caches and your browser caches, and give it a whirl…
would appreciate some feedback, please….
Since I added this but then changed themes because this code had exactly no effect on the problem, should I just leave this code intact or should I reinstate the original code?