WordPress.org

Ready to get started?Download WordPress

Forums

Plugin development help required (1 post)

  1. justinesmithies
    Member
    Posted 1 year ago #

    Hi have submitted a plugin to WP and have got an email asking me to change a few things first.

    So the first they ask is that i change the code :

    register_widget_control()

    And

    register_sidebar_widget()

    As they have been depriciated. Now do i understand correctly from the codex that i just replace them with :

    wp_register_sidebar_widget()

    And

    wp_register_widget_control()

    Also they ask :
    Please place your $currency array into a function rather than leaving it as a global variable as you have it now.

    Can someone give me an example please ? Here is the original code :

    $currency = array( 	'USD' => array( 'type' => __('U.S. Dollar', 'dextra'), 			'symbol' => '$'	),
    					'AUD' => array( 'type' => __('Australian Dollar', 'dextra'), 	'symbol' => '$'	),
    					'CAD' => array( 'type' => __('Canadian Dollar', 'dextra'), 		'symbol' => '$'	),
    					'CHF' => array( 'type' => __('Swiss Franc', 'dextra'), 			'symbol' => ''	) ,
    					'CZK' => array( 'type' => __('Czech Koruna', 'dextra'), 			'symbol' => ''	),
    					'DKK' => array( 'type' => __('Danish Krone', 'dextra'), 			'symbol' => ''	),
    					'EUR' => array( 'type' => __('Euro', 'dextra'), 					'symbol' => '€'	),
    					'GBP' => array( 'type' => __('Pound Sterling','dextra'), 		'symbol' => '£'	),
    					'HKD' => array( 'type' => __('Hong Kong Dollar', 'dextra'), 		'symbol' => '$'	),
    					'HUF' => array( 'type' => __('Hungarian Forint', 'dextra'), 		'symbol' => ''	),
    					'ILS' => array( 'type' => __('Israeli New Shekel', 'dextra'), 	'symbol' => ''	),
    					'JPY' => array( 'type' => __('Japanese Yen', 'dextra'), 			'symbol' => '¥'	),
    					'MXN' => array( 'type' => __('Mexican Peso', 'dextra'), 			'symbol' => '$' ),
    					'NOK' => array( 'type' => __('Norwegian Krone', 'dextra'), 		'symbol' => ''	),
    					'NZD' => array( 'type' => __('New Zealand Dollar', 'dextra'), 	'symbol' => '$'	),
    					'PLN' => array( 'type' => __('Polish Zloty', 'dextra'), 			'symbol' => ''	),
    					'SEK' => array( 'type' => __('Swedish Krona', 'dextra'), 		'symbol' => ''	),
    					'SGD' => array( 'type' => __('Singapore Dollar', 'dextra'), 		'symbol' => '$'	)
    				);

    Thanx for any help received

    Justine

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 1 year ago by justinesmithies
  • This topic is not resolved
  • WordPress version: 3.4.2

Tags

No tags yet.