Changeset 1641 for sites/trunk/global.wordpress.org/public_html/wp-content/themes/rosetta/functions.php
- Timestamp:
- 05/30/2015 10:26:47 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/global.wordpress.org/public_html/wp-content/themes/rosetta/functions.php
r1631 r1641 33 33 add_action( 'after_setup_theme', 'rosetta_after_setup_theme' ); 34 34 35 /** 36 * Prints a hint, which explains that that support questions belong 37 * to the forums, on top of the comment form. 38 */ 35 39 function rosetta_comment_form_support_hint() { 36 40 printf( … … 42 46 add_action( 'comment_form_top', 'rosetta_comment_form_support_hint' ); 43 47 48 /** 49 * Show a home link for our wp_nav_menu() fallback, wp_page_menu(). 50 * 51 * @param array $args An optional array of arguments. 52 * @return array The filtered array of arguments. 53 */ 44 54 function rosetta_wp_page_menu_args( $args ) { 45 55 $args['show_home'] = true; … … 48 58 add_filter( 'wp_page_menu_args', 'rosetta_wp_page_menu_args' ); 49 59 60 /** 61 * The nav menu supports only top level menu items. 62 */ 50 63 function rosetta_admin_footer_nav_menus() { 51 64 echo '<script> wpNavMenu.options.globalMaxDepth = 0; </script>'; … … 53 66 add_action( 'admin_footer-nav-menus.php', 'rosetta_admin_footer_nav_menus' ); 54 67 68 /** 69 * Extend the default WordPress body classes. 70 * 71 * @param array $classes A list of existing body class values. 72 * @return array The filtered body class list. 73 */ 55 74 function rosetta_body_class( $classes ) { 56 75 $classes[] = 'wporg-responsive'; … … 60 79 add_filter( 'body_class', 'rosetta_body_class' ); 61 80 81 /** 82 * Checks if locale provides a custom stylesheet. 83 * 84 * @return boolean True if file exists, false if not. 85 */ 62 86 function is_locale_css() { 63 87 global $rosetta; … … 65 89 } 66 90 91 /** 92 * Returns URL to locale's custom stylesheet. 93 * 94 * @return string URL to custom stylesheet. 95 */ 67 96 function get_locale_css_url() { 68 97 global $rosetta; … … 70 99 } 71 100 72 // Makes final space a non-breaking one, to prevent orphaned word. 101 /** 102 * Makes final space a non-breaking one, to prevent orphaned word. 103 * 104 * @param string $string 105 * @return string 106 */ 73 107 function rosetta_orphan_control( $string ) { 74 108 return substr_replace( $string, ' ', strrpos( $string, ' ' ), 1 );
Note: See TracChangeset
for help on using the changeset viewer.