Advertisement
Guest User

Untitled

a guest
Jun 13th, 2013
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. if ( (!$widget_options = get_site_option( 'cc_dashboard_widget_options', false ))) {
  2. $widget_options = array();
  3. }
  4. if ( isset($widget_options['custom_content_dashboard']['allow_override']) &&
  5. $widget_options['custom_content_dashboard']['allow_override'] == 'no') {
  6. $my_widget_options = get_option( 'my_dashboard_widget_options', false );
  7. if ( $my_widget_options ) {
  8. $widget_options = $my_widget_options;
  9. }
  10. }
  11.  
  12. if ( !isset($widget_options['custom_content_dashboard']) )
  13. $widget_options['custom_content_dashboard'] = array();
  14.  
  15. if ( !isset($widget_options['custom_content_dashboard']['content']) )
  16. $widget_options['custom_content_dashboard']['content'] = 'For starters, you might want to try the following:<br />
  17. <br />
  18. - <a href="">Change Avatar</a><br />
  19. <br />
  20. - <a target="_blank" href="http://mysite/edtech/">View our support resources</a><br />
  21. <br />
  22. - <a target="_blank" href="http://mysite/">Join or create a group</a><br />
  23. <br />
  24. - <a target="_blank" href="http://mysite/">Find a conversation</a><br />
  25. <br />
  26. - <a target="_blank" href="mysite/">Follow community member posts and view profiles</a><br />';
  27.  
  28. if ( !isset($widget_options['custom_content_dashboard']['eval']) )
  29. $widget_options['custom_content_dashboard']['eval'] = 'no';
  30.  
  31. if (file_exists($contents_file)) {
  32. return file_get_contents($contents_file);
  33. }
  34.  
  35. if (isset($widget_options['custom_content_dashboard']) && isset($widget_options['custom_content_dashboard']['content']) &&
  36. !empty($widget_options['custom_content_dashboard']['content'])) {
  37. if ($widget_options['custom_content_dashboard']['eval'] == 'yes') {
  38. eval(stripcslashes($widget_options['custom_content_dashboard']['content']));
  39. } else {
  40. return stripcslashes($widget_options['custom_content_dashboard']['content']);
  41. }
  42. }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement