- Timestamp:
- 04/25/2023 10:17:33 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/classes/class-bp-activity-component.php
r13455 r13464 556 556 * 557 557 * @since 7.0.0 558 * @since 12.0.0 Use the WP Blocks API v2. 558 559 * 559 560 * @param array $blocks Optional. See BP_Component::blocks_init() for … … 563 564 $blocks = array( 564 565 'bp/latest-activities' => array( 565 'name' => 'bp/latest-activities', 566 'editor_script' => 'bp-latest-activities-block', 567 'editor_script_url' => plugins_url( 'js/blocks/latest-activities.js', dirname( __FILE__ ) ), 568 'editor_script_deps' => array( 569 'wp-blocks', 570 'wp-element', 571 'wp-components', 572 'wp-i18n', 573 'wp-block-editor', 574 'wp-server-side-render', 575 'bp-block-data', 576 ), 577 'style' => 'bp-latest-activities-block', 578 'style_url' => plugins_url( 'css/blocks/latest-activities.css', dirname( __FILE__ ) ), 579 'attributes' => array( 580 'title' => array( 581 'type' => 'string', 582 'default' => __( 'Latest updates', 'buddypress' ), 583 ), 584 'maxActivities' => array( 585 'type' => 'number', 586 'default' => 5, 587 ), 588 'type' => array( 589 'type' => 'array', 590 'default' => array( 'activity_update' ), 591 ), 592 'postId' => array( 593 'type' => 'number', 594 'default' => 0, 595 ), 596 ), 597 'render_callback' => 'bp_activity_render_latest_activities_block', 566 'metadata' => trailingslashit( buddypress()->plugin_dir ) . 'bp-activity/blocks/latest-activities', 567 'render_callback' => 'bp_activity_render_latest_activities_block', 598 568 ), 599 569 ); … … 601 571 if ( bp_is_active( $this->id, 'embeds' ) ) { 602 572 $blocks['bp/embed-activity'] = array( 603 'name' => 'bp/embed-activity', 604 'editor_script' => 'bp-embed-activity-block', 605 'editor_script_url' => plugins_url( 'js/blocks/embed-activity.js', dirname( __FILE__ ) ), 606 'editor_script_deps' => array( 607 'wp-blocks', 608 'wp-element', 609 'wp-i18n', 610 'wp-components', 611 'wp-block-editor', 612 'wp-data', 613 'wp-compose', 614 'bp-block-data', 615 ), 573 'metadata' => trailingslashit( buddypress()->plugin_dir ) . 'bp-activity/blocks/embed-activity', 574 616 575 ); 617 576 }
Note: See TracChangeset
for help on using the changeset viewer.