nxs_MergeCookieArr

The NextScripts: Social Networks Auto-Poster nxs MergeCookieArr function.

Description

nxs_MergeCookieArr( $ArrO, $ArrN ); 

Parameters (2)

0. $arro
The arro.
1. $arrn
The arrn.

Usage

  1. if ( !function_exists( 'nxs_MergeCookieArr' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'nextscripts-social-networks-auto-poster/nxs_functions.php'; 
  3.  
  4. // The arro. 
  5. $arro = null; 
  6.  
  7. // The arrn. 
  8. $arrn = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = nxs_MergeCookieArr($arro, $arrn); 
  12.  

Defined (1)

The function is defined in the following location(s).

/nxs_functions.php  
  1. if (!function_exists('nxs_MergeCookieArr')) {function nxs_MergeCookieArr($ArrO, $ArrN) { $namesArr = array(); foreach($ArrO as $key => $value) { if (is_object($value)) $namesArr[$key] = $value->name; }  
  2. foreach($ArrN as $key => $value) { if (is_object($value) && $value->value!='deleted') { $isEx = array_search($value->name, $namesArr); if ($isEx===false) $ArrO[] = $value; else $ArrO[$isEx] = $value;}} return $ArrO; 
  3. }}