PluginProbe
MainWP Dashboard: Self-hosted WordPress Management for Agencies / 6.2.1
MainWP Dashboard: Self-hosted WordPress Management for Agencies v6.2.1
6.2.2 6.2.1 6.2 6.1.8 6.1.7 6.1.6 6.1.5 6.1.4 6.1.3 6.1.2 6.1.1 6.1 6.0.12 6.0.11 4.6.0.1 5.0 5.0.1 5.0.2 5.0.3 5.0.3.1 5.0.3.2 5.1 5.1.1 5.2 5.2.1 All 155 releases
← All changes | class/class-mainwp-sync.php +30 -0 6.2 → 6.2.1 View file →
@@ -828,8 +828,38 @@
828 828
829 829 return ! $error;
830 830 }
831 831
832 + /**
833 + * Method sync_partial_information()
834 + *
835 + * @param object $pWebsite The website object.
836 + * @param array $information Array contaning information returned from child site.
837 + */
838 + public static function sync_partial_information( &$pWebsite, &$information ) {
839 + $websiteValues = array();
840 +
841 + /**
842 + * Filter: mainwp_before_save_partial_sync_result
843 + *
844 + * Filters partial sync data returned from the child site before saving it to the database.
845 + *
846 + * @param array $information Partial sync data returned from the child site.
847 + * @param object $pWebsite Object containing child site data.
848 + *
849 + * @since 6.2.1
850 + */
851 + $information = apply_filters( 'mainwp_before_save_partial_sync_result', $information, $pWebsite );
852 +
853 + if ( isset( $information['plugins'] ) ) {
854 + $plugins_info = $information['plugins'];
855 + $websiteValues['plugins'] = wp_json_encode( $plugins_info );
856 + }
857 + if ( ! empty( $websiteValues ) ) {
858 + MainWP_DB::instance()->update_website_values( $pWebsite->id, $websiteValues );
859 + }
860 + }
861 +
832 862
833 863 /**
834 864 * Method get_telem_sync_info.
835 865 *