function lib_move_stuff() { // stuff that broke when I moved wf_lib to a plugin // MISCELLANEOUS ///////////////////////////////////////////////////////////////////////////// // Specify users (by login name) who will see debug info... if (class_exists('Wf_Debug')) { //v6.15 Wf_Debug::$users = array('Wingfinger', 'Bill', 'admin'); } if (function_exists('set_up_mimic_content_filter')) { //v6.15 set_up_mimic_content_filter(); } if (!function_exists('widget_html')) { function widget_html($widget_class, $style, $qstring) { return "<p class='not_found'>Class " . $widget_class . " not found. <strong>wf_library</strong> plugin not loaded.</p>"; } } function get_region_html($region) { if (class_exists('Wf_Widget')) { return Wf_Widget::get_region_html($region); } else { return "Wingfinger Widgets plugin not loaded."; } } function new_excerpt_length($length) { return 25; //to change the number of words in an excerpt } add_filter('excerpt_length', 'new_excerpt_length'); function new_excerpt_more($more) { global $post; return ' <a class=more_link href="' . get_permalink($post->ID) . '">» Read more...</a>'; // to make the read more into a link to the post } add_filter('excerpt_more', 'new_excerpt_more'); if (function_exists('search_request_filter')) { add_filter('request', 'search_request_filter'); // wf_lib.php } if (function_exists('show_future_posts')) { add_filter('the_posts', 'show_future_posts'); } add_theme_support('post-thumbnails'); add_post_type_support('wf_snippet', 'comments'); add_post_type_support('wf_sitenote', 'comments'); // Specify which pages should be excluded from main menu function get_page_excludes() { // v2.19 $excludes = array(); return implode(',', array_keys($excludes)); } // IMAGE SIZES ///////////////////////////////////////////////////////////////////////////// global $content_width; $content_width = 740; // limits width of large size uploads - www.deluxeblogtips.com/2010/05/max-image-size-wordpress-theme.html if (false === get_option("medium_crop")) { // force WP to crop medium images: wordpress.org/support/topic/force-crop-to-medium-size add_option("medium_crop", "1"); } else { update_option("medium_crop", "1"); } if (false === get_option("large_crop")) { // force WP to crop large images: wordpress.org/support/topic/force-crop-to-medium-size add_option("large_crop", "1"); } else { update_option("large_crop", "1"); } }