Changeset 13440
- Timestamp:
- 03/21/2023 08:24:10 AM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-blocks.php
r13436 r13440 162 162 */ 163 163 function bp_register_block( $args = array() ) { 164 if ( isset( $args['metadata'] ) && is_string( $args['metadata'] ) && file_exists( $args['metadata'] ) ) { 165 $callback = array(); 166 167 if ( isset( $args['render_callback'] ) ) { 168 $callback['render_callback'] = $args['render_callback']; 169 } 170 171 return register_block_type_from_metadata( $args['metadata'], $callback ); 172 } 173 164 174 return new BP_Block( $args ); 165 175 }
Note: See TracChangeset
for help on using the changeset viewer.