From 69bf22c065ea63b46f84be24f77e969c6844af0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bogdan=20Rapai=C4=87?= Date: Fri, 17 Apr 2020 14:14:10 +0200 Subject: [PATCH] Fixed: CodeFactor issues --- class/class-mainwp-child-links-checker.php | 144 ++++++++++----------- 1 file changed, 67 insertions(+), 77 deletions(-) diff --git a/class/class-mainwp-child-links-checker.php b/class/class-mainwp-child-links-checker.php index 53573bb..6e80043 100644 --- a/class/class-mainwp-child-links-checker.php +++ b/class/class-mainwp-child-links-checker.php @@ -1,15 +1,12 @@ 0 ) { @@ -125,7 +121,7 @@ class MainWP_Child_Links_Checker { return $information; } - function force_recheck() { + public function force_recheck() { $this->initiate_recheck(); $information = array(); $information['result'] = 'SUCCESS'; @@ -133,14 +129,14 @@ class MainWP_Child_Links_Checker { return $information; } - function initiate_recheck() { + public function initiate_recheck() { global $wpdb; /** @var wpdb $wpdb */ - // Delete all discovered instances + // Delete all discovered instances. $wpdb->query( "TRUNCATE {$wpdb->prefix}blc_instances" ); - // Delete all discovered links + // Delete all discovered links. $wpdb->query( "TRUNCATE {$wpdb->prefix}blc_links" ); // Mark all posts, custom fields and bookmarks for processing. @@ -158,18 +154,18 @@ class MainWP_Child_Links_Checker { } blc_init(); - // Get the container type matching the type of the deleted post + // Get the container type matching the type of the deleted post. $post = get_post( $post_id ); if ( ! $post ) { return; } - // Get the associated container object + // Get the associated container object. $post_container = blcContainerHelper::get_container( array( $post->post_type, intval( $post_id ) ) ); if ( $post_container ) { - // Delete it + // Delete it. $post_container->delete(); - // Clean up any dangling links + // Clean up any dangling links. blc_cleanup_links(); } } @@ -186,7 +182,7 @@ class MainWP_Child_Links_Checker { return $plugins; } - function update_footer( $text ) { + public function update_footer( $text ) { ?>