diff --git a/fieldable_panels_panes.install b/fieldable_panels_panes.install index d5c011b..65293f8 100644 --- a/fieldable_panels_panes.install +++ b/fieldable_panels_panes.install @@ -33,8 +33,8 @@ function fieldable_panels_panes_uninstall() { variable_del('fieldable_panels_panes_skip_default_type'); variable_del('fpp_blocks_expose'); - // Delete any variables that begin with 'fpp_expose_' - $results = db_query('SELECT name FROM {variable} WHERE name LIKE :var', array(':var'=> 'fpp_expose_%'))->fetchCol(); + // Delete any variables that begin with 'fpp_expose_'. + $results = db_query('SELECT name FROM {variable} WHERE name LIKE :var', array(':var' => 'fpp_expose_%'))->fetchCol(); foreach ($results as $var) { variable_del($var); } diff --git a/fieldable_panels_panes.module b/fieldable_panels_panes.module index 0175c02..809d989 100644 --- a/fieldable_panels_panes.module +++ b/fieldable_panels_panes.module @@ -406,7 +406,7 @@ function fieldable_panels_panes_menu() { 'type' => MENU_LOCAL_ACTION, ) + $base; - // Settings + // Settings. $items['admin/structure/fieldable-panels-panes/settings'] = array( 'title' => 'Settings', 'page callback' => 'drupal_get_form', @@ -743,22 +743,23 @@ function fieldable_panels_panes_views_api() { } // ------------------------------------------------------------------------- -// Block hooks +// Block hooks. /** * Implements hook_block_info(). */ function fieldable_panels_panes_block_info() { $blocks = array(); - // Get array of exposed FPP bundles + // Get array of exposed FPP bundles. $bundles = fieldable_panels_panes_exposed_bundles(); if (variable_get('fpp_blocks_expose', FALSE) == TRUE) { - // Get all reusable entities if $bundles array is empty + // Get all reusable entities if $bundles array is empty. if (empty($bundles)) { $ids = db_query('SELECT fpid FROM {fieldable_panels_panes} WHERE reusable = 1')->fetchCol(); } - // Get reusable entities of selected FPP bundles if $bundles array is not empty + // Get reusable entities of selected FPP bundles if $bundles array is not + // empty. else { $ids = array(); foreach ($bundles as $bundle => $info) { @@ -779,9 +780,9 @@ function fieldable_panels_panes_block_info() { */ function fieldable_panels_panes_block_view($delta = '') { $block = array(); - // Get array of exposed FPP bundles + // Get array of exposed FPP bundles. $bundles = fieldable_panels_panes_exposed_bundles(); - + if (variable_get('fpp_blocks_expose', FALSE) == TRUE) { $entity = fieldable_panels_panes_load($delta); $bundle = $entity->bundle; @@ -789,7 +790,7 @@ function fieldable_panels_panes_block_view($delta = '') { $block['subject'] = ''; $block['content'] = ''; - // Render block if its FPP bundle is exposed and block is reusable + // Render block if its FPP bundle is exposed and block is reusable. if ((array_key_exists($bundle, $bundles) || empty($bundles)) && $entity->reusable == TRUE) { $content = fieldable_panels_panes_view($entity); $block['subject'] = check_plain($entity->title); @@ -800,14 +801,14 @@ function fieldable_panels_panes_block_view($delta = '') { } /** - * Return array of FPP bundles exposed as blocks + * Return array of FPP bundles exposed as blocks. */ function fieldable_panels_panes_exposed_bundles() { - // Get array of all FPP bundles and unset bundles not exposed as blocks + // Get array of all FPP bundles and unset bundles not exposed as blocks. $bundles = fieldable_panels_panes_get_bundle_labels(); foreach ($bundles as $bundle => $info) { - $expose = variable_get('fpp_expose_'.$bundle, FALSE); + $expose = variable_get('fpp_expose_' . $bundle, FALSE); if ($expose == FALSE) { unset($bundles[$bundle]); } diff --git a/includes/admin.inc b/includes/admin.inc index 3680dc5..7dc7f73 100644 --- a/includes/admin.inc +++ b/includes/admin.inc @@ -8,9 +8,8 @@ /** * Page callback for settings page. */ - function fieldable_panels_panes_settings() { - // Get array of all FPP bundles + // Get array of all FPP bundles. $bundles = fieldable_panels_panes_get_bundle_labels(); $form = array(); @@ -33,25 +32,25 @@ function fieldable_panels_panes_settings() { ), ); - // Render checkbox for each FPP bundle if any FPP bundles exist + // Render checkbox for each FPP bundle if any FPP bundles exist. if (!empty($bundles)) { foreach ($bundles as $bundle => $info) { - $form['bundles']['fpp_expose_'.$bundle] = array( + $form['bundles']['fpp_expose_' . $bundle] = array( '#type' => 'checkbox', - '#title' => t($info), - '#default_value' => variable_get('fpp_expose_'.$bundle, FALSE), + '#title' => $info, + '#default_value' => variable_get('fpp_expose_' . $bundle, FALSE), ); } } - // Remove fieldset description and add markup if no FPP bundles exist + // Remove fieldset description and add markup if no FPP bundles exist. else { $form['bundles']['empty'] = array( - '#markup' => t('

No FPP types exist.

'), + '#markup' => t('

No FPP types exist.

'), ); $form['bundles']['#description'] = NULL; } - return system_settings_form($form); + return system_settings_form($form); } /**