Advertisement
Guest User

Untitled

a guest
Jul 2nd, 2015
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. function widget($args, $instance){
  2. extract($args);
  3. $title = apply_filters('widget_title', empty($instance['title']) ? 'Choose a service' : $instance['title']);
  4. $lineOne = empty($instance['username']) ? '' : $instance['username'];
  5. $lineTwo = empty($instance['password']) ? '' : $instance['password'];
  6.  
  7. # Before the widget
  8.  
  9. echo $before_widget; // etc...
  10.  
  11. $url = "http://www.nhs.uk/NHSCWS/Services/ServicesSearch.aspx?user=".[USERNAME]."&pwd=".[PASSWORD]."&q=".$_POST['PostCode']."&type=".$_POST['ServiceType']."";
  12.  
  13. $dummy = new My_Widget_Class();
  14. $settings = $dummy->get_settings();
  15.  
  16. $settings[3]
  17.  
  18. SELECT *
  19. FROM `wp_options`
  20. WHERE `option_name`
  21. REGEXP '^widget_'
  22. LIMIT 0 , 30
  23.  
  24. <?php echo get_option('your_widget_option_name'); ?>
  25.  
  26. <?php add_option("my_widget_option_name", 'option_value'); ?>
  27.  
  28. <?php $option_val = get_option("my_widget_option_name"); ?>
  29.  
  30. $dummy = new My_Widget_Class();
  31. $settings = $dummy->get_settings();
  32. $settings = reset($settings);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement