Example #1
0
function iva_post_fslider($atts, $content = null)
{
    extract(shortcode_atts(array('id' => '1', 'width' => '300', 'height' => '150', 'effect' => 'fade', 'speed' => '500', 'limits' => '', 'navigation' => 'true', 'cat' => ''), $atts));
    wp_print_scripts('jquery_flex');
    wp_enqueue_style('flexslider-style');
    $pausetime = '';
    $id = rand(20, 200);
    post_postflex_scripts($height, $speed, $width, $id, $effect, $pausetime, $navigation);
    $out = '<div class="flexslider' . $id . ' flexslider">';
    $out .= '<ul class="slides">';
    global $post;
    $pid = $post->ID;
    $attachments = get_children("post_parent={$post->ID}&post_type=attachment&post_mime_type=image&numberposts={$limits}&orderby=menu_order ASC, ID ASC");
    $img_alt_title = get_the_title();
    $width = (int) $width;
    $height = (int) $height;
    foreach ($attachments as $id => $attachment) {
        $full_attachment = wp_get_attachment_image_src($attachment->ID, 'full');
        $out .= '<li>';
        $out .= atp_resize('', $full_attachment[0], $width, $height, '', $img_alt_title);
        $out .= '</li>';
    }
    $out .= '</ul></div>';
    return $out;
    wp_reset_query();
}
Example #2
0
/**
 * Parse the Cue shortcode for display within a TinyMCE view.
 *
 * @since 1.3.0
 */
function cue_ajax_parse_shortcode()
{
    global $wp_scripts;
    if (empty($_POST['shortcode'])) {
        wp_send_json_error();
    }
    $shortcode = do_shortcode(wp_unslash($_POST['shortcode']));
    if (empty($shortcode)) {
        wp_send_json_error(array('type' => 'no-items', 'message' => __('No items found.')));
    }
    $head = '';
    $styles = wpview_media_sandbox_styles();
    foreach ($styles as $style) {
        $head .= '<link type="text/css" rel="stylesheet" href="' . $style . '">';
    }
    $head .= '<link rel="stylesheet" href="' . CUE_URL . 'assets/css/cue.min.css' . '">';
    $head .= '<style type="text/css">.cue-tracks { max-height: none;}</style>';
    if (!empty($wp_scripts)) {
        $wp_scripts->done = array();
    }
    ob_start();
    echo $shortcode;
    wp_print_scripts('cue');
    wp_send_json_success(array('head' => $head, 'body' => ob_get_clean()));
}
Example #3
0
    function getScriptsStyles()
    {
        ?>
        <link rel='stylesheet' href='<?php 
        $urlblog = get_bloginfo('wpurl');
        echo $urlblog;
        ?>
/wp-admin/load-styles.php?c=1&amp;dir=ltr&amp;load=widgets,global,wp-admin' type='text/css' media='all' />
        <link rel='stylesheet' id='colors-css'  href='<?php 
        echo $urlblog;
        ?>
/wp-admin/css/colors-fresh.css' type='text/css' media='all' />
        <!--[if lte IE 7]>
        <link rel='stylesheet' id='ie-css'  href='<?php 
        echo $urlblog;
        ?>
/wp-admin/css/ie.css' type='text/css' media='all' />
        <![endif]-->
        <link rel='stylesheet'  href='<?php 
        echo $urlblog;
        ?>
/wp-content/plugins/wysija-newsletters/css/tmce/widget.css' type='text/css' media='all' />
        <?php 
        wp_print_scripts('jquery');
        ?>
        <script type="text/javascript" src="<?php 
        echo $urlblog;
        ?>
/wp-includes/js/tinymce/tiny_mce_popup.js"></script>
        <script type='text/javascript' src='<?php 
        echo $urlblog;
        ?>
/wp-content/plugins/wysija-newsletters/js/admin-tmce.js'></script>
        <?php 
    }
Example #4
0
    function wrap($content)
    {
        $html = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/11">
<meta name="robots" content="NOINDEX,NOFOLLOW">
<meta charset="utf-8" />
<title>' . __('Wysija Subscription', WYSIJA) . '</title>';
        global $wp_scripts, $wp_styles;
        ob_start();
        //if(isset($_REQUEST['external_site'])) wp_head();
        wp_print_scripts('jquery');
        wp_print_styles('validate-engine-css');
        //add custom css for external site iframe
        if (isset($_REQUEST['external_site']) && file_exists(WYSIJA_UPLOADS_DIR . 'css' . DS . 'iframe.css')) {
            wp_register_style('wysija-iframe', WYSIJA_UPLOADS_URL . "css/iframe.css", array(), WYSIJA::get_version());
            wp_print_styles('wysija-iframe');
        }
        wp_print_scripts('wysija-validator-lang');
        wp_print_scripts('wysija-validator');
        wp_print_scripts('wysija-front-subscribers');
        $html .= ob_get_contents();
        ob_end_clean();
        $html .= '</head><body>';
        if (isset($_REQUEST['external_site'])) {
            $classform = '';
        } else {
            $classform = ' iframe-hidden';
        }
        $html .= '<div class="wysija-frame' . $classform . '" >' . $content . '</div>';
        $html .= '</body></html>';
        return $html;
    }
/**
 * Include the Social Library
 */
function oa_social_login_add_javascripts()
{
    //Read the plugin settings.
    $settings = get_option('oa_social_login_settings');
    //Without the subdomain we can't include the libary.
    if (!empty($settings['api_subdomain'])) {
        //Forge library path.
        $oneall_js_library = (oa_social_login_https_on() ? 'https' : 'http') . '://' . $settings['api_subdomain'] . '.api.oneall.com/socialize/library.js';
        // Synchronous JavaScript: This is the default to stay compatible with existing installations.
        if (empty($settings['asynchronous_javascript'])) {
            //Make sure the library has not yet been included.
            if (!wp_script_is('oa_social_library', 'registered')) {
                //Include in header, without having the version appended
                wp_register_script('oa_social_library', $oneall_js_library, array(), null, false);
            }
            wp_print_scripts('oa_social_library');
        } else {
            //JavaScript Method Reference: http://docs.oneall.com/api/javascript/library/methods/
            $output = array();
            $output[] = '';
            $output[] = " <!-- OneAll.com / Social Login for WordPress / v" . constant('OA_SOCIAL_LOGIN_VERSION') . " -->";
            $output[] = '<script type="text/javascript">';
            $output[] = " (function() {";
            $output[] = "  var oa = document.createElement('script'); oa.type = 'text/javascript';";
            $output[] = "  oa.async = true; oa.src = '" . $oneall_js_library . "';";
            $output[] = "  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(oa, s);";
            $output[] = " })();";
            $output[] = "</script>";
            $output[] = '';
            //Display
            echo implode("\n", $output);
        }
    }
}
 static function print_script()
 {
     if (!self::$add_script) {
         return;
     }
     wp_print_scripts('my-script');
 }
Example #7
0
    function Scripts()
    {
        $id = $this->id;
        wp_print_scripts('plupload-handlers');
        ?>
		
<script type="text/javascript">
//<![CDATA[

function uploadProgress(up, file) {
	var item = jQuery('#file-upload-progress');
	jQuery('.bar', item).width( (200 * file.loaded) / file.size );
	jQuery('.percent', item).html( file.percent + '%' );

	if ( file.percent == 100 ) {
		item.html('<strong class="crunching">' + '<?php 
        _e('File %s uploaded.', WPFB);
        ?>
'.replace(/%s/g, file.name) + '</strong>');
	}
}
	
//]]>
</script>
<?php 
    }
function tm_js_admin_header()
{
    // use JavaScript SACK library for Ajax
    wp_print_scripts(array('sack'));
    ?>
	<script type="text/javascript">
		//<![CDATA[
		function loadAnalytics(url, row, button) {

			if (button.value == 'View Analytics') {
    			var mysack = new sack("<?php 
    bloginfo('wpurl');
    ?>
/wp-admin/admin-ajax.php");
				mysack.execute = 1;
				mysack.method = 'POST';
				mysack.setVar("action", "tm_ajax_elev_lookup");
				mysack.setVar("url", url);
				mysack.setVar("id", 't' + row);
				mysack.onError = function() {
					alert('Ajax error in looking up url');
				};
				mysack.runAJAX();
			}

  			return true;
		}
		//]]>
	</script>
<?php 
}
function bp_core_confirmation_js()
{
    if (is_multisite() && !bp_is_root_blog()) {
        return false;
    }
    if (!wp_script_is('jquery')) {
        wp_enqueue_script('jquery');
    }
    if (!wp_script_is('jquery', 'done')) {
        wp_print_scripts('jquery');
    }
    ?>

	<script type="text/javascript">
		jQuery( document ).ready( function() {
			jQuery( 'a.confirm').click( function() {
				if ( confirm( '<?php 
    _e('Are you sure?', 'buddypress');
    ?>
' ) )
					return true; else return false;
			});
		});
	</script>

<?php 
}
function disable_parent_menu_link()
{
    wp_print_scripts('jquery');
    ?>
      <script type="text/javascript">
	if (jQuery("li.page_item").has("ul.children").length > 0) {
	  jQuery("li.page_item").has("ul.children").hover(function () {
            jQuery(this).children("a").removeAttr('href');
            jQuery(this).children("a").css('cursor', 'pointer');
            jQuery(this).children("a").click(function () {
              return false;
            });
          });
 	}
	else if (jQuery("li.menu-item").has("ul.sub-menu").length > 0) {
          jQuery("li.menu-item").has("ul.sub-menu").hover(function () {
            jQuery(this).children("a").removeAttr('href');
            jQuery(this).children("a").css('cursor', 'pointer');
            jQuery(this).children("a").click(function () {
              return false;
            });
          });
	}
      </script> 
<?php 
}
/**
 * Add js to front side.
 */
function facebookall_front_scripts()
{
    $fball_settings = get_option('fball_settings');
    if ($fball_settings['share_pin'] == '1') {
        wp_register_script('pinjs', 'http://assets.pinterest.com/js/pinit.js', false, '1.4.2');
        wp_enqueue_script('pinjs');
    }
    if ($fball_settings['share_linkedin'] == '1') {
        wp_register_script('linkedinjs', 'http://platform.linkedin.com/in.js', false, '1.4.2');
        wp_enqueue_script('linkedinjs');
    }
    if ($fball_settings['share_twitter'] == '1') {
        wp_register_script('twitterjs', 'http://platform.twitter.com/widgets.js', false, '1.4.2');
        wp_enqueue_script('twitterjs');
    }
    if ($fball_settings['share_gplus'] == '1') {
        wp_register_script('gplusjs', 'https://apis.google.com/js/plusone.js', false, '1.4.2');
        wp_enqueue_script('gplusjs');
    }
    if (!wp_script_is('connect_js', 'registered')) {
        wp_register_script('connect_js', plugins_url('assets/js/fball_connect.js', __FILE__), false, '1.0.0');
    }
    wp_print_scripts("connect_js");
    //wp_enqueue_script('connect_js');
}
 /**
  * Load JS
  */
 static function print_enqueue()
 {
     if (!self::$do_enqueue) {
         return;
     }
     wp_print_scripts('responsive-video-js');
 }
function html_quicktags()
{
    $output = "<script type='text/javascript'>\n\n\t/* <![CDATA[ */ \n";
    wp_print_scripts('quicktags');
    $buttons = array();
    /*$buttons[] = array(
    		'name' => 'raw',
    		'options' => array(
    			'display_name' => 'raw',
    			'open_tag' => '\n[raw]',
    			'close_tag' => '[/raw]\n',
    			'key' => ''
    	));*/
    $buttons[] = array('name' => 'one_whole', 'options' => array('display_name' => 'Full width', 'open_tag' => '\\n[one_whole]', 'close_tag' => '[/one_whole]\\n', 'key' => ''));
    $buttons[] = array('name' => 'one_third', 'options' => array('display_name' => 'one third', 'open_tag' => '\\n[one_third]', 'close_tag' => '[/one_third]\\n', 'key' => ''));
    $buttons[] = array('name' => 'two_third', 'options' => array('display_name' => 'two third', 'open_tag' => '\\n[two_third]', 'close_tag' => '[/two_third]\\n', 'key' => ''));
    $buttons[] = array('name' => 'one_half', 'options' => array('display_name' => 'one half', 'open_tag' => '\\n[one_half]', 'close_tag' => '[/one_half]\\n', 'key' => ''));
    $buttons[] = array('name' => 'one_fourth', 'options' => array('display_name' => 'one fourth', 'open_tag' => '\\n[one_fourth]', 'close_tag' => '[/one_fourth]\\n', 'key' => ''));
    $buttons[] = array('name' => 'three_fourth', 'options' => array('display_name' => 'three fourth', 'open_tag' => '\\n[three_fourth]', 'close_tag' => '[/three_fourth]\\n', 'key' => ''));
    $buttons[] = array('name' => 'one_sixth', 'options' => array('display_name' => 'one sixth', 'open_tag' => '\\n[one_sixth]', 'close_tag' => '[/one_sixth]\\n', 'key' => ''));
    $buttons[] = array('name' => 'five_twelveth', 'options' => array('display_name' => 'five twelveth', 'open_tag' => '\\n[five_twelveth]', 'close_tag' => '[/five_twelveth]\\n', 'key' => ''));
    $buttons[] = array('name' => 'seven_twelveth', 'options' => array('display_name' => 'seven twelveth', 'open_tag' => '\\n[seven_twelveth]', 'close_tag' => '[/seven_twelveth]\\n', 'key' => ''));
    $buttons[] = array('name' => 'one_twelveth', 'options' => array('display_name' => 'one twelveth', 'open_tag' => '\\n[one_twelveth]', 'close_tag' => '[/one_twelveth]\\n', 'key' => ''));
    $buttons[] = array('name' => 'eleven_twelveth', 'options' => array('display_name' => 'eleven twelveth', 'open_tag' => '\\n[eleven_twelveth]', 'close_tag' => '[/eleven_twelveth]\\n', 'key' => ''));
    $buttons[] = array('name' => 'five_sixth', 'options' => array('display_name' => 'five sixth', 'open_tag' => '\\n[five_sixth]', 'close_tag' => '[/five_sixth]\\n', 'key' => ''));
    $buttons[] = array('name' => 'row', 'options' => array('display_name' => 'Insert Row', 'open_tag' => '\\n[row]', 'close_tag' => '[/row]\\n', 'key' => ''));
    $buttons[] = array('name' => 'clear', 'options' => array('display_name' => 'Clear Float', 'open_tag' => '[clear /]', 'close_tag' => '', 'key' => ''));
    for ($i = 0; $i <= count($buttons) - 1; $i++) {
        $output .= "edButtons[edButtons.length] = new edButton('ed_{$buttons[$i]['name']}'\n\t\t\t,'{$buttons[$i]['options']['display_name']}'\n\t\t\t,'{$buttons[$i]['options']['open_tag']}'\n\t\t\t,'{$buttons[$i]['options']['close_tag']}'\n\t\t\t,'{$buttons[$i]['options']['key']}'\n\t\t); \n";
    }
    $output .= "\n /* ]]> */ \n\n\t</script>";
    echo $output;
}
function wp_affiliate_js_admin_header()
{
    // use JavaScript SACK library for Ajax
    wp_print_scripts(array('sack'));
    // Define custom JavaScript function
    ?>
<script type="text/javascript">
//<![CDATA[
function wp_affiliate_ajax_add_link( link, text, category )
{
   var mysack = new sack( 
       "<?php 
    bloginfo('wpurl');
    ?>
/wp-admin/admin-ajax.php" );    

  mysack.execute = 1;
  mysack.method = 'POST';
  mysack.setVar( "action", "wp_affiliate_add_link" );
  mysack.setVar( "link", link.value );
  mysack.setVar( "text", text.value );
  mysack.setVar( "category", category );
  mysack.encVar( "cookie", document.cookie, false );
  mysack.onError = function() { alert('Ajax error in adding affiliate link' )};
  mysack.runAJAX();

  return true;

} // end of JavaScript function
//]]>
</script>
<?php 
}
    function Scripts($prefix)
    {
        $id = $this->id;
        wp_print_scripts('swfupload-all');
        wp_print_scripts('swfupload-handlers');
        ?>
		
<script type="text/javascript">
//<![CDATA[

function uploadProgress(fileObj, bytesDone, bytesTotal) {
	var w = jQuery('#file-upload-progress').width() - 2, item = jQuery('#file-upload-progress');
	jQuery('.bar', item).width( w * bytesDone / bytesTotal );
	jQuery('.percent', item).html( Math.ceil(bytesDone / bytesTotal * 100) + '%' );

	if ( bytesDone == bytesTotal ) {
		jQuery('.bar', item).html('<strong class="crunching">' + '<?php 
        _e('File %s uploaded.', WPFB);
        ?>
'.replace(/%s/g, fileObj.name) + '</strong>');
		jQuery('.filename', '#file-upload-progress').hide();
	}
}
	
//]]>
</script>
<?php 
    }
    public function outputScripts()
    {
        if (empty($this->_post_brushes)) {
            return;
        }
        echo "<!-- Auto SyntaxHighlighter -->\n";
        if (!$this->_html_script) {
            wp_print_scripts('ash_autoloader');
        } else {
            wp_print_scripts('ash_brush_xml');
        }
        wp_print_styles('ash_theme_' . $this->_themes);
        ?>

<script type='text/javascript'>
SyntaxHighlighter.autoloader(
<?php 
        $brushes_script = '';
        foreach ($this->_brushes as $k => $v) {
            $brushes_script .= "\t" . '\'' . $v[0] . '	' . ASH_PLUGIN_URL . 'SyntaxHighlighter/build/scripts/' . $v[1] . '\',' . "\n";
        }
        $brushes_script = substr($brushes_script, 0, -2);
        echo $brushes_script . "\n";
        ?>

);
SyntaxHighlighter.defaults['auto-links'] = false;
SyntaxHighlighter.defaults['toolbar'] = false;
SyntaxHighlighter.all();
</script>
<!-- /Auto SyntaxHighlighter -->
<?php 
    }
Example #17
0
function wp_connect_script_page()
{
    wp_deregister_script('jquery');
    wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js', false, '1.4.2');
    wp_register_script('wp-connect-page', plugins_url('wp-connect/js/page.js'), array('jquery'), '0.1');
    wp_print_scripts('wp-connect-page');
}
 /**
  * Add pointer script
  *
  * @action wpem_print_footer_scripts_theme
  */
 public function print_footer_scripts()
 {
     wp_print_styles('wp-pointer');
     wp_print_scripts('wp-pointer');
     wp_print_scripts('wpem-pointers');
     wp_print_scripts('wpem-theme');
 }
    public function display()
    {
        if (isset($_GET['form_id']) && isset($_GET['test_theme'])) {
            wp_print_scripts('jquery');
            wp_print_scripts('jquery-ui-widget');
            wp_print_scripts('jquery-effects-shake');
            ?>
      <script src="https://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
      <script src="<?php 
            echo WD_CFM_URL . '/js/if_gmap_front_end.js';
            ?>
" type="text/javascript"></script>
      <script src="<?php 
            echo WD_CFM_URL . '/js/cfm_main_front_end.js';
            ?>
" type="text/javascript"></script>
      <link media="all" type="text/css" href="<?php 
            echo WD_CFM_URL . '/css/jquery-ui-1.10.3.custom.css';
            ?>
" rel="stylesheet">
      <link media="all" type="text/css" href="<?php 
            echo WD_CFM_URL . '/css/contact_form_maker_frontend.css';
            ?>
" rel="stylesheet">
      <?php 
            $form_id = esc_html(stripslashes($_GET['form_id']));
            $theme_id = esc_html(stripslashes($_GET['test_theme']));
            require_once WD_CFM_DIR . '/frontend/controllers/CFMControllerForm_maker.php';
            $controller = new CFMControllerForm_maker();
            echo $controller->execute($form_id, $theme_id);
        }
        die;
    }
Example #20
0
 /**
  * constructor
  *
  * @param none
  * @return void
  */
 public function __construct()
 {
     global $my5280, $wpdb;
     $wpdb->show_errors();
     $this->loadLibraries();
     // Activation and upgrade hook
     register_activation_hook(__FILE__, array($this, 'install'));
     add_action('plugins_loaded', array($this, 'install'));
     // Register the 5280 Pool League "sport"
     add_filter('leaguemanager_sports', array($this, 'sports'));
     // Register actions
     add_action('league_settings_5280pool', array($this, 'settings'));
     add_action('wp_head', function () {
         wp_register_script('storageapi', WP_PLUGIN_URL . '/my5280/jquery.storageapi.min.js', array('jquery'), '1.7.2');
         wp_register_script('my5280', WP_PLUGIN_URL . '/my5280/my5280.js', array('storageapi'), '0.1');
         wp_print_scripts(array('storageapi', 'my5280'));
     });
     add_action('wp_ajax_my5280_update_scoresheet', array($this, 'updateScoresheet'));
     add_action('wp_ajax_my5280_update_schedule', array($this, 'updateSchedule'));
     //add_action('cn_metabox_publish_atts', array($this, 'connectionsPublishAtts'));
     // Register short codes
     add_shortcode('my5280_schedule', array($this, 'showSchedule'));
     add_shortcode('my5280_standings', array($this, 'showStandings'));
     add_shortcode('my5280_rosters', array($this, 'showRosters'));
     add_shortcode('my5280_scoresheet', array($this, 'showScoresheet'));
     add_shortcode('my5280_league', array($this, 'showLeague'));
     if (is_admin()) {
         $this->adminPanel = new my5280AdminPanel();
     }
 }
 protected function content($atts, $content = null)
 {
     extract(shortcode_atts(array('mode' => '', 'effect' => '', "speed" => '', "pause" => '', 'autoplay' => '', 'controlnav' => '', 'pagernav' => '', 'customnav' => '', 'slide_count' => 1, 'el_id' => '', 'el_class' => '', 'css_animation' => '', 'anim_type' => '', 'anim_delay' => '', 'css' => ''), $atts));
     $sc_class = 'wt_services_slider_sc';
     $id = mt_rand(9999, 99999);
     if (trim($el_id) != false) {
         $el_id = esc_attr(trim($el_id));
     } else {
         $el_id = $sc_class . '-' . $id;
     }
     wp_print_scripts('wt-extend-bx-slider');
     wp_enqueue_style('wt-extend-bx-slider');
     $output = '';
     $autoplay !== "true" ? $autoplay = 'false' : '';
     $controlnav !== "true" ? $controlnav = 'false' : '';
     $pagernav !== "true" ? $pagernav = 'false' : '';
     $customnav !== "true" ? $customnav = 'false' : '';
     $pagernav == "true" && $customnav == "true" ? $bxCustomNav = ' data-bxCustomNav="wt_bxNav_' . $id . '"' : ($bxCustomNav = '');
     $el_class = esc_attr($this->getExtraClass($el_class));
     $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $sc_class . $el_class . vc_shortcode_custom_css_class($css, ' '), $this->settings['base']);
     $css_class .= $this->wt_sc->getWTCSSAnimationClass($css_animation, $anim_type);
     $anim_data = $this->wt_sc->getWTCSSAnimationData($css_animation, $anim_delay);
     $output .= '<div id="' . $el_id . '" class="' . $css_class . '"' . $anim_data . '>';
     if ($pagernav == "true" && $customnav == "true") {
         $output .= "\n\t\t\t" . '<div id="wt_bxNav_' . $id . '" class="wt_bxslider_nav wt_services_buttons">';
         for ($i = 1; $i <= $slide_count; $i++) {
             $icon = '';
             $current = $i - 1;
             isset($atts["icon_" . $i]) && $atts["icon_" . $i] != "" ? $icon = esc_html($atts["icon_" . $i]) : '';
             $output .= '<a data-slide-index="' . $current . '" href="#" class="servicesLink"><i class="' . $icon . '"></i></a>';
         }
         $output .= "\n\t\t\t" . '</div>';
     }
     $speed = (int) $speed;
     $pause = (int) $pause;
     $output .= "\n\t\t\t" . '<ul class="wt_bxslider" data-bx-mode="' . $mode . '" data-bx-effect="' . $effect . '" data-bx-speed="' . $speed . '" data-bx-pause="' . $pause . '" data-bx-autoPlay="' . $autoplay . '" data-bx-controlNav="' . $controlnav . '" data-bx-pagerNav="' . $pagernav . '" data-bx-customNav="' . $customnav . '"' . $bxCustomNav . '>';
     for ($i = 1; $i <= $slide_count; $i++) {
         $item_content = '';
         isset($atts["content_" . $i]) && $atts["content_" . $i] != "" ? $item_content = $atts["content_" . $i] : '';
         if ($item_content != '') {
             $item_content = wpb_js_remove_wpautop($item_content, true);
             // fix unclosed/unwanted paragraph tags in $content
         }
         isset($atts["target_" . $i]) && $atts["target_" . $i] == "true" ? $target = '_blank' : ($target = '_self');
         $output .= "\n\t\t\t\t" . '<li class="item"><div class="wt_services_slider">';
         if (isset($atts["name_" . $i]) && $atts["name_" . $i] != "") {
             $item_name = esc_html($atts["name_" . $i]);
             if (isset($atts["link_" . $i]) && $atts["link_" . $i] != "") {
                 $output .= "\n\t\t\t\t\t" . '<h3><a href="' . esc_url($atts["link_" . $i]) . '" title="' . $item_name . '" target="' . $target . '">' . $item_name . '</a></h3>';
             } else {
                 $output .= "\n\t\t\t\t\t" . '<h3>' . $item_name . '</h3>';
             }
         }
         $output .= "\n\t\t\t\t\t" . $item_content;
         $output .= "\t\t\t\t" . '</div></li>';
     }
     $output .= "\n\t\t\t" . '</ul>';
     $output .= "\n\t\t\t" . '</div>';
     return $output;
 }
Example #22
0
 /**
  * print_script function.
  * 
  * @access public
  * @static
  * @return void
  */
 static function print_script()
 {
     if (!self::$add_script) {
         return;
     }
     wp_print_scripts('ubc-collab-arts');
 }
 protected function content($atts, $content = null)
 {
     extract(shortcode_atts(array('mode' => '', 'effect' => '', "speed" => '', "pause" => '', 'autoplay' => '', 'controlnav' => '', 'pagernav' => '', 'img_size' => 'thumbnail', 'slide_count' => 1, 'el_id' => '', 'el_class' => '', 'css_animation' => '', 'anim_type' => '', 'anim_delay' => '', 'css' => ''), $atts));
     $sc_class = 'wt_testimonials_slider_sc';
     $id = mt_rand(9999, 99999);
     if (trim($el_id) != false) {
         $el_id = esc_attr(trim($el_id));
     } else {
         $el_id = $sc_class . '-' . $id;
     }
     wp_print_scripts('wt-extend-bx-slider');
     wp_enqueue_style('wt-extend-bx-slider');
     $output = '';
     $autoplay !== "true" ? $autoplay = 'false' : '';
     $controlnav !== "true" ? $controlnav = 'false' : '';
     $pagernav !== "true" ? $pagernav = 'false' : '';
     $el_class = esc_attr($this->getExtraClass($el_class));
     $css_class = apply_filters(VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, $sc_class . $el_class . vc_shortcode_custom_css_class($css, ' '), $this->settings['base']);
     $css_class .= $this->wt_sc->getWTCSSAnimationClass($css_animation, $anim_type);
     $anim_data = $this->wt_sc->getWTCSSAnimationData($css_animation, $anim_delay);
     $speed = (int) $speed;
     $pause = (int) $pause;
     $img_size = esc_html($img_size);
     $output .= '<div id="' . $el_id . '" class="' . $css_class . '"' . $anim_data . '>';
     $output .= "\n\t\t\t" . '<ul class="wt_bxslider" data-bx-mode="' . $mode . '" data-bx-effect="' . $effect . '" data-bx-speed="' . $speed . '" data-bx-pause="' . $pause . '" data-bx-autoPlay="' . $autoplay . '" data-bx-controlNav="' . $controlnav . '" data-bx-pagerNav="' . $pagernav . '">';
     for ($i = 1; $i <= $slide_count; $i++) {
         $item_content = '';
         $image = '';
         isset($atts["content_" . $i]) && $atts["content_" . $i] != "" ? $item_content = $atts["content_" . $i] : '';
         if ($item_content != '') {
             $item_content = wpb_js_remove_wpautop($item_content, true);
             // fix unclosed/unwanted paragraph tags in $content
         }
         if ($atts["image_" . $i] != NULL) {
             $image = $atts["image_" . $i];
             $img_id = preg_replace('/[^\\d]/', '', $image);
             $img = wpb_getImageBySize(array('attach_id' => $img_id, 'thumb_size' => $img_size, 'class' => 'wt_testimonial_image'));
         } else {
             $image = '';
         }
         isset($atts["target_" . $i]) && $atts["target_" . $i] == "true" ? $target = '_blank' : ($target = '_self');
         $output .= "\n\t\t\t\t" . '<li class="item">';
         if ($image != '') {
             $output .= "\n\t\t\t\t\t" . $img['thumbnail'];
         }
         $output .= "\n\t\t\t\t\t" . $item_content;
         if (isset($atts["name_" . $i]) && $atts["name_" . $i] != "") {
             $item_name = esc_html($atts["name_" . $i]);
             if (isset($atts["link_" . $i]) && $atts["link_" . $i] != "") {
                 $output .= "\n\t\t\t\t\t" . '<h3><a href="' . esc_url($atts["link_" . $i]) . '" title="' . $item_name . '" target="' . $target . '">' . $item_name . '</a></h3>';
             } else {
                 $output .= "\n\t\t\t\t\t" . '<h3>' . $item_name . '</h3>';
             }
         }
         $output .= "\t\t\t\t" . '</li>';
     }
     $output .= "\n\t\t\t" . '</ul>';
     $output .= "\n\t\t\t" . '</div>';
     return $output;
 }
/**
 * syl_header function.
 *
 * @description header function for themes to use
 * @access public
 * @since 1.0.0
 * @return void
 */
function syl_header()
{
    do_action('before_syl_header');
    wp_print_styles();
    wp_print_scripts();
    do_action('after_syl_header');
}
Example #25
0
function simplepopup_enqueue_editor()
{
    wp_enqueue_script('common');
    wp_enqueue_script('jquery-affect');
    wp_admin_css('thickbox');
    wp_print_scripts('post');
    wp_print_scripts('media-upload');
    wp_print_scripts('jquery');
    wp_print_scripts('jquery-ui-core');
    wp_print_scripts('jquery-ui-tabs');
    wp_print_scripts('tiny_mce');
    wp_print_scripts('editor');
    wp_print_scripts('editor-functions');
    /* Include thе link dialog functions */
    require_once ABSPATH . 'wp-admin/includes/internal-linking.php';
    wp_print_scripts('wplink');
    wp_print_styles('wplink');
    add_action('tiny_mce_preload_dialogs', 'wp_link_dialog');
    add_thickbox();
    wp_tiny_mce();
    wp_admin_css();
    wp_enqueue_script('utils');
    do_action("admin_print_styles-post-php");
    do_action('admin_print_styles');
    //remove_all_filters('mce_external_plugins');
}
Example #26
0
    function wrap($content)
    {
        $html = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/11">
<meta name="robots" content="NOINDEX,NOFOLLOW">
<meta charset="utf-8" />
<title>' . __('Wysija Subscription', WYSIJA) . '</title>';
        global $wp_scripts, $wp_styles;
        ob_start();
        wp_print_scripts('jquery');
        wp_print_styles('validate-engine-css');
        if (isset($_REQUEST['external_site'])) {
            $iframeJsUrl = $iframeCssUrl = false;
            //check if an iframe.css file exists in the site uploads/wysija/css/iframe.css or in MS blogs.dir/5/files/wysija/css/iframe.css
            if (file_exists(WYSIJA_UPLOADS_DIR . 'css' . DS . 'iframe.css')) {
                $iframeCssUrl = WYSIJA_UPLOADS_URL . 'css/iframe.css';
            } else {
                //if we are in a multisite check to see if there is a file defined in the main site
                if (is_multisite() && file_exists(WYSIJA_UPLOADS_MS_DIR . 'css' . DS . 'iframe.css')) {
                    $iframeCssUrl = WYSIJA_UPLOADS_MS_URL . 'css/iframe.css';
                }
            }
            $iframeCssUrl = apply_filters('wysija_iframe_css_url', $iframeCssUrl);
            //check if an iframe.js file exists in the site uploads/wysija/js/iframe.js or in MS blogs.dir/5/files/wysija/js/iframe.js
            if (file_exists(WYSIJA_UPLOADS_DIR . 'js' . DS . 'iframe.js')) {
                $iframeJsUrl = WYSIJA_UPLOADS_URL . 'js/iframe.js';
            } else {
                //if we are in a multisite check to see if there is a file defined in the main site
                if (is_multisite() && file_exists(WYSIJA_UPLOADS_MS_DIR . 'js' . DS . 'iframe.js')) {
                    $iframeJsUrl = WYSIJA_UPLOADS_MS_URL . 'js/iframe.js';
                }
            }
            $iframeJsUrl = apply_filters('wysija_iframe_js_url', $iframeJsUrl);
            //if an iframe file has been detected then load it
            if ($iframeCssUrl) {
                wp_register_style('wysija-iframe-css', $iframeCssUrl, array(), WYSIJA::get_version());
                wp_print_styles('wysija-iframe-css');
            }
            //if an iframe js file has been detected then load it
            if ($iframeJsUrl) {
                wp_register_style('wysija-iframe-js', $iframeJsUrl, array(), WYSIJA::get_version());
                wp_print_styles('wysija-iframe-js');
            }
        }
        wp_print_scripts('wysija-validator-lang');
        wp_print_scripts('wysija-validator');
        wp_print_scripts('wysija-front-subscribers');
        $html .= ob_get_contents();
        ob_end_clean();
        $html .= '</head><body>';
        if (isset($_REQUEST['external_site'])) {
            $classform = '';
        } else {
            $classform = ' iframe-hidden';
        }
        $html .= '<div class="wysija-frame' . $classform . '" >' . $content . '</div>';
        $html .= '</body></html>';
        return $html;
    }
Example #27
0
 /**
  * Print only resources queued for the Geo Mashup map frame.
  * 
  * Can be replaced with wp_head() to include all blog resources in
  * map frames.
  * 
  * @since 1.4
  */
 public static function head()
 {
     $styles = self::map_property('styles');
     wp_print_styles($styles);
     $scripts = self::map_property('scripts');
     wp_print_scripts($scripts);
 }
function sant_prettyadd($content)
{
    wp_print_scripts('jquery.prettyPhoto');
    wp_print_scripts('jquery.prettyPhoto.settings');
    $content = preg_replace("/<a/", "<a data-gal=\"prettyPhoto[gallery1]\"", $content, 1);
    return $content;
}
Example #29
0
function print_tooltip_scripts()
{
    wp_enqueue_style('gform_tooltip', GFCommon::get_base_url() . '/css/tooltip.css', null, GFCommon::$version);
    wp_enqueue_style('gform_font_awesome', GFCommon::get_base_url() . '/css/font-awesome.css', null, GFCommon::$version);
    wp_print_scripts('gform_tooltip_init');
    wp_print_styles('gform_tooltip', 'gform_font_awesome');
}
 function _social_print_scripts()
 {
     if (!$this->social_scripts) {
         return;
     }
     wp_print_scripts('social_form_js');
 }