true ) ); /** * Configure widget array. * * @var array */ $args = [ // Widget Backend label. 'label' => __('ItalyStrap Facebook Page', 'italystrap'), // Widget Backend Description. 'description' => __('Display the Facebook Page widget', 'italystrap'), 'fields' => $this->get_widget_fields(require(ITALYSTRAP_PLUGIN_PATH . 'config/facebook-page.php')), 'control_options' => ['width' => 450], 'widget_options' => ['customize_selective_refresh' => true], ]; /** * Create Widget */ $this->create_widget($args); } /** * Dispay the widget content * * @param array $args Display arguments including 'before_title', 'after_title', * 'before_widget', and 'after_widget'. * @param array $instance The settings for the particular instance of the widget. * @return string Return the output */ public function widget_render($args, $instance) { $facebook_page = new Page(); add_action('wp_footer', [$facebook_page, 'script_2'], 99); // add_action( 'italystrap_sidebar', array( $facebook_page, 'output' ) ); // $query_posts = Posts_Base::init(); // $query_posts->get_widget_args( $instance ); return $facebook_page->render($instance); } } // Class.