$length) { $stringCut = substr($string, 0, $length); $string = substr($stringCut, 0, strrpos($stringCut, ' ')). ' ...'; } return $string; } // Fix current menu item class for CPT archives function current_menu_item_for_archives($menu) { global $post; if (is_singular('post')) { $menu = str_replace( 'news', 'news current-menu-item', $menu ); } if (get_post_type($post) == 'resources') { $menu = str_replace( 'resources', 'resources current-menu-item', $menu ); } return $menu; } add_filter( 'nav_menu_css_class', 'current_menu_item_for_archives', 10,2 ); add_action('wp_dashboard_setup', 'mio_custom_dashboard_widgets'); function mio_custom_dashboard_widgets() { global $wp_meta_boxes; wp_add_dashboard_widget('custom_help_widget', 'Make It Open - website manual', 'mio_dashboard_widget'); } function mio_dashboard_widget() { echo ''; echo 'Welcome to the Make It Open CMS!'; echo '

Here is a list quick links to edit this site:

'; echo '
  • Add a news article
  • '; echo '
  • Add a new page
  • '; echo '
  • Add a new resource
  • '; echo '
  • Add a new event
  • '; echo '
  • Change the homepage
  • '; echo '
  • Change the menu
  • '; echo '
  • Change the footer
  • '; }