You are here

function _qtip_admin_tooltip_position_options in qTip (Stylish jQuery Tooltips) 7.2

Helper function to get options for tooltip positioning.

1 call to _qtip_admin_tooltip_position_options()
qtip_configure_instance_form in includes/forms/qtip.admin.inc
Callback function for admin/config/user-interface/qtip

File

includes/forms/qtip.admin.inc, line 526
Administrative functions for the qTip module.

Code

function _qtip_admin_tooltip_position_options($normal = TRUE) {
  $options = array(
    'top left' => 'Top Left Corner',
    'top center' => 'Top Center',
    'top right' => 'Top Right Corner',
    'right top' => 'Right Top Corner',
    'right center' => 'Right Center',
    'right bottom' => 'Right Bottom Corner',
    'bottom right' => 'Bottom Right Corner',
    // Default value from qTip library
    'bottom center' => 'Bottom Center',
    'bottom left' => 'Bottom Left Corner',
    'left bottom' => 'Left Bottom Corner',
    'left center' => 'Left Center',
    'left top' => 'Left Top',
    'center' => 'Center',
  );
  if ($normal) {

    // Prepend a 'Normal' option onto the beginning of the array, if set
    $normal = array(
      '' => 'Normal',
    );
    $options = $normal + $options;
  }
  return $options;
}