Plugin Directory

Changeset 850411


Ignore:
Timestamp:
02/03/2014 09:26:20 AM (12 years ago)
Author:
dharmapoudel
Message:

fixed error notice on install

Location:
page-specific-menu-items/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • page-specific-menu-items/trunk/page_specific_menu_items.php

    r846807 r850411  
    6767        **/
    6868        public static function psmi_install() {
    69            
     69            // do nothing
     70        }
     71
     72
     73               
     74        /**
     75        * uninstall
     76        **/
     77        public static function psmi_uninstall() {
     78            delete_option('psmi_defaults');
     79        }
     80
     81
     82       
     83       
     84        /**
     85         * localization
     86        **/
     87        function psmi_init() {
     88            //initialize
    7089            $menu_id ='';
    7190            $menus = wp_get_nav_menus();
     
    7695                }
    7796            }
    78             add_option('psmi_defaults', array('post_type'=>array('page'),'menu_id'=>$menu_id));
    79         }
    80 
    81 
    82                
    83         /**
    84         * uninstall
    85         **/
    86         public static function psmi_uninstall() {
    87             delete_option('psmi_defaults');
    88         }
    89 
    90 
    91        
    92        
    93         /**
    94          * localization
    95         **/
    96         function psmi_init() {
    97             //initialize
    98             $this->psmi_defaults = array_merge($this->psmi_defaults, get_option( 'psmi_defaults' ));
     97           
     98            $this->psmi_defaults = get_option( 'psmi_defaults' )
     99                ? get_option( 'psmi_defaults' )
     100                : array('post_type'=>array('page'),'menu_id'=>$menu_id);
    99101
    100102            if(function_exists('load_plugin_textdomain')) {
     
    103105           
    104106        }
    105        
    106        
     107
    107108       
    108109        /**
  • page-specific-menu-items/trunk/readme.txt

    r846807 r850411  
    33Requires at least: 3.5
    44Tested up to: 3.8
    5 Stable tag: 1.2
     5Stable tag: 1.3
    66License: GPLv3
    77Contributors: dharmapoudel
     
    4242== Changelog ==
    4343
     44= 1.3 (2014-2-3) =
     45* Fixed the warning on plugin install
     46* Plugin should now work smoothly
     47
     48= 1.2 (2014-1-29) =
     49* Bug fixes and optimization
     50
    4451= 1.1 (2014-1-28) =
    4552* Fixed menu selection on setting page
Note: See TracChangeset for help on using the changeset viewer.