Commit f8433fc2 authored by frjo's avatar frjo
Browse files

Issue #1057418: Add support for deactivating colorbox via url parameter, ?colorbox=no.

parent f81c20fc
...@@ -143,6 +143,12 @@ function _colorbox_form_page_access($form_id) { ...@@ -143,6 +143,12 @@ function _colorbox_form_page_access($form_id) {
* TRUE if Colorbox should be active for the current page. * TRUE if Colorbox should be active for the current page.
*/ */
function _colorbox_active() { function _colorbox_active() {
// Make it possible deactivate Colorbox with
// parameter ?colorbox=no in the url.
if (isset($_GET['colorbox']) && $_GET['colorbox'] == 'no') {
return FALSE;
}
// Code from the block_list funtion in block.module. // Code from the block_list funtion in block.module.
$path = drupal_get_path_alias($_GET['q']); $path = drupal_get_path_alias($_GET['q']);
$colorbox_pages = variable_get('colorbox_pages', "admin*\nimg_assist*\nimce*\nnode/add/*\nnode/*/edit"); $colorbox_pages = variable_get('colorbox_pages', "admin*\nimg_assist*\nimce*\nnode/add/*\nnode/*/edit");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment