Skip to content

Instantly share code, notes, and snippets.

//Line 2055
if ( 'parallax' == $row->settings->bg_type && ! empty( $row->settings->bg_parallax_image_src ) ) {
$attrs['data-parallax-speed'] = $row->settings->bg_parallax_speed;
$attrs['data-parallax-image'] = $row->settings->bg_parallax_image_src;
$attrs['data-parallax-offset'] = $row->settings->bg_parallax_offset;
}
//line 199, function admin_head() should be changed from this:
function admin_head() {
if ( !isset( $_GET['page'] ) || 'customer-editor' != $_GET['page'] )
return;
wp_enqueue_script( 'jquery-ui-datepicker' );
function show_download_links() {
if (is_product()) {
global $product;
$downloads = $product->get_files();
foreach( $downloads as $key => $each_download ) {
echo '<a href="'.$each_download["file"].'">Download</a>';
}
}
add_shortcode('download_links', 'show_download_links');
function template(
return sprintf('<div class="carousel data-speed="5000">Hello</div>');
}
<?php
return ob_get_clean();
}
function scripts(){
ob_start(); ?>
<script type="text/javascript">
(function($) {
$('#<?php echo $name; ?>').carousel({ interval: <?php echo $speed; ?> })
})(jQuery);
</script>
@MrFent
MrFent / code
Last active March 23, 2016 18:06
<?php
class DMS_pl_carousel_shortcode extends PL_Shortcode{
function template() {
$variable_to_pass = $atts['name'];
}
function scripts() {
$hello = $this->template->variable_to_pass;
echo $hello;;
}