Skip to content

Function Reference: horizon_build_twitter_link

Joe McKie edited this page Jul 31, 2013 · 1 revision

Description

Builds a clickable Twitter link from a given username. The username can be formatted as @username, http://www.twitter.com/username, or username. Returns a clickable anchor to the users profile.

Usage

<?php echo horizon_build_twitter_link( $username ); ?>

Parameters

$username
  (string) (required) The username to build an anchor for.
    Default: None

Return values

(string)
  A clickable anchor to the given profile.

Example

Username only

<?php echo horizon_build_twitter_link( 'joemckiewebdev' ); ?>

Returns:

@joemckiewebdev


Username URL

<?php echo horizon_build_twitter_link( 'http://www.twitter.com/joemckiewebdev' ); ?>

Returns:

@joemckiewebdev


Username with @

<?php echo horizon_build_twitter_link( '@joemckiewebdev' ); ?>

Returns:

@joemckiewebdev

Description

Outputs the HTML of a selected dynamic sidebar. For use in functions and templates where dynamic_sidebar() would output incorrectly.

Usage

<?php echo horizon_get_dynamic_sidebar( $sidebar ); ?>

Parameters

$sidebar
  (string) (required) The sidebar name.
    Default: None

Example

<div class="twelve columns">
  <?php echo horizon_get_dynamic_sidebar( 'Footer 1' ); ?>
</div>

This will output the HTML contents of the sidebar named 'Footer 1' into the container.

Clone this wiki locally