The MU forums have moved to WordPress.org

Sytax to Check Blog URL in Conditional Statement? (1 post)

  1. awarner20
    Member
    Posted 14 years ago #

    Hi all,

    I am using the Sliding Panel plugin by Justin Tadlock and have it activated on a few subdomain blogs. This plugin displays a tab on the top right of the blog that says "Open" and when clicked drops down and displays a widgetized content area. It's pretty useful when using the Sidebar Login plugin inside this widget area. You can see it used on Justin's site here: http://themehybrid.com/

    Anyway, I have a couple subdomain blogs that are in a different language and I'm trying to change the "Open" text on that tab depending on what blog you're on. I'm editing the plugin file and trying to create a Conditional to check the url.

    I wonder if anyone can assist me?

    The plugin code I need to edit is:

    function get_sliding_panel() {
    
    if ( is_active_sidebar( 'sliding-panel' ) ) : ?>
    
    <div id="sliding-panel-container"><div id="sliding-panel">
    
    	<div class="panel">
    		<div class="panel-content">
    			<?php dynamic_sidebar( 'sliding-panel' ); ?>
    			</div>
    		</div>
    
    <div class="tab">
    	<div class="toggle">
    		<a class="open" title="<?php _e('Open panel', 'sliding-panel'); ?>"><?php _e('Open <span class="arrow">&darr;</span>', 'sliding-panel'); ?></a>
    				<a class="close" title="<?php _e('Close panel', 'sliding-panel'); ?>" style="display: none;"><?php _e('Close <span class="arrow">&uarr;</span>', 'sliding-panel'); ?></a>
    			</div>
    		</div>
    
    	</div></div>
    
    	<?php endif;
    }

    I'm pretty sure I need to put a conditional right before the:
    if ( is_active_sidebar( 'sliding-panel' ) ) : ?>

    Something like this?:
    if ( is_page( 'http://french-lang-url.com' )) : ?>

    or this?:
    Something like this?:
    if ( is_blog_url( 'http://french-lang-url.com' )) : ?>

    Can someone tell me if I'm on the right track?

About this Topic

  • Started 14 years ago by awarner20