- Timestamp:
- 04/25/2023 10:17:33 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/classes/class-bp-groups-component.php
r13456 r13464 1213 1213 * 1214 1214 * @since 6.0.0 1215 * @since 12.0.0 Use the WP Blocks API v2. 1215 1216 * 1216 1217 * @param array $blocks Optional. See BP_Component::blocks_init() for … … 1221 1222 array( 1222 1223 'bp/group' => array( 1223 'name' => 'bp/group', 1224 'editor_script' => 'bp-group-block', 1225 'editor_script_url' => plugins_url( 'js/blocks/group.js', dirname( __FILE__ ) ), 1226 'editor_script_deps' => array( 1227 'wp-blocks', 1228 'wp-element', 1229 'wp-components', 1230 'wp-i18n', 1231 'wp-block-editor', 1232 'wp-server-side-render', 1233 'bp-block-components', 1234 'bp-block-data', 1235 ), 1236 'style' => 'bp-group-block', 1237 'style_url' => plugins_url( 'css/blocks/group.css', dirname( __FILE__ ) ), 1238 'render_callback' => 'bp_groups_render_group_block', 1239 'attributes' => array( 1240 'itemID' => array( 1241 'type' => 'integer', 1242 'default' => 0, 1243 ), 1244 'avatarSize' => array( 1245 'type' => 'string', 1246 'default' => 'full', 1247 ), 1248 'displayDescription' => array( 1249 'type' => 'boolean', 1250 'default' => true, 1251 ), 1252 'displayActionButton' => array( 1253 'type' => 'boolean', 1254 'default' => true, 1255 ), 1256 'displayCoverImage' => array( 1257 'type' => 'boolean', 1258 'default' => true, 1259 ), 1260 ), 1224 'metadata' => trailingslashit( buddypress()->plugin_dir ) . 'bp-groups/blocks/group', 1225 'render_callback' => 'bp_groups_render_group_block', 1261 1226 ), 1262 1227 'bp/groups' => array( 1263 'name' => 'bp/groups', 1264 'editor_script' => 'bp-groups-block', 1265 'editor_script_url' => plugins_url( 'js/blocks/groups.js', dirname( __FILE__ ) ), 1266 'editor_script_deps' => array( 1267 'wp-blocks', 1268 'wp-element', 1269 'wp-components', 1270 'wp-i18n', 1271 'wp-api-fetch', 1272 'wp-url', 1273 'wp-block-editor', 1274 'bp-block-components', 1275 'bp-block-data', 1276 'lodash', 1277 ), 1278 'style' => 'bp-groups-block', 1279 'style_url' => plugins_url( 'css/blocks/groups.css', dirname( __FILE__ ) ), 1280 'attributes' => array( 1281 'itemIDs' => array( 1282 'type' => 'array', 1283 'items' => array( 1284 'type' => 'integer', 1285 ), 1286 ), 1287 'avatarSize' => array( 1288 'type' => 'string', 1289 'default' => 'full', 1290 ), 1291 'displayGroupName' => array( 1292 'type' => 'boolean', 1293 'default' => true, 1294 ), 1295 'extraInfo' => array( 1296 'type' => 'string', 1297 'default' => 'none', 1298 'enum' => array( 'description', 'popular', 'active', 'none' ), 1299 ), 1300 'layoutPreference' => array( 1301 'type' => 'string', 1302 'default' => 'list', 1303 'enum' => array( 'list', 'grid' ), 1304 ), 1305 'columns' => array( 1306 'type' => 'number', 1307 'default' => 2, 1308 ), 1309 ), 1310 'render_callback' => 'bp_groups_render_groups_block', 1228 'metadata' => trailingslashit( buddypress()->plugin_dir ) . 'bp-groups/blocks/groups', 1229 'render_callback' => 'bp_groups_render_groups_block', 1311 1230 ), 1312 1231 'bp/dynamic-groups' => array( 1313 'name' => 'bp/dynamic-groups', 1314 'editor_script' => 'bp-dynamic-groups-block', 1315 'editor_script_url' => plugins_url( 'js/blocks/dynamic-groups.js', dirname( __FILE__ ) ), 1316 'editor_script_deps' => array( 1317 'wp-blocks', 1318 'wp-element', 1319 'wp-components', 1320 'wp-i18n', 1321 'wp-block-editor', 1322 'wp-server-side-render', 1323 ), 1324 'style' => 'bp-dynamic-groups-block', 1325 'style_url' => plugins_url( 'css/blocks/dynamic-groups.css', dirname( __FILE__ ) ), 1326 'attributes' => array( 1327 'title' => array( 1328 'type' => 'string', 1329 'default' => __( 'Groups', 'buddypress' ), 1330 ), 1331 'maxGroups' => array( 1332 'type' => 'number', 1333 'default' => 5, 1334 ), 1335 'groupDefault' => array( 1336 'type' => 'string', 1337 'default' => 'active', 1338 ), 1339 'linkTitle' => array( 1340 'type' => 'boolean', 1341 'default' => false, 1342 ), 1343 ), 1344 'render_callback' => 'bp_groups_render_dynamic_groups_block', 1232 'metadata' => trailingslashit( buddypress()->plugin_dir ) . 'bp-groups/blocks/dynamic-groups', 1233 'render_callback' => 'bp_groups_render_dynamic_groups_block', 1345 1234 ), 1346 1235 )
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)