You are here

function ckeditor_user_get_setting in CKEditor - WYSIWYG HTML editor 7

Same name and namespace in other branches
  1. 6 includes/ckeditor.lib.inc \ckeditor_user_get_setting()

Return CKEditor settings

Parameters

object $user:

object $profile:

string $setting:

Return value

array

1 call to ckeditor_user_get_setting()
ckeditor_profile_settings_compile in includes/ckeditor.lib.inc
Compile settings of profile

File

includes/ckeditor.lib.inc, line 440
CKEditor - The text editor for the Internet - http://ckeditor.com Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.

Code

function ckeditor_user_get_setting($user, $profile, $setting) {
  $default = ckeditor_user_get_setting_default();
  if (user_access('customize ckeditor')) {
    $status = isset($user->data['ckeditor_' . $setting]) ? $user->data['ckeditor_' . $setting] : (isset($profile->settings[$setting]) ? $profile->settings[$setting] : $default[$setting]);
  }
  else {
    $status = isset($profile->settings[$setting]) ? $profile->settings[$setting] : $default[$setting];
  }
  return $status;
}