Pagelines site logo

[edit] Please Note

These docs are now deprecated, we have a new Support area located here

Revision as of 18:39, 17 March 2012 by Cais (Talk | contribs)

Contents

Filter

pagelines_site_logo can be used to override the standard core framework site logo options. This can be used to remove "branding" from sites.

Usage


NB: my_pagelines_site_logo_extension is only meant as an example, a more appropriately named function should be used in actual code.

Example

If you want to have a different logo based on the language a reader will be viewing the site from then the following will help provide it.

	'../wp-content/themes/earlymusicbesalu/images/logo-eng-2012.png',
		'es'	=>	'../wp-content/themes/earlymusicbesalu/images/logo-es-2012.png',
		'ca'	=>	'../wp-content/themes/earlymusicbesalu/images/logo-ca-2012.png',
		'fr'	=>	'../wp-content/themes/earlymusicbesalu/images/logo-fr-2012.png',		
		);
	
	/**
	 * Select a logo from the image array.
	 */	
	$image = sprintf( 'src="%s', $images[ ICL_LANGUAGE_CODE ] );

	/**
	 * Now we replace the actual logo with our new one.
	 */		
	$logo = preg_replace( '#src="[^"]*#', $image, $logo );
	
	/**
	 * Finally return the adjusted logo.
	 */
	return $logo;
} ?>

Changelog

Added at version 1.1.0

Source File

pagelines_site_logo is defined in pagelines_main_logo() which is located in includes/library.templates.php