当前位置: 首页>>代码示例>>PHP>>正文


PHP MainWP_Utility::array_merge方法代码示例

本文整理汇总了PHP中MainWP_Utility::array_merge方法的典型用法代码示例。如果您正苦于以下问题:PHP MainWP_Utility::array_merge方法的具体用法?PHP MainWP_Utility::array_merge怎么用?PHP MainWP_Utility::array_merge使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MainWP_Utility的用法示例。


在下文中一共展示了MainWP_Utility::array_merge方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: mainwp_cronupdatescheck_action


//.........这里部分代码省略.........
                     $pluginConflicts .= $sitePluginConflict;
                     $added = true;
                 }
                 $pluginConflicts .= '</li>' . "\n";
             }
             /**
              * Show theme conflicts
              */
             $siteThemeConflicts = json_decode($website->themeConflicts, true);
             if (count($siteThemeConflicts) > 0) {
                 $infoTxt = '<a href="' . admin_url('admin.php?page=managesites&dashboard=' . $website->id) . '">' . stripslashes($website->name) . '</a> - ';
                 $themeConflicts .= '<li>' . $infoTxt;
                 $added = false;
                 foreach ($siteThemeConflicts as $siteThemeConflict) {
                     if ($added) {
                         $themeConflicts .= ', ';
                     }
                     $themeConflicts .= $siteThemeConflict;
                     $added = true;
                 }
                 $themeConflicts .= '</li>' . "\n";
             }
             //Loop over last plugins & current plugins, check if we need to upgrade them..
             $user = get_userdata($website->userid);
             $email = MainWP_Utility::getNotificationEmail($user);
             MainWP_Utility::update_option('mainwp_updatescheck_mail_email', $email);
             MainWP_DB::Instance()->updateWebsiteSyncValues($website->id, array('dtsAutomaticSync' => time()));
             MainWP_DB::Instance()->updateWebsiteOption($website, 'last_wp_upgrades', json_encode($websiteCoreUpgrades));
             MainWP_DB::Instance()->updateWebsiteOption($website, 'last_plugin_upgrades', $website->plugin_upgrades);
             MainWP_DB::Instance()->updateWebsiteOption($website, 'last_theme_upgrades', $website->theme_upgrades);
         }
         if (count($coreNewUpdate) != 0) {
             $coreNewUpdateSaved = get_option('mainwp_updatescheck_mail_update_core_new');
             MainWP_Utility::update_option('mainwp_updatescheck_mail_update_core_new', MainWP_Utility::array_merge($coreNewUpdateSaved, $coreNewUpdate));
         }
         if (count($pluginsNewUpdate) != 0) {
             $pluginsNewUpdateSaved = get_option('mainwp_updatescheck_mail_update_plugins_new');
             MainWP_Utility::update_option('mainwp_updatescheck_mail_update_plugins_new', MainWP_Utility::array_merge($pluginsNewUpdateSaved, $pluginsNewUpdate));
         }
         if (count($themesNewUpdate) != 0) {
             $themesNewUpdateSaved = get_option('mainwp_updatescheck_mail_update_themes_new');
             MainWP_Utility::update_option('mainwp_updatescheck_mail_update_themes_new', MainWP_Utility::array_merge($themesNewUpdateSaved, $themesNewUpdate));
         }
         if (count($coreToUpdate) != 0) {
             $coreToUpdateSaved = get_option('mainwp_updatescheck_mail_update_core');
             MainWP_Utility::update_option('mainwp_updatescheck_mail_update_core', MainWP_Utility::array_merge($coreToUpdateSaved, $coreToUpdate));
         }
         if (count($pluginsToUpdate) != 0) {
             $pluginsToUpdateSaved = get_option('mainwp_updatescheck_mail_update_plugins');
             MainWP_Utility::update_option('mainwp_updatescheck_mail_update_plugins', MainWP_Utility::array_merge($pluginsToUpdateSaved, $pluginsToUpdate));
         }
         if (count($themesToUpdate) != 0) {
             $themesToUpdateSaved = get_option('mainwp_updatescheck_mail_update_themes');
             MainWP_Utility::update_option('mainwp_updatescheck_mail_update_themes', MainWP_Utility::array_merge($themesToUpdateSaved, $themesToUpdate));
         }
         if (count($ignoredCoreToUpdate) != 0) {
             $ignoredCoreToUpdateSaved = get_option('mainwp_updatescheck_mail_ignore_core');
             MainWP_Utility::update_option('mainwp_updatescheck_mail_ignore_core', MainWP_Utility::array_merge($ignoredCoreToUpdateSaved, $ignoredCoreToUpdate));
         }
         if (count($ignoredCoreNewUpdate) != 0) {
             $ignoredCoreNewUpdateSaved = get_option('mainwp_updatescheck_mail_ignore_core_new');
             MainWP_Utility::update_option('mainwp_updatescheck_mail_ignore_core_new', MainWP_Utility::array_merge($ignoredCoreNewUpdateSaved, $ignoredCoreNewUpdate));
         }
         if (count($ignoredPluginsToUpdate) != 0) {
             $ignoredPluginsToUpdateSaved = get_option('mainwp_updatescheck_mail_ignore_plugins');
             MainWP_Utility::update_option('mainwp_updatescheck_mail_ignore_plugins', MainWP_Utility::array_merge($ignoredPluginsToUpdateSaved, $ignoredPluginsToUpdate));
开发者ID:reeslo,项目名称:mainwp,代码行数:67,代码来源:class-mainwp-system.php


注:本文中的MainWP_Utility::array_merge方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。