Done !
| Server IP : 54.36.91.62 / Your IP : 216.73.216.38 Web Server : Apache System : Linux webm008.cluster127.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : awaywithxm ( 25098) PHP Version : 7.0.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/awaywithxm/www/wp-content/plugins/post-grid/includes/classes/ |
Upload File : |
<?php
if ( ! defined('ABSPATH')) exit; // if direct access
class class_post_grid_shortcodes{
public function __construct(){
add_shortcode( 'post_grid', array( $this, 'post_grid_new_display' ) );
}
public function post_grid_new_display($atts, $content = null ){
$atts = shortcode_atts(
array(
'id' => "",
),
$atts
);
$atts = apply_filters('post_grid_atts', $atts);
$grid_id = $atts['id'];
ob_start();
if(empty($grid_id)){
echo 'Please provide valid post grid id, ex: <code>[post_grid id="123"]</code>';
return;
}
//include( post_grid_plugin_dir . 'templates/post-grid.php');
do_action('post_grid_main', $atts);
return ob_get_clean();
}
}
new class_post_grid_shortcodes();