Changeset 994606
- Timestamp:
- 09/22/2014 10:32:03 AM (12 years ago)
- Location:
- fixed-circular-navigation-menu/trunk
- Files:
-
- 3 edited
-
README.txt (modified) (1 diff)
-
admin/admin-page-class.php (modified) (3 diffs)
-
circular-nav.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
fixed-circular-navigation-menu/trunk/README.txt
r984964 r994606 129 129 130 130 == Changelog == 131 = 1.1.1 = 132 * Fix: quick patch so PHP 5.2 hosting users no longer get an error regarding array_replace_recursive() function, which is only available in PHP>=5.3 133 131 134 = 1.1.0 = 132 135 * Please, after upgrading, you must go to circular navigation option panel and click save changes. -
fixed-circular-navigation-menu/trunk/admin/admin-page-class.php
r984950 r994606 3284 3284 * @author Ohad Raz 3285 3285 * @since 1.0.0 3286 * @modified since 1.1.0 3286 3287 * @access public 3287 3288 * @param $id string field id, i.e. the meta key … … 3299 3300 public function addPosts($id,$options,$args,$repeater=false){ 3300 3301 $temp = array('type'=>'select','args'=>array('posts_per_page' => -1,'post_type' =>'post')); 3301 $options = array_replace_recursive($temp,$options); 3302 //$options = array_replace_recursive($temp,$options); 3303 $options = array_replace_recursive_php52($temp,$options); 3302 3304 $new_field = array('type' => 'posts','id'=> $id,'desc' => '','name' => 'Posts Field','options'=> $options, 'multiple' => false); 3303 3305 $new_field = array_merge($new_field, $args); … … 3935 3937 3936 3938 endif; // End Check Class Exists 3939 3940 /** 3941 * Auxiliar functions to make plugin compatible with PHP 5.2 old version 3942 * array_replace_recursive() function Was used in the option panel to generate a list of post and pages to be linked in navigation elements 3943 * that function is only available in PHP>=5.3 3944 * 3945 * @since 1.1.1 3946 * @access not part of the admin class 3947 */ 3948 function array_replace_recursive_php52($array, $array1) 3949 { 3950 // handle the arguments, merge one by one 3951 $args = func_get_args(); 3952 $array = $args[0]; 3953 if (!is_array($array)) 3954 { 3955 return $array; 3956 } 3957 for ($i = 1; $i < count($args); $i++) 3958 { 3959 if (is_array($args[$i])) 3960 { 3961 $array = recurse_php52($array, $args[$i]); 3962 } 3963 } 3964 return $array; 3965 } 3966 function recurse_php52($array, $array1) 3967 { 3968 foreach ($array1 as $key => $value) 3969 { 3970 // create new key in $array, if it is empty or not an array 3971 if (!isset($array[$key]) || (isset($array[$key]) && !is_array($array[$key]))) 3972 { 3973 $array[$key] = array(); 3974 } 3975 3976 // overwrite the value in the base array 3977 if (is_array($value)) 3978 { 3979 $value = recurse_php52($array[$key], $value); 3980 } 3981 $array[$key] = $value; 3982 } 3983 return $array; 3984 } -
fixed-circular-navigation-menu/trunk/circular-nav.php
r984950 r994606 11 11 * Plugin URI: http://wordpress-fixed-circular-nav.e-crespo.com 12 12 * Description: This plugin adds a fancy customizable fixed circular navigation menu to your wordpress theme. This can be used as an auxiliar navigation or even as a main menu for your website. 13 * Version: 1.1. 013 * Version: 1.1.1 14 14 * Author: Enrique Crespo Molera 15 15 * Author URI: http://www.e-crespo.com
Note: See TracChangeset
for help on using the changeset viewer.