Changeset 13559
- Timestamp:
- 04/18/2024 03:16:55 AM (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support-2024/functions.php
r13552 r13559 32 32 * Register a local nav menu for non-English forums, if it doesn't already exist. 33 33 */ 34 function register_local_nav_menu() {34 function wporg_support_register_local_nav_menu() { 35 35 if ( substr( get_locale(), 0, 2 ) === 'en' || get_local_nav_menu_object() ) { 36 36 return; … … 39 39 register_nav_menu( 'local-navigation', __( 'Local Navigation', 'wporg-forums' ) ); 40 40 } 41 add_action( 'after_setup_theme', ' register_local_nav_menu' );41 add_action( 'after_setup_theme', 'wporg_support_register_local_nav_menu' ); 42 42 43 43 /** 44 44 * Provide a list of local navigation menus. 45 45 */ 46 function add_site_navigation_menus( $menus ) {46 function wporg_support_add_site_navigation_menus( $menus ) { 47 47 if ( is_admin() ) { 48 48 return; … … 101 101 } 102 102 } 103 add_filter( 'wporg_block_navigation_menus', ' \add_site_navigation_menus' );103 add_filter( 'wporg_block_navigation_menus', 'wporg_support_add_site_navigation_menus' ); 104 104 105 105 /** 106 106 * Register patterns from the patterns directory. 107 107 */ 108 function register_patterns() {108 function wporg_support_register_patterns() { 109 109 $pattern_directory = new DirectoryIterator( get_template_directory() . '/patterns/' ); 110 110 foreach ( $pattern_directory as $file ) { … … 114 114 } 115 115 } 116 add_action( 'init', ' register_patterns' );116 add_action( 'init', 'wporg_support_register_patterns' ); 117 117 118 118 /** … … 181 181 * @return WP_Theme_JSON_Data The updated theme.json settings. 182 182 */ 183 function merge_parent_support_theme_json( $theme_json ) {183 function wporg_support_merge_parent_support_theme_json( $theme_json ) { 184 184 $support_theme_json_data = $theme_json->get_data(); 185 185 $parent_theme_json_data = json_decode( file_get_contents( get_theme_root( 'wporg-parent-2021' ) . '/wporg-parent-2021/theme.json' ), true ); … … 213 213 214 214 } 215 add_filter( 'wp_theme_json_data_theme', ' merge_parent_support_theme_json' );215 add_filter( 'wp_theme_json_data_theme', 'wporg_support_merge_parent_support_theme_json' ); 216 216 217 217 /**
Note: See TracChangeset
for help on using the changeset viewer.