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


PHP SucomUtil::array_merge_recursive_distinct方法代码示例

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


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

示例1: get_config

 public static function get_config($idx = '', $filter = false)
 {
     if (!isset(self::$cf['config_filtered']) || self::$cf['config_filtered'] !== true) {
         // remove the sharing libs if social sharing features are disabled
         if (defined('NGFB_SOCIAL_SHARING_DISABLE') && NGFB_SOCIAL_SHARING_DISABLE) {
             foreach (self::$cf['plugin'] as $lca => $info) {
                 unset($info['lib']['website'], $info['lib']['submenu']['sharing'], $info['lib']['submenu']['style'], $info['lib']['shortcode']['sharing'], $info['lib']['widget']['sharing'], $info['lib']['gpl']['admin']['sharing'], $info['lib']['gpl']['admin']['style'], $info['lib']['gpl']['admin']['apikeys'], $info['lib']['pro']['admin']['sharing'], $info['lib']['pro']['admin']['style'], $info['lib']['pro']['admin']['apikeys'], $info['lib']['pro']['util']['shorten']);
                 self::$cf['plugin'][$lca] = $info;
             }
         }
         if ($filter === true) {
             self::$cf = apply_filters(self::$cf['lca'] . '_get_config', self::$cf);
             self::$cf['config_filtered'] = true;
             self::$cf['*'] = array('lib' => array(), 'version' => '');
             foreach (self::$cf['plugin'] as $lca => $info) {
                 if (isset($info['lib']) && is_array($info['lib'])) {
                     self::$cf['*']['lib'] = SucomUtil::array_merge_recursive_distinct(self::$cf['*']['lib'], $info['lib']);
                 }
                 if (isset($info['version'])) {
                     self::$cf['*']['version'] .= '-' . $lca . $info['version'];
                 }
             }
             self::$cf['*']['version'] = trim(self::$cf['*']['version'], '-');
         }
     }
     if (!empty($idx)) {
         if (array_key_exists($idx, self::$cf)) {
             return self::$cf[$idx];
         } else {
             return false;
         }
     } else {
         return self::$cf;
     }
 }
开发者ID:christocmp,项目名称:bingopaws,代码行数:35,代码来源:config.php

示例2: get_config

 public static function get_config($idx = '', $filter = false)
 {
     if (!isset(self::$cf['config_filtered']) || self::$cf['config_filtered'] !== true) {
         if ($filter === true) {
             self::$cf = apply_filters(self::$cf['lca'] . '_get_config', self::$cf);
             self::$cf['config_filtered'] = true;
             self::$cf['*'] = array('lib' => array(), 'version' => '');
             foreach (self::$cf['plugin'] as $lca => $info) {
                 if (isset($info['lib']) && is_array($info['lib'])) {
                     self::$cf['*']['lib'] = SucomUtil::array_merge_recursive_distinct(self::$cf['*']['lib'], $info['lib']);
                 }
                 if (isset($info['version'])) {
                     self::$cf['*']['version'] .= '-' . $lca . $info['version'];
                 }
             }
             self::$cf['*']['version'] = trim(self::$cf['*']['version'], '-');
         }
     }
     if (!empty($idx)) {
         if (array_key_exists($idx, self::$cf)) {
             return self::$cf[$idx];
         } else {
             return false;
         }
     } else {
         return self::$cf;
     }
 }
开发者ID:christocmp,项目名称:bingopaws,代码行数:28,代码来源:config.php

示例3: get_config

 public static function get_config($idx = false, $filter = false)
 {
     if (!isset(self::$cf['config_filtered']) || self::$cf['config_filtered'] !== true) {
         // remove the sharing libs if social sharing features are disabled
         if (defined('NGFB_SOCIAL_SHARING_DISABLE') && NGFB_SOCIAL_SHARING_DISABLE) {
             foreach (array_keys(self::$cf['plugin']) as $lca) {
                 unset(self::$cf['plugin'][$lca]['lib']['website'], self::$cf['plugin'][$lca]['lib']['submenu']['sharing'], self::$cf['plugin'][$lca]['lib']['submenu']['style'], self::$cf['plugin'][$lca]['lib']['shortcode']['sharing'], self::$cf['plugin'][$lca]['lib']['widget']['sharing'], self::$cf['plugin'][$lca]['lib']['gpl']['admin']['sharing'], self::$cf['plugin'][$lca]['lib']['gpl']['admin']['style'], self::$cf['plugin'][$lca]['lib']['pro']['admin']['sharing'], self::$cf['plugin'][$lca]['lib']['pro']['admin']['style']);
             }
         }
         if ($filter === true) {
             self::$cf = apply_filters(self::$cf['lca'] . '_get_config', self::$cf);
             self::$cf['config_filtered'] = true;
             self::$cf['*'] = array('lib' => array(), 'version' => '');
             foreach (self::$cf['plugin'] as $lca => $info) {
                 if (isset($info['lib']) && is_array($info['lib'])) {
                     self::$cf['*']['lib'] = SucomUtil::array_merge_recursive_distinct(self::$cf['*']['lib'], $info['lib']);
                 }
                 if (isset($info['version'])) {
                     self::$cf['*']['version'] .= '-' . $lca . $info['version'];
                 }
             }
             self::$cf['*']['version'] = trim(self::$cf['*']['version'], '-');
         }
         // complete relative paths in the image array
         foreach (self::$cf['plugin'] as $lca => $info) {
             if (isset($info['base'])) {
                 $base = self::$cf['plugin'][$lca]['base'];
                 // nextgen-facebook/nextgen-facebook.php
                 foreach (array('img') as $sub) {
                     if (isset($info[$sub]) && is_array($info[$sub])) {
                         foreach ($info[$sub] as $id => $url) {
                             if (!empty($url) && strpos($url, '//') === false) {
                                 self::$cf['plugin'][$lca][$sub][$id] = trailingslashit(plugins_url('', $base)) . $url;
                             }
                         }
                     }
                 }
             }
         }
     }
     if ($idx !== false) {
         if (array_key_exists($idx, self::$cf)) {
             return self::$cf[$idx];
         } else {
             return false;
         }
     } else {
         return self::$cf;
     }
 }
开发者ID:jamesvillarrubia,项目名称:uniken-web,代码行数:50,代码来源:config.php

示例4: get_config

 public static function get_config($idx = false, $filter = false)
 {
     if (!isset(self::$cf['config_filtered']) || self::$cf['config_filtered'] !== true) {
         if ($filter === true) {
             self::$cf['opt']['version'] .= is_dir(trailingslashit(dirname(__FILE__)) . 'pro/') ? 'pro' : 'gpl';
             self::$cf = apply_filters(self::$cf['lca'] . '_get_config', self::$cf);
             self::$cf['config_filtered'] = true;
             self::$cf['*'] = array('lib' => array(), 'version' => '');
             foreach (self::$cf['plugin'] as $lca => $info) {
                 if (isset($info['lib']) && is_array($info['lib'])) {
                     self::$cf['*']['lib'] = SucomUtil::array_merge_recursive_distinct(self::$cf['*']['lib'], $info['lib']);
                 }
                 if (isset($info['version'])) {
                     self::$cf['*']['version'] .= '-' . $lca . $info['version'];
                 }
             }
             self::$cf['*']['version'] = trim(self::$cf['*']['version'], '-');
         }
         // complete relative paths in the image array
         foreach (self::$cf['plugin'] as $lca => $info) {
             if (isset($info['base'])) {
                 $base = self::$cf['plugin'][$lca]['base'];
                 // wpsso/wpsso.php
                 foreach (array('img') as $sub) {
                     if (isset($info[$sub]) && is_array($info[$sub])) {
                         foreach ($info[$sub] as $id => $url) {
                             if (!empty($url) && strpos($url, '//') === false) {
                                 self::$cf['plugin'][$lca][$sub][$id] = trailingslashit(plugins_url('', $base)) . $url;
                             }
                         }
                     }
                 }
             }
         }
     }
     if (!empty($idx)) {
         if (array_key_exists($idx, self::$cf)) {
             return self::$cf[$idx];
         } else {
             return false;
         }
     } else {
         return self::$cf;
     }
 }
开发者ID:eugene-gromky-co,项目名称:mindfulnesssummit,代码行数:45,代码来源:config.php

示例5: get_avail

 public function get_avail()
 {
     $ret = array();
     $ret['curl'] = function_exists('curl_init') ? true : false;
     $ret['mbdecnum'] = function_exists('mb_decode_numericentity') ? true : false;
     $ret['postthumb'] = function_exists('has_post_thumbnail') ? true : false;
     $ret['metatags'] = (!defined('NGFB_META_TAGS_DISABLE') || defined('NGFB_META_TAGS_DISABLE') && !NGFB_META_TAGS_DISABLE) && empty($_SERVER['NGFB_META_TAGS_DISABLE']) ? true : false;
     $ret['opengraph'] = (!defined('NGFB_OPEN_GRAPH_DISABLE') || defined('NGFB_OPEN_GRAPH_DISABLE') && !NGFB_OPEN_GRAPH_DISABLE) && empty($_SERVER['NGFB_OPEN_GRAPH_DISABLE']) && file_exists(NGFB_PLUGINDIR . 'lib/opengraph.php') && class_exists($this->p->cf['lca'] . 'opengraph') ? true : false;
     $ret['aop'] = (!defined('NGFB_PRO_ADDON_DISABLE') || defined('NGFB_PRO_ADDON_DISABLE') && !NGFB_PRO_ADDON_DISABLE) && file_exists(NGFB_PLUGINDIR . 'lib/pro/head/twittercard.php') ? true : false;
     $ret['ssb'] = (!defined('NGFB_SOCIAL_SHARING_DISABLE') || defined('NGFB_SOCIAL_SHARING_DISABLE') && !NGFB_SOCIAL_SHARING_DISABLE) && empty($_SERVER['NGFB_SOCIAL_SHARING_DISABLE']) && file_exists(NGFB_PLUGINDIR . 'lib/sharing.php') && class_exists($this->p->cf['lca'] . 'sharing') ? true : false;
     foreach ($this->p->cf['cache'] as $name => $val) {
         $constant_name = 'NGFB_' . strtoupper($name) . '_CACHE_DISABLE';
         $ret['cache'][$name] = defined($constant_name) && constant($constant_name) ? false : true;
     }
     foreach (SucomUtil::array_merge_recursive_distinct($this->p->cf['*']['lib']['pro'], self::$mac) as $sub => $lib) {
         $ret[$sub] = array();
         $ret[$sub]['*'] = false;
         foreach ($lib as $id => $name) {
             $chk = array();
             $ret[$sub][$id] = false;
             // default value
             switch ($sub . '-' . $id) {
                 /*
                  * 3rd Party Plugins
                  */
                 case 'ecom-edd':
                     $chk['class'] = 'Easy_Digital_Downloads';
                     $chk['plugin'] = 'easy-digital-downloads/easy-digital-downloads.php';
                     break;
                 case 'ecom-marketpress':
                     $chk['class'] = 'MarketPress';
                     $chk['plugin'] = 'wordpress-ecommerce/marketpress.php';
                     break;
                 case 'ecom-woocommerce':
                     $chk['class'] = 'Woocommerce';
                     $chk['plugin'] = 'woocommerce/woocommerce.php';
                     break;
                 case 'ecom-wpecommerce':
                     $chk['class'] = 'WP_eCommerce';
                     $chk['plugin'] = 'wp-e-commerce/wp-shopping-cart.php';
                     break;
                 case 'forum-bbpress':
                     $chk['class'] = 'bbPress';
                     $chk['plugin'] = 'bbpress/bbpress.php';
                     break;
                 case 'lang-polylang':
                     $chk['class'] = 'Polylang';
                     $chk['plugin'] = 'polylang/polylang.php';
                     break;
                 case 'media-ngg':
                     $chk['class'] = 'nggdb';
                     // C_NextGEN_Bootstrap
                     $chk['plugin'] = 'nextgen-gallery/nggallery.php';
                     break;
                 case 'media-photon':
                     if (class_exists('Jetpack') && method_exists('Jetpack', 'get_active_modules') && in_array('photon', Jetpack::get_active_modules())) {
                         $ret[$sub]['*'] = $ret[$sub][$id] = true;
                     }
                     break;
                 case 'seo-aioseop':
                     $chk['class'] = 'All_in_One_SEO_Pack';
                     $chk['plugin'] = 'all-in-one-seo-pack/all-in-one-seo-pack.php';
                     break;
                 case 'seo-headspace2':
                     $chk['class'] = 'HeadSpace_Plugin';
                     $chk['plugin'] = 'headspace2/headspace.php';
                     break;
                 case 'seo-seou':
                     $chk['class'] = 'SEO_Ultimate';
                     $chk['plugin'] = 'seo-ultimate/seo-ultimate.php';
                     break;
                 case 'seo-wpseo':
                     $chk['function'] = 'wpseo_init';
                     $chk['plugin'] = 'wordpress-seo/wp-seo.php';
                     break;
                 case 'social-buddypress':
                     $chk['class'] = 'BuddyPress';
                     $chk['plugin'] = 'buddypress/bp-loader.php';
                     break;
                     /*
                      * Pro Version Features / Options
                      */
                 /*
                  * Pro Version Features / Options
                  */
                 case 'head-twittercard':
                     $chk['optval'] = 'tc_enable';
                     break;
                 case 'media-gravatar':
                     $chk['optval'] = 'plugin_gravatar_api';
                     break;
                 case 'media-slideshare':
                     $chk['optval'] = 'plugin_slideshare_api';
                     break;
                 case 'media-vimeo':
                     $chk['optval'] = 'plugin_vimeo_api';
                     break;
                 case 'media-wistia':
                     $chk['optval'] = 'plugin_wistia_api';
                     break;
//.........这里部分代码省略.........
开发者ID:christocmp,项目名称:bingopaws,代码行数:101,代码来源:check.php

示例6: get_avail

 public function get_avail()
 {
     $ret = array();
     $is_admin = is_admin();
     $ret['curl'] = function_exists('curl_init') ? true : false;
     $ret['postthumb'] = function_exists('has_post_thumbnail') ? true : false;
     $ret['mbstring'] = extension_loaded('mbstring') ? true : false;
     foreach (array('aop', 'mt') as $key) {
         $ret[$key] = $this->get_avail_check($key);
     }
     foreach ($this->p->cf['cache'] as $name => $val) {
         $constant_name = 'WPSSO_' . strtoupper($name) . '_CACHE_DISABLE';
         $ret['cache'][$name] = defined($constant_name) && constant($constant_name) ? false : true;
     }
     foreach (SucomUtil::array_merge_recursive_distinct($this->p->cf['*']['lib']['pro'], self::$extend_checks) as $sub => $lib) {
         $ret[$sub] = array();
         $ret[$sub]['*'] = false;
         foreach ($lib as $id => $name) {
             $chk = array();
             $ret[$sub][$id] = false;
             // default value
             switch ($sub . '-' . $id) {
                 /*
                  * 3rd Party Plugins
                  */
                 case 'ecom-edd':
                     $chk['class'] = 'Easy_Digital_Downloads';
                     $chk['plugin'] = 'easy-digital-downloads/easy-digital-downloads.php';
                     break;
                 case 'ecom-marketpress':
                     $chk['class'] = 'MarketPress';
                     $chk['plugin'] = 'wordpress-ecommerce/marketpress.php';
                     break;
                 case 'ecom-woocommerce':
                     $chk['class'] = 'Woocommerce';
                     $chk['plugin'] = 'woocommerce/woocommerce.php';
                     break;
                 case 'ecom-wpecommerce':
                     $chk['class'] = 'WP_eCommerce';
                     $chk['plugin'] = 'wp-e-commerce/wp-shopping-cart.php';
                     break;
                 case 'ecom-yotpowc':
                     // yotpo-social-reviews-for-woocommerce
                     $chk['function'] = 'wc_yotpo_init';
                     break;
                 case 'forum-bbpress':
                     $chk['class'] = 'bbPress';
                     $chk['plugin'] = 'bbpress/bbpress.php';
                     break;
                 case 'lang-polylang':
                     $chk['class'] = 'Polylang';
                     $chk['plugin'] = 'polylang/polylang.php';
                     break;
                 case 'media-ngg':
                     $chk['class'] = 'nggdb';
                     // C_NextGEN_Bootstrap
                     $chk['plugin'] = 'nextgen-gallery/nggallery.php';
                     break;
                 case 'media-photon':
                     if (class_exists('Jetpack') && method_exists('Jetpack', 'get_active_modules') && in_array('photon', Jetpack::get_active_modules())) {
                         $ret[$sub]['*'] = $ret[$sub][$id] = true;
                     }
                     break;
                 case 'seo-aioseop':
                     $chk['class'] = 'All_in_One_SEO_Pack';
                     break;
                 case 'seo-headspace2':
                     $chk['class'] = 'HeadSpace_Plugin';
                     $chk['plugin'] = 'headspace2/headspace.php';
                     break;
                 case 'seo-seou':
                     $chk['class'] = 'SEO_Ultimate';
                     $chk['plugin'] = 'seo-ultimate/seo-ultimate.php';
                     break;
                 case 'seo-wpseo':
                     $chk['function'] = 'wpseo_init';
                     $chk['plugin'] = 'wordpress-seo/wp-seo.php';
                     break;
                 case 'social-buddypress':
                     $chk['class'] = 'BuddyPress';
                     $chk['plugin'] = 'buddypress/bp-loader.php';
                     break;
                     /*
                      * Pro Version Features / Options
                      */
                 /*
                  * Pro Version Features / Options
                  */
                 case 'media-gravatar':
                     $chk['optval'] = 'plugin_gravatar_api';
                     break;
                 case 'media-slideshare':
                     $chk['optval'] = 'plugin_slideshare_api';
                     break;
                 case 'media-vimeo':
                     $chk['optval'] = 'plugin_vimeo_api';
                     break;
                 case 'media-wistia':
                     $chk['optval'] = 'plugin_wistia_api';
                     break;
//.........这里部分代码省略.........
开发者ID:sonvq,项目名称:passioninvestment,代码行数:101,代码来源:check.php

示例7: wpsso_get_config

 public function wpsso_get_config($cf, $plugin_version = 0)
 {
     $info = WpssoJsonConfig::$cf['plugin']['wpssojson'];
     if (version_compare($plugin_version, $info['req']['min_version'], '<')) {
         self::$have_min = false;
         return $cf;
     }
     return SucomUtil::array_merge_recursive_distinct($cf, WpssoJsonConfig::$cf);
 }
开发者ID:SurniaUlula,项目名称:wpsso-schema-json-ld,代码行数:9,代码来源:wpsso-schema-json-ld.php


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