public/wordpress/wp-content/themes/puro/functions.php
/**
 * Sets up theme defaults and registers support for various WordPress features.
 *
 * Note that this function is hooked into the after_setup_theme hook, which
 * runs before the init hook. The init hook is too late for some features, such
 * as indicating support for post thumbnails.
 */
Sets up theme defaults and registers support for various WordPress features.
Note that this function is hooked into the after_setup_theme hook, which
runs before the init hook. The init hook is too late for some features, such
as indicating support for post thumbnails.
Sets up theme defaults and registers support for various WordPress features . Note that this function is hooked into the after_setup_theme hook which runs before the init hook . The init hook is too late for some features such as indicating support for post thumbnails .
function puro_setup() {
	global $content_width;
	if ( ! isset( $content_width ) ) {
		$content_width = 771; 
	}			 
	function puro_adjust_content_width() {	 
		global $content_width;
	    if ( is_page_template( 'page-templates/full-width-unconstrained-content.php' ) || is_page_template( 'page-templates/full-width-unconstrained-content-no-title.php' ) ) {
	        $content_width = 1080; 
	    }
	}
	add_action( 'template_redirect', 'puro_adjust_content_width' );  	
	load_theme_textdomain( 'puro', get_template_directory() . '/languages' );
	add_theme_support( 'automatic-feed-links' );
	add_theme_support( 'title-tag' );	
	add_theme_support( 'post-thumbnails' );
	register_nav_menus( array(
		'primary' => __( 'Primary Menu', 'puro' ),
		'social' => __( 'Social Network Icon Menu', 'puro' )
	) );
	add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) );
	add_theme_support( 'custom-logo' );
	add_theme_support( 'html5', array(
		'comment-list',
		'search-form',
		'comment-form',
		'gallery',
		'caption',
	) );
	add_theme_support( 'siteorigin-panels', array(
		'margin-sides' => 41,
		'margin-bottom' => 41,
		'home-page' => true,
		'home-page-default' => false,
		'home-template' => 'page-templates/full-width-unconstrained-content-no-title.php',
	) );
	define( 'SITEORIGIN_THEME_PREMIUM_URL', admin_url( 'themes.php?page=premium_upgrade' ) );
}
function puro_setup ( ) { global $ content_width ; if ( ! isset ( $ content_width ) ) { $ content_width = 771 ; } function puro_adjust_content_width ( ) { global $ content_width ; if ( is_page_template ( 'page-templates/full-width-unconstrained-content.php' ) || is_page_template ( 'page-templates/full-width-unconstrained-content-no-title.php' ) ) { $ content_width = 1080 ; } } add_action ( 'template_redirect' , 'puro_adjust_content_width' ) ; load_theme_textdomain ( 'puro' , get_template_directory ( ) . '/languages' ) ; add_theme_support ( 'automatic-feed-links' ) ; add_theme_support ( 'title-tag' ) ; add_theme_support ( 'post-thumbnails' ) ; register_nav_menus ( array ( 'primary' => __ ( 'Primary Menu' , 'puro' ) , 'social' => __ ( 'Social Network Icon Menu' , 'puro' ) ) ) ; add_theme_support ( 'post-formats' , array ( 'aside' , 'image' , 'video' , 'quote' , 'link' ) ) ; add_theme_support ( 'custom-logo' ) ; add_theme_support ( 'html5' , array ( 'comment-list' , 'search-form' , 'comment-form' , 'gallery' , 'caption' , ) ) ; add_theme_support ( 'siteorigin-panels' , array ( 'margin-sides' => 41 , 'margin-bottom' => 41 , 'home-page' => true , 'home-page-default' => false , 'home-template' => 'page-templates/full-width-unconstrained-content-no-title.php' , ) ) ; define ( 'SITEORIGIN_THEME_PREMIUM_URL' , admin_url ( 'themes.php?page=premium_upgrade' ) ) ; }
Sets up theme defaults and registers support for various WordPress features.
Sets up theme defaults and registers support for various WordPress features .
/**
	 * Set the content width based on the theme's design and page template in use.
	 */ /* pixels */ /* pixels */ /*
	 * Make theme available for translation.
	 * Translations can be filed in the /languages/ directory.
	 */ // Add default posts and comments RSS feed links to head. /*
	 * Let WordPress manage the document title.
	 * By adding theme support, we declare that this theme does not use a
	 * hard-coded <title> tag in the document head, and expect WordPress to
	 * provide it for us.
	 */ /*
	 * Enable support for Post Thumbnails on posts and pages.
	 *
	 * @link https://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
	 */ // This theme uses wp_nav_menu() in two locations. // Enable support for Post Formats. /*
	 * Enable support for the custom logo.
	 */ // Enable support for HTML5 markup. /**
	 * Support the Page Builder plugin.
	 */