theme; if ( ! empty( $atts['theme'] ) ) { $theme = $atts['theme']; } $theme = $this->is_theme_available( $theme ); $posts = $this->get_posts_to_display(); if ( empty( $posts ) ) { return ''; } if ( 'curated' === $this->sort && apply_filters( 'monsterinsights_popular_posts_inline_curated_shuffle', true ) ) { // Randomize the order. shuffle( $posts ); } $theme_styles = $this->get_theme_props( $theme )->get_theme(); $limit = ! empty( $theme_styles['posts'] ) ? $theme_styles['posts'] : 1; $label_text = ''; if ( isset( $theme_styles['styles']['label'] ) ) { $label_text = isset( $atts['labelText'] ) ? $atts['labelText'] : $theme_styles['styles']['label']['text']; } // Wrap in a P tag to keep the same spacing. $html = '