*/ class Advanced_Related_Posts_Under_Posts_GRID_Layout extends Advanced_Related_Posts_Public{ /** * The ID of this plugin. * * @since 1.0.0 * @access private * @var string $plugin_name The ID of this plugin. */ private $plugin_name; /** * The version of this plugin. * * @since 1.0.0 * @access private * @var string $version The current version of this plugin. */ private $version; private $html_class_prefix = 'ays-arp-'; private $html_name_prefix = 'ays-arp-'; private $name_prefix = 'arp_'; private $unique_id; private $unique_id_in_class; private $options; protected $layout_name; /** * Initialize the class and set its properties. * * @since 1.0.0 * @param string $plugin_name The name of the plugin. * @param string $version The version of this plugin. */ public function __construct( $plugin_name, $plugin_version, $options, $layout_name, $layout_options ) { $this->plugin_name = $plugin_name; $this->version = $plugin_version; $this->options = $options; $this->layout_name = $layout_name; $this->unique_id = $layout_options['unique_id']; $this->unique_id_in_class = $layout_options['unique_id_in_class']; } protected function layout_enqueue_styles(){ /** * This function is provided for demonstration purposes only. * * An instance of this class should be passed to the run() function * defined in Advanced_Related_Posts_Loader as all of the hooks are defined * in that particular class. * * The Advanced_Related_Posts_Loader will then create the relationship * between the defined hooks and the functions defined in this * class. */ $id_prefix = $this->plugin_name . '-under-posts-' . $this->layout_name; wp_enqueue_style( $id_prefix, ADVANCED_RELATED_POSTS_PUBLIC_URL . '/css/layouts/advanced-related-posts-under-posts-'. $this->layout_name .'-layout.css', array(), $this->version, 'all' ); } protected function layout_enqueue_scripts(){ /** * This function is provided for demonstration purposes only. * * An instance of this class should be passed to the run() function * defined in Advanced_Related_Posts_Loader as all of the hooks are defined * in that particular class. * * The Advanced_Related_Posts_Loader will then create the relationship * between the defined hooks and the functions defined in this * class. */ $id_prefix = $this->plugin_name . '-under-posts-' . $this->layout_name; } public function ays_arp_generate_layout_content( $posts ){ /*******************************************************************************************************/ $this->layout_enqueue_styles(); $this->layout_enqueue_scripts(); /*******************************************************************************************************/ $content = array(); $content[] = '
'. __( 'Post does not have featured image' , 'advanced-related-posts' ) .'
'; } $content[] = '