You are here

function ckeditor_htmlbuttons_name_exists in CKEditor HTML Buttons (for WYSIWYG and CKEditor) 7

Check if button name exists.

Parameters

string $name: Button name.

Return value

bool Return true or false.

1 call to ckeditor_htmlbuttons_name_exists()
ckeditor_htmlbutton_save_button in ./ckeditor_htmlbuttons.module
CKEditor HTML Buttons database save function.
1 string reference to 'ckeditor_htmlbuttons_name_exists'
ckeditor_htmlbuttons_button_form in ./ckeditor_htmlbuttons.admin.inc
CKEditor HTML Buttons create/modify form.

File

./ckeditor_htmlbuttons.module, line 193
Basic module file for CKEditor HTML Buttons.

Code

function ckeditor_htmlbuttons_name_exists($name) {
  return (bool) db_query('SELECT 1 FROM {ckeditor_htmlbuttons} WHERE name = :name', array(
    ':name' => $name,
  ))
    ->fetchField();
}