Skip to content

Commit

Permalink
Issue #44: Prevent function conflict between autoloader and profile m…
Browse files Browse the repository at this point in the history
…odule (#45)
  • Loading branch information
indigoxela authored Nov 15, 2023
1 parent 668f38f commit d0dd60d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tinymce.module
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ function tinymce_menu() {
'access arguments' => array('administer filters'),
'file' => 'tinymce.builder.inc',
);
$items['admin/config/content/tinymce-builder/%tinymce_profile/edit'] = array(
$items['admin/config/content/tinymce-builder/%tinymceprofile/edit'] = array(
'title' => 'Edit profile',
'page callback' => 'backdrop_get_form',
'page arguments' => array('tinymce_builder_form', 4),
'access arguments' => array('administer filters'),
'file' => 'tinymce.builder.inc',
);
$items['admin/config/content/tinymce-builder/%tinymce_profile/delete'] = array(
$items['admin/config/content/tinymce-builder/%tinymceprofile/delete'] = array(
'title' => 'Delete profile',
'page callback' => 'backdrop_get_form',
'page arguments' => array('tinymce_builder_delete_confirm', 4),
Expand All @@ -75,15 +75,15 @@ function tinymce_menu() {
}

/**
* Auto-loader for tinymce_profile item wildcard.
* Auto-loader for tinymceprofile item wildcard.
*
* @param string $name
* Profile name from path.
*
* @return Config|false
* Config object if this profile exists, FALSE otherwise.
*/
function tinymce_profile_load($name) {
function tinymceprofile_load($name) {
$profile = config("tinymce.profiles.$name");
return (!$profile->isNew()) ? $profile : FALSE;
}
Expand Down

0 comments on commit d0dd60d

Please sign in to comment.