Changeset 8463
- Timestamp:
- 05/31/2014 11:44:12 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-template-loader.php
r8462 r8463 123 123 * @since BuddyPress (1.7.0) 124 124 * 125 * @todo Make 'callable' instead of 'function'.126 *127 125 * @param string $location_callback Callback function that returns the stack location. 128 126 * @param int $priority Optional. The priority parameter as passed to … … 132 130 function bp_register_template_stack( $location_callback = '', $priority = 10 ) { 133 131 134 // Bail if no location, or function does not exist135 if ( empty( $location_callback ) ) {132 // Bail if no location, or function/method is not callable 133 if ( empty( $location_callback ) || ! is_callable( $location_callback ) ) { 136 134 return false; 137 }138 139 // Bail if callback function does not exist140 if ( ! is_array( $location_callback ) ) {141 if ( ! function_exists( $location_callback ) ) {142 return false;143 }144 135 } 145 136 … … 162 153 function bp_deregister_template_stack( $location_callback = '', $priority = 10 ) { 163 154 164 // Bail if no location, or function does not exist165 if ( empty( $location_callback ) ) {155 // Bail if no location, or function/method is not callable 156 if ( empty( $location_callback ) || ! is_callable( $location_callback ) ) { 166 157 return false; 167 }168 169 // Bail if callback function does not exist170 if ( ! is_array( $location_callback ) ) {171 if ( ! function_exists( $location_callback ) ) {172 return false;173 }174 158 } 175 159
Note: See TracChangeset
for help on using the changeset viewer.