EclipseGc

Untitled

May 9th, 2012
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.04 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4.  * @file
  5.  * Plugin to provide access control based on drupal_is_front_page.
  6.  */
  7.  
  8. /**
  9.  * Plugins are described by creating a $plugin array which will be used
  10.  * by the system that includes this file.
  11.  */
  12. $plugin = array(
  13.   'title' => t('Pager Active'),
  14.   'description' => t('The pager is active.'),
  15.   'callback' => 'ctools_pager_ctools_access_check',
  16.   'default' => array('negate' => 0),
  17.   'settings form' => 'ctools_pager_ctools_access_settings',
  18.   'summary' => 'ctools_pager_ctools_access_summary',
  19. );
  20.  
  21. /**
  22.  * Settings form for the 'by parent term' access plugin
  23.  */
  24. function ctools_pager_ctools_access_settings($form, &$form_state, $conf) {
  25.   // No additional configuration necessary.
  26.   return $form;
  27. }
  28.  
  29. /**
  30.  * Check for access.
  31.  */
  32. function ctools_pager_ctools_access_check($conf, $context) {
  33.   return (isset($_GET['pager'])) ? TRUE : FALSE;
  34. }
  35.  
  36. /**
  37.  * Provide a summary description based upon the checked terms.
  38.  */
  39. function ctools_pager_ctools_access_summary($conf, $context) {
  40.   return t('Pager Active');
  41. }
Advertisement
Add Comment
Please, Sign In to add comment