'access arguments'=>array('administer site configuration'),
'page arguments'=>['toc_filter_admin_settings'],
'access arguments'=>['administer site configuration'],
'file'=>'toc_filter.admin.inc',
'type'=>MENU_NORMAL_ITEM,
);
];
return$items;
}
...
...
@@ -43,20 +49,20 @@ function toc_filter_menu() {
*/
functiontoc_filter_filter_info(){
if(module_exists('ctools')){
$description=t("Converts <@header_tag> tags to a linked table of contents or jump menu with an optional title. (i.e [TOC:(faq|numbered|jump-menu|menu) (title)]",array('@header_tag'=>variable_get('toc_filter_header_tag','h3')));
$description=t("Converts <@header_tag> tags to a linked table of contents or jump menu with an optional title. (i.e [TOC:(faq|numbered|jump-menu|menu) (title)]",['@header_tag'=>variable_get('toc_filter_header_tag','h3')]);
}
else{
$description=t("Converts <@header_tag> tags to a linked table of contents with an optional title. (i.e [TOC:(faq|numbered) (title)]",array('@header_tag'=>variable_get('toc_filter_header_tag','h3')));
$description=t("Converts <@header_tag> tags to a linked table of contents with an optional title. (i.e [TOC:(faq|numbered) (title)]",['@header_tag'=>variable_get('toc_filter_header_tag','h3')]);
returnt("Adding [TOC:(faq|ol|number|ul|bullet|jump-menu|menu) (title)] will generate a table of contents or jump menu linked to all the <@header_tag> tags with an optional title.",array("@header_tag"=>variable_get('toc_filter_header_tag','h3')));
returnt("Adding [TOC:(faq|ol|number|ul|bullet|jump-menu|menu) (title)] will generate a table of contents or jump menu linked to all the <@header_tag> tags with an optional title.",["@header_tag"=>variable_get('toc_filter_header_tag','h3')]);
}
else{
returnt("Adding [TOC:(faq|ol|number|ul|bullet) (title)] will generate a table of contents linked to all the <@header_tag> tags with an optional title.",array("@header_tag"=>variable_get('toc_filter_header_tag','h3')));
returnt("Adding [TOC:(faq|ol|number|ul|bullet) (title)] will generate a table of contents linked to all the <@header_tag> tags with an optional title.",["@header_tag"=>variable_get('toc_filter_header_tag','h3')]);
}
}
...
...
@@ -86,7 +92,7 @@ function _toc_filter_process_callback($text) {
}
// Must track nested filter calls which can be created by drupal_get_form('ctools_jump_menu').
static$processing=array();
static$processing=[];
$md5=md5($text);
if(isset($processing[$md5])){
return$text;
...
...
@@ -126,18 +132,22 @@ function _toc_filter_process_callback($text) {
@@ -199,14 +217,14 @@ function _toc_filter_process_callback($text) {
* TOC filter settings callback.
*/
function_toc_filter_settings_callback(){
$form=array();
$form['toc_filter_settings']=array(
$form=[];
$form['toc_filter_settings']=[
'#type'=>'fieldset',
'#title'=>t('TOC filter'),
'#description'=>t('To configure this filter, please goto the global <a href="@href">TOC filter site configuration form</a>.',array('@href'=>url('admin/config/content/toc_filter'))),
'#description'=>t('To configure this filter, please goto the global <a href="@href">TOC filter site configuration form</a>.',['@href'=>url('admin/config/content/toc_filter')]),
'#collapsible'=>TRUE,
'#collapsed'=>FALSE,
);
];
return$form;
}
...
...
@@ -219,7 +237,7 @@ function _toc_filter_settings_callback() {