__( 'Include other page. Only for page builder.', 'maskitto-light' ), 'panels_icon' => 'dashicons dashicons-admin-page', 'panels_groups' => 'theme-widgets' ) ); } /* Front-end display of widget. */ public function widget( $args, $instance ) { $id = intval( $instance['pageid'] ); $style1 = (string) NULL; $style2 = (string) NULL; $style3 = (string) NULL; global $wp_query; $type = get_post_type( $id ); $main_post = $wp_query->get_queried_object(); if( $id > 0 && $type == 'page' && $id != $main_post->ID ) : echo maskitto_light_generate_page( $id, 1 ); endif; } /* Back-end widget form. */ public function form( $instance ) { $title = (string) NULL; $subtitle = (string) NULL; if ( isset( $instance[ 'pageid' ] ) ) { $pageid = $instance[ 'pageid' ]; } if ( isset( $instance[ 'subtitle' ] ) ) { $subtitle = $instance[ 'subtitle' ]; } ?>

0 ) { $title = get_the_title( $instance['pageid'] ); if( $title ) { $instance['title'] = $title; } else { $instance['title'] = 'Unknown'; } } return $instance; } }