Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.96 KB | None | 0 0
  1. <?php
  2. /**
  3.  * The7 theme.
  4.  * @package The7
  5.  * @since   1.0.0
  6.  */
  7.  
  8. // File Security Check
  9. if ( ! defined( 'ABSPATH' ) ) {
  10.     exit;
  11. }
  12.  
  13. /**
  14.  * Set the content width based on the theme's design and stylesheet.
  15.  * @since 1.0.0
  16.  */
  17. if ( ! isset( $content_width ) ) {
  18.     $content_width = 1200; /* pixels */
  19. }
  20.  
  21. /**
  22.  * Initialize theme.
  23.  * @since 1.0.0
  24.  */
  25. require( trailingslashit( get_template_directory() ) . 'inc/init.php' );
  26.  
  27. function isMobile() {
  28.     return preg_match("/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i", $_SERVER["HTTP_USER_AGENT"]);
  29. }
  30.  
  31. add_action( 'get_header', 'laranz_change_header_layout', 10 );
  32. function laranz_change_header_layout() {
  33.  
  34.     $config = presscore_get_config();
  35.  
  36. if(!isMobile()) {
  37.  
  38.     if( is_page( '17330' ) or is_page('17346') or is_page('17353') or is_page('17293')){
  39.         $config->set('header.layout', 'side');
  40.     }
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement