setting()

Description

Will return an array or single value of the specified setting.

Usage

<?php 
    $setting= setting( $setting_name, $column ); 
?>

Parameters

$setting_name

  • required

The name of the setting you would like to retreive.

$column

  • optional
  • integer, 1-3

A single setting can have up to three parts to it. Supplying a column number will return that single value, leaving it blank will return the entire setting as an array.

Examples

The Site Setting (site URL + title)

<?php 
    $site= setting( "site" ); 
    echo $site[0]; // site title 
echo $site[1]; // site URL 
echo $site[2]; // blank 
?>

Getting only the site title

<?php 
    $title= setting( "site", 1 ); // Notice that $column is a different offset than array default 
echo $title; 
?>