- Timestamp:
- 11/13/2021 02:33:37 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-templates/bp-nouveau/includes/functions.php
r13144 r13145 4 4 * 5 5 * @since 3.0.0 6 * @version 9.0.06 * @version 10.0.0 7 7 */ 8 8 … … 1640 1640 return $widget_content; 1641 1641 } 1642 1643 /** 1644 * Retuns the theme layout available widths. 1645 * 1646 * @since 10.0.0 1647 * 1648 * @return array The available theme layout widths. 1649 */ 1650 function bp_nouveau_get_theme_layout_widths() { 1651 $layout_widths = array(); 1652 1653 if ( current_theme_supports( 'align-wide' ) ) { 1654 $layout_widths = array( 1655 'alignnone' => __( 'Default width', 'buddypress' ), 1656 'alignwide' => __( 'Wide width', 'buddypress' ), 1657 'alignfull' => __( 'Full width', 'buddypress' ), 1658 ); 1659 } 1660 1661 // `wp_get_global_settings()` has been introduced in WordPress 5.9 1662 if ( function_exists( 'wp_get_global_settings' ) ) { 1663 $theme_layouts = wp_get_global_settings( array( 'layout' ) ); 1664 1665 if ( isset( $theme_layouts['wideSize'] ) && $theme_layouts['wideSize'] ) { 1666 $layout_widths = array( 1667 'alignnone' => __( 'Content width', 'buddypress' ), 1668 'alignwide' => __( 'Wide width', 'buddypress' ), 1669 ); 1670 } 1671 } 1672 1673 /** 1674 * Filter here to edit the available theme layout widths. 1675 * 1676 * @since 10.0.0 1677 * 1678 * @param array $layout_widths The available theme layout widths. 1679 */ 1680 return apply_filters( 'bp_nouveau_get_theme_layout_widths', $layout_widths ); 1681 }
Note: See TracChangeset
for help on using the changeset viewer.