Advertisement
Guest User

Untitled

a guest
Jan 29th, 2014
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.43 KB | None | 0 0
  1. function attitude_home_slogan() {  
  2.     global $attitude_theme_options_settings;
  3.    $options = $attitude_theme_options_settings;
  4.    
  5.     $attitude_home_slogan = '';
  6.     if( ( !$attitude_home_slogan = get_transient( 'attitude_home_slogan' ) ) && ( !empty( $options[ 'home_slogan1' ] ) || !empty( $options[ 'home_slogan2' ] ) ) ) {
  7.      
  8.         if ( "0" == $options[ 'disable_slogan' ] ) {
  9.             $attitude_home_slogan .= '<section class="slogan-wrap clearfix"><div class="container"><div class="slogan">';
  10.             if ( !empty( $options[ 'home_slogan1' ] ) ) {
  11.                 $attitude_home_slogan .= esc_html( icl_translate( 'wpml_custom', 'wpml_custom_slogan1', $options[ 'home_slogan1' ] ) );
  12.             }
  13.             if ( !empty( $options[ 'home_slogan2' ] ) ) {
  14.                 $attitude_home_slogan .= '<span>'.esc_html( icl_translate( 'wpml_custom', 'wpml_custom_slogan2', $options[ 'home_slogan2' ] ) ).'</span>';
  15.             }
  16.             $attitude_home_slogan .= '</div><!-- .slogan -->';
  17.             if ( !empty( $options[ 'button_text' ] ) && !empty( $options[ 'redirect_button_link' ] ) ) {
  18.                 $attitude_home_slogan .= '<a class="view-work" href="'.esc_url( $options[ 'redirect_button_link' ] ).'" title="'.esc_attr( $options[ 'button_text' ] ).'">'.esc_html( $options[ 'button_text' ] ).'</a><!-- .view-work -->';
  19.             }
  20.             $attitude_home_slogan .= '</div><!-- .container --></section><!-- .slogan-wrap -->';
  21.         }
  22.        
  23.     //set_transient( 'attitude_home_slogan', $attitude_home_slogan, 86940 );   
  24.     }
  25.     echo $attitude_home_slogan;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement