daily pastebin goal
15%
SHARE
TWEET

liad-head-n

zivit-drori Jan 21st, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /**
  3.  * The template for displaying the page header.
  4.  *
  5.  * @package OceanWP WordPress theme
  6.  */
  7.  
  8. // Exit if accessed directly
  9. if ( ! defined( 'ABSPATH' ) ) {
  10.     exit;
  11. }
  12.  
  13. // Return if page header is disabled
  14. if ( ! oceanwp_has_page_header() ) {
  15.     return;
  16. }
  17.  
  18. // Classes
  19. $classes = array( 'page-header' );
  20.  
  21. // Get header style
  22. $style = oceanwp_page_header_style();
  23.  
  24. // Add classes for title style
  25. if ( $style ) {
  26.     $classes[$style .'-page-header'] = $style .'-page-header';
  27. }
  28.  
  29. // Visibility
  30. $visibility = get_theme_mod( 'ocean_page_header_visibility', 'all-devices' );
  31. if ( 'all-devices' != $visibility ) {
  32.     $classes[] = $visibility;
  33. }
  34.  
  35. // Turn into space seperated list
  36. $classes = implode( ' ', $classes );
  37.  
  38. // Heading tag
  39. $heading = get_theme_mod( 'ocean_page_header_heading_tag', 'h1' );
  40. $heading = $heading ? $heading : 'h1';
  41. $heading = apply_filters( 'ocean_page_header_heading', $heading ); ?>
  42.  
  43. <?php do_action( 'ocean_before_page_header' ); ?>
  44.  
  45. <header class="<?php echo esc_attr( $classes ); ?>">
  46.  
  47.     <?php do_action( 'ocean_before_page_header_inner' ); ?>
  48.  
  49.     <div class="container clr page-header-inner">
  50.  
  51.         <?php
  52.         // Return if page header is disabled
  53.         if ( oceanwp_has_page_header_heading() ) { ?>
  54.  
  55.             <<?php echo esc_attr( $heading ); ?> class="page-header-title clr"<?php oceanwp_schema_markup( 'headline' ); ?>><?php echo wp_kses_post( oceanwp_title() ); ?></<?php echo esc_attr( $heading ); ?>>
  56.  
  57.             <?php get_template_part( 'partials/page-header-subheading' ); ?>
  58.  
  59.         <?php } ?>
  60.  
  61.         <?php if ( function_exists( 'oceanwp_breadcrumb_trail' ) ) {
  62.             oceanwp_breadcrumb_trail();
  63.         } ?>
  64.  
  65.     </div><!-- .page-header-inner -->
  66.  
  67.     <?php oceanwp_page_header_overlay(); ?>
  68.  
  69.     <?php do_action( 'ocean_after_page_header_inner' ); ?>
  70.  
  71. </header><!-- .page-header -->
  72.  
  73. <?php do_action( 'ocean_after_page_header' ); ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top