Пример #1
0
 /**
  * @since 4.4
  *
  * @output/@return string - grid data for ajax request.
  */
 public function getGridDataForAjax()
 {
     $tag = vc_request_param('tag');
     if (vc_verify_public_nonce() && $tag) {
         $shorcode_fishbone = visual_composer()->getShortCode($tag);
         if (is_object($shorcode_fishbone)) {
             /** @var $vc_grid WPBakeryShortcode_Vc_Basic_Grid */
             $vc_grid = $shorcode_fishbone->shortcodeClass();
             if (method_exists($vc_grid, 'isObjectPageable') && $vc_grid->isObjectPageable() && method_exists($vc_grid, 'renderAjax')) {
                 die($vc_grid->renderAjax(vc_request_param('data')));
             }
         }
     }
 }
Пример #2
0
 /**
  * @since 4.4
  *
  * @output/@return string - grid data for ajax request.
  */
 public function getGridDataForAjax()
 {
     $tag = vc_request_param('tag');
     $allowed = apply_filters('vc_grid_get_grid_data_access', vc_verify_public_nonce() && $tag, $tag);
     if ($allowed) {
         $shortcode_fishbone = visual_composer()->getShortCode($tag);
         if (is_object($shortcode_fishbone)) {
             /** @var $vc_grid WPBakeryShortcode_Vc_Basic_Grid */
             $vc_grid = $shortcode_fishbone->shortcodeClass();
             if (method_exists($vc_grid, 'isObjectPageable') && $vc_grid->isObjectPageable() && method_exists($vc_grid, 'renderAjax')) {
                 echo $vc_grid->renderAjax(vc_request_param('data'));
                 die;
             }
         }
     }
 }