• John

    (@johnstevenspendleton)


    I did some hacks a while back to get pretty photo to launch some gallery light boxes on my site. I have now found that every button on my site is trying to launch Pretty Photo and the links now do not work. can anyone help with this?

    Page link where I do not want pretty photo to work:
    http://www.johnpendleton.com/jpportfolio/employment/

    Shortcode that I updated: (pretty photo code at bottom)
    /*
    ** PrettyButton Shortcode
    */
    if(!function_exists(‘rockthemes_shortcode_make_button’)){
    function rockthemes_shortcode_make_button($atts, $content=null){
    extract( shortcode_atts( array(
    “icon_align”=>”left”,
    “icon_size”=>””,
    “icon_title”=>””,
    “button_align”=>””,
    “button_size”=>””,
    “button_color”=>””,
    “button_flat”=>”no”,
    “button_shape”=>””,
    “button_wrap”=>””,
    “button_link_target”=>””,
    “link_url”=>””,
    “link_id”=>””,
    “link_is_tax”=>””,
    “tax_name”=>””,
    “icon_class”=>””,
    “icon_url”=>””,
    “gallery_name” => “”

    ), $atts ) );

    wp_enqueue_style(‘quasar-buttons’, F_WAY.’/css/buttons.css’, ”,”, ‘all’);
    //wp_enqueue_script(‘quasar-buttons’, F_WAY.’/js/buttons.js’, array(‘jquery’));

    $link_active = false;
    $link_html = ”;
    $link_icon_html = ”;

    if($link_url !== ‘false’){
    $link_html = $link_url;
    $link_active = true;
    }elseif($link_id !== ‘false’){
    if($link_is_tax !== ‘false’){
    $tax = get_category_by_slug($link_id);
    if(!$tax){
    $tax = get_term_link($link_id,$tax_name);
    }else{
    $tax = get_category_link($tax);
    }
    $link_html = $tax;
    }else{
    $link_html = get_permalink($link_id);
    }
    $link_active = true;
    }

    $button_is_else_flat = ‘button’;
    if($button_flat == ‘yes’) $button_is_else_flat = ‘button-flat’;
    if($button_color !== ”) $button_is_else_flat .= ‘-‘.$button_color;

    $icon_html = ”;
    $icon_used = false;

    if($icon_class != ”){
    $icon_html = ‘ <i class=”‘.$icon_class.’ ‘.$icon_size.'”></i> ‘;
    $icon_used = true;
    }elseif($icon_url != ”){
    $icon_html = ‘ <img src=”‘.$icon_url.'” /> ‘;
    $icon_used = true;
    }

    $return = ”;

    $button_align_html = ”;

    if($button_align !== ‘block’){
    $button_align_html = ‘ float:’.$button_align.’;’;
    }elseif($button_align === ‘block’){
    $button_align_html = ‘ display:’.$button_align.’;’;
    }

    if($button_wrap == ‘yes’){
    if($button_align === ‘block’){
    $return .= ‘<span class=”button-wrap” style=”display:block;”>’;
    }else{
    $return .= ‘<span class=”button-wrap”>’;
    }
    }

    $button_large_style = ”;

    if($button_size === ‘button-large’){
    $button_large_style = ‘ padding:15px;’;
    }

    $return .= ‘
    <a href=”‘.$link_html.'”
    ‘.($button_link_target == “_blank” ? ‘target=”_blank”‘ : ”).’
    style=”‘.$button_align_html.$button_large_style.'”
    class=”escapea button
    ‘.($button_shape != “” ? $button_shape.” ” : “”). ‘
    ‘.$button_is_else_flat. ‘
    ‘.$button_size. ‘
    ” rel=”prettyPhoto[‘ . $gallery_name . ‘]”>
    ‘.($icon_align == “left” ? $icon_html : ”).’
    ‘.$content.’
    ‘.($icon_align == “right” ? $icon_html : ”).’
    ‘;

    if($button_wrap == ‘yes’) $return .= ‘</span>’; //Close button wrap span

    return $return;
    }
    }
    add_shortcode(‘rockthemes_button_prettyPhoto’,’rockthemes_shortcode_make_button’);

    /*
    ** End of PrettyButton Shortcode
    */

The topic ‘Pretty Photo’ is closed to new replies.