Support Forum

Plupload broken using Kleo theme

JH Joseph Harford
Joseph Harford
Member

I know this has been posted many times, but for the Kleo theme I cannot find how to fix it. If someone could take a look at my specific case I’d appreciate it. I can Pm login details and we can post the fix here. 

 

I have tried the suggestions on the other topics but to no avail.

10 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

Are you referring to the use of Bootstrap by your WP theme? If so then an admin login isn’t really going to be that helpful. Have you located the file that loads the Bootstrap library?

JH Joseph Harford
Joseph Harford
Member

The functions.php looks like this – 

/***************************************************

:: Scripts/Styles load

***************************************************/

add_action( ‘wp_enqueue_scripts’, ‘kleo_frontend_files’ );

if (!function_exists(‘kleo_frontend_files’)):

// Register some javascript files

function kleo_frontend_files()

{

//problem-with-post-edit-buttonead scripts

wp_register_script( ‘kleo-init’, get_template_directory_uri() . ‘/assets/js/init.js’, array(),KLEO_THEME_VERSION, false );

wp_register_script( ‘modernizr’, get_template_directory_uri() . ‘/assets/js/modernizr.custom.46504.js’, array(),KLEO_THEME_VERSION, false );

/* Footer scripts */

wp_register_script( ‘bootstrap’, get_template_directory_uri() . ‘/assets/js/bootstrap.min.js’, array(‘jquery’),KLEO_THEME_VERSION, false );

wp_register_script( ‘waypoints’, get_template_directory_uri() . ‘/assets/js/plugins/waypoints.min.js’, array(‘jquery’),KLEO_THEME_VERSION, true );

//wp_register_script( ‘pretty-photo’, get_template_directory_uri() . ‘/assets/js/plugins/prettyPhoto/jquery.prettyPhoto.js’, array(‘jquery’),KLEO_THEME_VERSION, true );

wp_register_script( ‘magnific-popup’, get_template_directory_uri() . ‘/assets/js/plugins/magnific-popup/magnific.min.js’, array(‘jquery’),KLEO_THEME_VERSION, true );

wp_register_script( ‘caroufredsel’, get_template_directory_uri() . ‘/assets/js/plugins/carouFredSel/jquery.carouFredSel-6.2.0-packed.js’, array(‘jquery’),KLEO_THEME_VERSION, true );

wp_register_script( ‘jquery-mousewheel’, get_template_directory_uri() . ‘/assets/js/plugins/carouFredSel/problem-with-post-edit-buttonelper-plugins/jquery.mousewheel.min.js’, array(‘jquery’, ‘caroufredsel’),KLEO_THEME_VERSION, true );

wp_register_script( ‘jquery-touchswipe’, get_template_directory_uri() . ‘/assets/js/plugins/carouFredSel/problem-with-post-edit-buttonelper-plugins/jquery.touchSwipe.min.js’, array(‘jquery’, ‘caroufredsel’),KLEO_THEME_VERSION, true );

wp_register_script( ‘jquery-transit’, get_template_directory_uri() . ‘/assets/js/plugins/carouFredSel/problem-with-post-edit-buttonelper-plugins/jquery.transit.min.js’, array(‘jquery’, ‘caroufredsel’),KLEO_THEME_VERSION, true );

wp_register_script( ‘jquery-ba-throttle-debounce’, get_template_directory_uri() . ‘/assets/js/plugins/carouFredSel/problem-with-post-edit-buttonelper-plugins/jquery.ba-throttle-debounce.min.js’, array(‘jquery’, ‘caroufredsel’),KLEO_THEME_VERSION, true );

wp_register_script( ‘isotope’, get_template_directory_uri() . ‘/assets/js/plugins/jquery.isotope.min.js’, array(‘jquery’),KLEO_THEME_VERSION, true );

wp_register_script( ‘kleo-scripts’, get_template_directory_uri() . ‘/assets/js/scripts.js’, array(‘jquery’),KLEO_THEME_VERSION, true );

wp_register_script( ‘kleo-shortcodes’, get_template_directory_uri() . ‘/assets/js/shortcodes.js’, array(‘jquery’),KLEO_THEME_VERSION, true );

wp_register_script( ‘app’, get_template_directory_uri() . ‘/assets/js/app.js’, array(‘jquery’),KLEO_THEME_VERSION, true );

//enque them

wp_enqueue_script(‘kleo-init’);

wp_enqueue_script(‘modernizr’);

wp_enqueue_script(‘bootstrap’);

wp_enqueue_script(‘waypoints’);

//wp_enqueue_script(‘pretty-photo’);

wp_enqueue_script(‘magnific-popup’);

wp_enqueue_script(‘caroufredsel’);

wp_enqueue_script(‘jquery-touchswipe’);

wp_enqueue_script(‘jquery-transit’);

wp_enqueue_script(‘jquery-ba-throttle-debounce’);

wp_enqueue_script(‘mediaelement’);

wp_enqueue_script(‘isotope’);

wp_enqueue_script(‘kleo-scripts’);

wp_enqueue_script(‘kleo-shortcodes’);

wp_enqueue_script(‘app’);

$retina_logo = sq_option_url(‘logo_retina’) != ” ? sq_option_url(‘logo_retina’) : “”;

if (is_singular() && get_cfield(‘logo_retina’) ) {

$retina_logo = get_cfield(‘logo_retina’);

}

$obj_array = array(

‘ajaxurl’ => home_url().’/wp-admin/admin-ajax.php’,

‘goTop’ => sq_option(‘go_top’, 1),

‘ajaxSearch’ => sq_option(‘ajax_search’, 1),

‘alreadyLiked’ => sq_option(‘likes_already’, ‘You already like this’),

‘retinaLogo’ => $retina_logo

);

wp_localize_script( ‘app’, ‘kleoFramework’, $obj_array );

if ( is_singular() && comments_open() && get_option( ‘thread_comments’ ) ) {

wp_enqueue_script( ‘comment-reply’ );

}

// Register the styles

wp_register_style( ‘bootstrap’, get_template_directory_uri() . ‘/assets/css/bootstrap.min.css’, array(), KLEO_THEME_VERSION, ‘all’ );

wp_register_style( ‘kleo-app’, get_template_directory_uri() . ‘/assets/css/app.css’, array(), KLEO_THEME_VERSION, ‘all’ );

wp_register_style( ‘kleo-shortcodes’, get_template_directory_uri() . ‘/assets/css/shortcodes.css’, array(), KLEO_THEME_VERSION, ‘all’ );

//wp_register_style( ‘pretty-photo’, get_template_directory_uri() . ‘/assets/js/plugins/prettyPhoto/prettyPhoto.css’, array(), KLEO_THEME_VERSION, ‘all’ );

wp_register_style( ‘magnific-popup’, get_template_directory_uri() . ‘/assets/js/plugins/magnific-popup/magnific.css’, array(), KLEO_THEME_VERSION, ‘all’ );

wp_register_style( ‘mediaelement-skin’, get_template_directory_uri() . ‘/assets/js/plugins/mediaelement/mejs-kleo-skin.css’, array(), KLEO_THEME_VERSION, ‘all’ );

wp_register_style( ‘kleo-fonts’, get_template_directory_uri() . ‘/assets/css/embed-fonts.css’, array(), KLEO_THEME_VERSION, ‘all’ );

wp_register_style( ‘kleo-style’, CHILD_THEME_URI . ‘/style.css’, array(), KLEO_THEME_VERSION, ‘all’ );

//enque required styles

wp_enqueue_style( ‘bootstrap’ );

wp_enqueue_style( ‘kleo-app’ );

wp_enqueue_style( ‘kleo-shortcodes’ );

//wp_enqueue_style( ‘pretty-photo’ );

wp_enqueue_style( ‘magnific-popup’ );

wp_enqueue_style( ‘kleo-fonts’ );

wp_enqueue_style( ‘mediaelement’ );

} // end kleo_frontend_files()

endif;

 

add_action( ‘wp_enqueue_scripts’, ‘kleo_load_files_plugin_compat’, 1000 );

function kleo_load_files_plugin_compat()

{

wp_register_style( ‘kleo-plugins’, get_template_directory_uri() . ‘/assets/css/plugins.css’, array(), KLEO_THEME_VERSION, ‘all’ );

wp_enqueue_style( ‘kleo-plugins’ );

wp_enqueue_style( ‘mediaelement-skin’ );

//enque child theme style only if activated

if (is_child_theme()) {

wp_enqueue_style( ‘kleo-style’ );

}

} // kleo_load_css_files_plugin_compat()

 

if ( !function_exists( ‘remove_wp_open_sans’ ) ) {

/**

* Remove duplicate Open Sans from WordPress

*/

function kleo_remove_wp_open_sans() {

$font_link = get_transient(KLEO_DOMAIN.’_google_link’);

if ( strpos( $font_link, ‘Open+Sans’ ) !== false ) {

wp_deregister_style( ‘open-sans’ );

wp_register_style( ‘open-sans’, false );

}

}

add_action(‘wp_enqueue_scripts’, ‘kleo_remove_wp_open_sans’);

}

 

 

 

 

 

 

My thought is that I can’t find the jquery_ui like in other threads, but maybe it’s included in one of the others? 

Any advice would be helpful

JH Joseph Harford
Joseph Harford
Member

I’ve tried everything I can think of. 

I don’t notice any of the JQ ui stuff being Enqueued. Should those be in there? 

YS Yellow Swordfish
Yellow Swordfish
Member

Not if your theme doesn’t use them.

One last question before looking at code changes. Did you try loading the SP scripts in the footer (forum admin > Integration > Page and Permalink)?

JH Joseph Harford
Joseph Harford
Member

yes I tried that on and off and no difference. 

Thanks for looking into this

YS Yellow Swordfish
Yellow Swordfish
Member

Odd really. According to that script, Bootstrap should get loaded in the header.
Can I have a link to the forum page? Don’t need to be able to post – just want to see the script ordering on load.

JH Joseph Harford
Joseph Harford
Member

It seems to be fixed, I’m trying to narrow the problem down to a particular plugin and I will post the results here. 

Thanks

YS Yellow Swordfish
Yellow Swordfish
Member

Very curious to know your solution…

JH Joseph Harford
Joseph Harford
Member

So the problem is because of the K-Elements plugin, which is part of the Kleo theme. 

I will have to look deeper to find the cause, but for now I just removed the plugin. 

What it does is add a load of shortcodes you can use. 

YS Yellow Swordfish
Yellow Swordfish
Member

Curious. The inly possibility I can come up with is that as a part of that plugin it is loading the jQuery UI and doing it BEFORE SP gets the request to do it which might then be putting it in the header before the Bootstrap is being loaded. SP will not then load it as well.