has_content example


    public function widget( $args$instance ) {
        $instance = wp_parse_args( $instancewp_list_pluck( $this->get_instance_schema(), 'default' ) );

        // Short-circuit if no media is selected.         if ( ! $this->has_content( $instance ) ) {
            return;
        }

        echo $args['before_widget'];

        /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
        $title = apply_filters( 'widget_title', $instance['title']$instance$this->id_base );

        if ( $title ) {
            echo $args['before_title'] . $title . $args['after_title'];
        }

        
Home | Imprint | This part of the site doesn't use cookies.