/home/vianto5/cititower.mx/wp-content/plugins/siteorigin-panels/inc/widgets
NameSizeModeActions
layout.php51410644editdlrm
post-content.php28120644editdlrm
post-loop-helper.php30950644editdlrm
post-loop.php209620644editdlrm
Edit: /home/vianto5/cititower.mx/wp-content/plugins/siteorigin-panels/inc/widgets/post-content.php (2812B)
__( 'Displays content from the current post.', 'siteorigin-panels' ), ) ); } public function widget( $args, $instance ) { if ( is_admin() ) { return; } echo $args['before_widget']; $content = apply_filters( 'siteorigin_panels_widget_post_content', $this->default_content( $instance['type'] ) ); echo wp_kses_post( $content ); echo $args['after_widget']; } /** * The default content for post types * * @return string */ public function default_content( $type ) { global $post; if ( empty( $post ) ) { return; } switch( $type ) { case 'title': return '

' . wp_kses_post( $post->post_title ) . '

'; case 'featured': if ( ! has_post_thumbnail() ) { return ''; } return ''; case 'post_content': if ( in_the_loop() ) { esc_html_e( 'This widget should not be used in the main post area.', 'siteorigin-panels' ); return; } if ( get_post_meta( $post->ID, 'panels_data', true ) ) { $content = SiteOrigin_Panels::renderer()->render( $post->ID ); } else { $content = wp_kses_post( apply_filters( 'the_content', $post->post_content ) ); } return '
' . $content . '
'; } } public function update( $new, $old ) { return $new; } public function form( $instance ) { $instance = wp_parse_args( $instance, array( 'type' => '', ) ); $types = apply_filters( 'siteorigin_panels_widget_post_content_types', array( '' => __( 'None', 'siteorigin-panels' ), 'title' => __( 'Title', 'siteorigin-panels' ), 'featured' => __( 'Featured Image', 'siteorigin-panels' ), 'post_content' => __( 'Content', 'siteorigin-panels' ), ) ); ?>