true ) ); /** * Configure widget array. * * @var array */ $args = array( // 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' => array( 'width' => 450 ), 'widget_options' => array( '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', array( $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.