e107 Developer Guide
  • Welcome
  • Getting Started
    • Hello world example
    • Folder structure
    • Database structure
    • Debugging & problem solving
  • Classes and methods
    • Introduction
    • Alerts
    • Cache
    • CSS
    • Database
    • Date
    • Events
    • Forms
    • Javascript
    • Language
    • Logging
    • Meta
    • Parser
    • Plugins
    • Preferences
    • Redirection
    • Render
    • Route
    • URLs
    • User Data
  • Plugin development
    • Introduction
    • Plugin Builder
    • Admin-UI (User Interface)
    • Installation & configuration
    • Plugin shortcodes
    • Internationalisation (LAN)
    • Extending core functionality (addons)
    • Upgrading legacy plugins
  • Theme development
    • Introduction
    • Installation & configuration
    • Layout & templates
    • Theme Shortcodes
    • Styling (CSS)
    • Upgrading legacy themes
  • Templates, shortcodes & constants
    • Introduction
    • Templates
    • Shortcodes
    • Core Shortcodes
    • Constants
  • How-to's / FAQs
    • How to...
Powered by GitBook
On this page
  • Introduction
  • Retrieving preferences

Was this helpful?

Export as PDF
  1. Classes and methods

Preferences

Please note: This page is under construction and has not been finished yet.

Introduction

Use the following to retrieve the render class object.

$pref = e107::getPref();

Retrieving preferences

Developers may retrieve admin preferences for their theme or plugin, or a core preference using the following method:

e107::pref(type, value);

Example: Load a stored value that was saved in the preferences admin area of the 'faqs' plugin

$faqPrefs = e107::pref('faqs'); // returns an array.

Or load a single preference value.

$FaqPerPage = e107::pref('faqs', 'faqs_per_page');
Type
Value (optional)

core

all core preference values.

theme

preferences of the currently selected front-end theme.

(any plugin folder name)

preferences of a particular plugin

PreviousPluginsNextRedirection

Last updated 2 years ago

Was this helpful?