Beispiel #1
0
/**
 * Adds all non-conditional JS files used by Suffusion. Unlike styles, conditional JS files are not loaded because there is no
 * "script_loader_tag" filter hook analogous to the "style_loader_tag" filter hook.
 *
 * @return void
 */
function suffusion_enqueue_scripts()
{
    if (is_admin()) {
        return;
    }
    suffusion_include_featured_js();
    suffusion_include_jqfix_js();
    suffusion_include_bp_js();
    suffusion_include_custom_js_files();
    if (suffusion_should_include_dbx()) {
        wp_enqueue_script('suffusion-dbx', get_template_directory_uri() . '/dbx.js', array(), null);
    }
}
Beispiel #2
0
function suffusion_include_dbx()
{
    if (suffusion_should_include_dbx()) {
        get_template_part('custom/dbx');
    }
}
Beispiel #3
0
<?php

/**
 * Code to include the docking boxes script. This has been moved out to a separate file so as to be included only when required.
 *
 * @since 3.9.3
 * @package Suffusion
 * @subpackage Custom
 */
global $suf_sidebar_1_dnd, $suf_sidebar_2_dnd, $suf_sidebar_1_expcoll, $suf_sidebar_2_expcoll, $suf_sidebar_count, $suf_wa_sb2_style;
if (suffusion_should_include_dbx()) {
    $expcoll_1 = $suf_sidebar_1_expcoll == "enabled" ? "yes" : "no";
    $expcoll_2 = $suf_sidebar_2_expcoll == "enabled" ? "yes" : "no";
    ?>
<!-- Sidebar docking boxes (dbx) by Brothercake - http://www.brothercake.com/ -->
<script type="text/javascript">
/* <![CDATA[ */
window.onload = function() {
	//initialise the docking boxes manager
	var manager = new dbxManager('main'); 	//session ID [/-_a-zA-Z0-9/]

<?php 
    if ($suf_sidebar_1_dnd == "enabled") {
        ?>
	//create new docking boxes group
	var sidebar = new dbxGroup(
		'sidebar', 		// container ID [/-_a-zA-Z0-9/]
		'vertical', 		// orientation ['vertical'|'horizontal']
		'7', 			// drag threshold ['n' pixels]
		'no',			// restrict drag movement to container axis ['yes'|'no']
		'10', 			// animate re-ordering [frames per transition, or '0' for no effect]