You are here

function popup_test_position in Popup 7

Same name and namespace in other branches
  1. 7.x modules/popup_test/includes/popup_test.pages.inc \popup_test_position()
  2. 6.x modules/popup_test/includes/popup_test.pages.inc \popup_test_position()

Popup test position page

1 string reference to 'popup_test_position'
popup_test_menu in modules/popup_test/popup_test.module
Implementation of hook_menu

File

modules/popup_test/includes/popup_test.pages.inc, line 8

Code

function popup_test_position() {
  module_load_include('inc', 'popup', 'includes/popup.api');
  $rendered = '';
  $corner = array(
    'top left' => 'top-left',
    'top right' => 'top-right',
    'bottom left' => 'bottom-left',
    'bottom right' => 'bottom-right',
  );
  foreach ($corner as $origin_label => $origin_setting) {
    foreach ($corner as $expand_label => $expand_setting) {
      $rendered .= 'This is the <strong>' . $origin_label . '</strong> origin test: ' . popup_element('popup title', 'Expanding to the ' . $expand_label, array(
        'origin' => $origin_setting,
        'expand' => $expand_setting,
      )) . ' and some suffix text.<br />';
    }
  }
  return $rendered;
}