PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.9
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.9
4.4.9 4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 All 140 releases
← All changes | inc/abstracts/abstract-post-data.php +7 -21 4.1.6.9 → 4.4.9 View file →
@@ -132,37 +132,23 @@
132 132 global $post, $wp_query;
133 133
134 134 // Post not preview
135 135 if ( ! isset( $_REQUEST['preview'] ) ) {
136 - $posts = apply_filters_ref_array(
137 - 'the_posts',
138 - array(
139 - array( get_post( $this->get_id() ) ),
140 - &$wp_query,
141 - )
142 - );
143 -
144 136 // Fix style, js if content is WP Bakery
145 137 if ( class_exists( 'WPBMap' ) && method_exists( 'WPBMap', 'addAllMappedShortcodes' ) ) {
146 138 WPBMap::addAllMappedShortcodes();
147 139 }
148 140
149 - if ( $posts ) {
150 - $post = $posts[0];
151 - }
141 + $post = get_post( $this->get_id() );
152 142
153 143 setup_postdata( $post );
154 - $content_post = get_the_content();
155 - $content_post = apply_filters( 'the_content', $content_post );
156 - $content_post = str_replace( ']]>', ']]>', $content_post );
157 - $this->_content = $content_post;
158 - wp_reset_postdata();
159 - } else { // Post is previewd
160 - $content_post = get_the_content();
161 - $content_post = apply_filters( 'the_content', $content_post );
162 - $content_post = str_replace( ']]>', ']]>', $content_post );
163 - $this->_content = $content_post;
164 144 }
145 +
146 + $content_post = get_the_content();
147 + $content_post = apply_filters( 'the_content', $content_post );
148 + $content_post = str_replace( ']]>', ']]>', $content_post );
149 + $this->_content = $content_post;
150 + wp_reset_postdata();
165 151 }
166 152 } else {
167 153 $content = get_post_field( 'post_content', $this->get_id() );
168 154 if ( $length > 1 ) {