Example #1
0
 /**
  * @example [FlexSlider id="2" width="400" height="300"]
  */
 public static function FlexSliderShortCodeHandler($arguments)
 {
     if (!isset($arguments['id'])) {
         return;
     }
     $imageWidth = isset($arguments['width']) && (int) $arguments['width'] > 0 ? (int) $arguments['width'] : null;
     $imageHeight = isset($arguments['height']) && (int) $arguments['height'] > 0 ? (int) $arguments['height'] : null;
     $newPage = new Page();
     $fs = $newPage->FlexSlider($arguments['id'], $imageWidth, $imageHeight);
     if (isset($arguments['fixedWidth']) && $arguments['fixedWidth']) {
         $fs->setCSSWidth(true);
     }
     return $fs->forTemplate();
 }