WordPress.org

Support

Support » Plugins and Hacks » [Resolved] slide url, error in flexslider-hg.php

[Resolved] slide url, error in flexslider-hg.php

Viewing 2 replies - 1 through 2 (of 2 total)
  • maxgx
    Participant

    @maxgx

    while at it, i’ve added a checkbox to the Slide Settings in case one wants the link to open in a new window:

    around line 125:

    $url = get_post_meta( get_the_ID(), "_slide_link_url", true );
    $target = get_post_meta( get_the_ID(), "_slide_link_target", true );
    if ($target) {
        $a_tag_opening = '<a href="' . $url . '" title="' . the_title_attribute( array('echo' => false) ) . '" target="_blank" >';
    } else {
        $a_tag_opening = '<a href="' . $url . '" title="' . the_title_attribute( array('echo' => false) ) . '" >';
    }

    (not sure that’s the cleanest implementation but it does work)

    line 205:

    $slide_link_url = get_post_meta( $post->ID, '_slide_link_url', true );
    $slide_link_target = get_post_meta( $post->ID, '_slide_link_target', true );

    line 209:

    <p>URL: <input type="text" style="width: 90%;" name="slide_link_url" value="<?php echo esc_attr( $slide_link_url ); ?>" /></p>
    <span class="description"><?php echo _e( 'The URL this slide should link to.', 'flexslider_hg' ); ?></span>
    <p><input type="checkbox" name="slide_link_target" <?php if( $slide_link_target == true ) { ?>checked="checked"<?php } ?> /> Opens in new window</p>

    Plugin Author Hal Gatewood
    Participant

    @halgatewood

    Thanks maxgx, I’ll get this stuff added to the plugin.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] slide url, error in flexslider-hg.php’ is closed to new replies.