PluginProbe
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot / 4.2.0
BetterDocs – AI Documentation, Knowledge Base, MCP Server, Docs, Wikis, FAQ & Chatbot v4.2.0
4.9.1 4.9.0 4.8.2 4.8.1 4.8.0 4.7.0 4.6.2 4.6.1 4.6.0 4.5.6 4.5.5 4.5.4 4.5.3 4.5.2 4.5.1 4.5.0 4.4.1 4.4.0 3.3.4 3.4.0 3.4.1 3.4.2 3.5.0 3.5.1 3.5.2 All 199 releases
← All changes | includes/Modules/StyleHandler.php +0 -14 4.4.14.2.0 View file →
@@ -74,11 +74,8 @@
74 74 if ( ! empty( $post_ids ) ) {
75 75 foreach ( $post_ids as $id ) {
76 76 $post_id = (int) $id['ID'];
77 77 $post = get_post( $post_id );
78 - if ( ! $post ) {
79 - continue;
80 - }
81 78 $parsed_content = parse_blocks( $post->post_content );
82 79 $this->write_css_from_content( $post, $post_id, $parsed_content );
83 80 }
84 81 }
@@ -87,11 +84,8 @@
87 84 if ( ! empty( $post_ids ) ) {
88 85 foreach ( $post_ids as $id ) {
89 86 $post_id = (int) $id['ID'];
90 87 $post = get_post( $post_id );
91 - if ( ! $post ) {
92 - continue;
93 - }
94 88 $parsed_content = parse_blocks( $post->post_content );
95 89 $this->write_css_from_content( $post, $post_id, $parsed_content );
96 90 }
97 91 }
@@ -252,12 +246,8 @@
252 246 if ( $post_type === 'wp_template_part' || $post_type === 'wp_template' ) {
253 247 $post = get_post( $post_id );
254 248 }
255 249
256 - if ( ! $post ) {
257 - return [];
258 - }
259 -
260 250 $parsed_content = parse_blocks( $post->post_content );
261 251
262 252 if ( empty( $parsed_content ) ) {
263 253 delete_post_meta( $post_id, '_betterdocs_reusable_block_ids' );
@@ -297,12 +287,8 @@
297 287 * @retun void
298 288 * @since 1.0.2
299 289 */
300 290 private function write_block_css( $block_styles, $post ) {
301 - if ( ! $post ) {
302 - return;
303 - }
304 -
305 291 //Write CSS for FSE
306 292 if ( isset( $post->post_type ) && ( $post->post_type === 'wp_template_part' || $post->post_type === 'wp_template' && ! empty( $block_styles ) ) ) {
307 293 $this->single_file_css_generator( $block_styles, $this->style_dir, $this->prefix . '-edit-site.min.css' );
308 294 } // Write CSS for Page/Posts