Plugin Directory

Changeset 994606


Ignore:
Timestamp:
09/22/2014 10:32:03 AM (12 years ago)
Author:
e-crespo
Message:

1.1.1 version

Location:
fixed-circular-navigation-menu/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • fixed-circular-navigation-menu/trunk/README.txt

    r984964 r994606  
    129129
    130130== 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
    131134= 1.1.0 =
    132135* 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  
    32843284   *  @author Ohad Raz
    32853285   *  @since  1.0.0
     3286   *  @modified since 1.1.0
    32863287   *  @access public
    32873288   *  @param $id string  field id, i.e. the meta key
     
    32993300  public function addPosts($id,$options,$args,$repeater=false){
    33003301    $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);
    33023304    $new_field = array('type' => 'posts','id'=> $id,'desc' => '','name' => 'Posts Field','options'=> $options, 'multiple' => false);
    33033305    $new_field = array_merge($new_field, $args);
     
    39353937
    39363938endif; // 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*/
     3948function 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  
    1111 * Plugin URI:        http://wordpress-fixed-circular-nav.e-crespo.com
    1212 * 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.0
     13 * Version:           1.1.1
    1414 * Author:            Enrique Crespo Molera
    1515 * Author URI:        http://www.e-crespo.com
Note: See TracChangeset for help on using the changeset viewer.