BuddyPress - Version 4.0.0

Version Description

See: https://codex.buddypress.org/releases/version-4-0-0/

=

Download this release

Release Info

Developer boonebgorges
Plugin Icon 128x128 BuddyPress
Version 4.0.0
Comparing to
See all releases

Code changes from version 4.0.0-RC1 to 4.0.0

bp-activity/bp-activity-functions.php CHANGED
@@ -1919,10 +1919,12 @@ function bp_activity_add( $args = '' ) {
1919
  * Fires at the end of the execution of adding a new activity item, before returning the new activity item ID.
1920
  *
1921
  * @since 1.1.0
 
1922
  *
1923
- * @param array $r Array of parsed arguments for the activity item being added.
 
1924
  */
1925
- do_action( 'bp_activity_add', $r );
1926
 
1927
  return $activity->id;
1928
  }
1919
  * Fires at the end of the execution of adding a new activity item, before returning the new activity item ID.
1920
  *
1921
  * @since 1.1.0
1922
+ * @since 4.0.0 Added the `$activity_id` parameter.
1923
  *
1924
+ * @param array $r Array of parsed arguments for the activity item being added.
1925
+ * @param int $activity_id The id of the activity item being added.
1926
  */
1927
+ do_action( 'bp_activity_add', $r, $activity->id );
1928
 
1929
  return $activity->id;
1930
  }
bp-core/classes/class-bp-admin.php CHANGED
@@ -636,71 +636,33 @@ class BP_Admin {
636
  </div>
637
 
638
  <div class="bp-hello-content">
639
- <h2><?php echo esc_html( __( 'Say hello to &ldquo;Nouveau&rdquo;!', 'buddypress' ) ); ?></h2>
640
  <p>
641
- <?php
642
- printf(
643
- __( 'A bold reimagining of our legacy templates, Nouveau is our celebration of <a href="%s">10 years of BuddyPress</a>! Nouveau delivers modern markup with fresh JavaScript-powered templates, and full integration with WordPress\' Customizer, allowing more out-of-the-box control of your BuddyPress content than ever before.', 'buddypress' ),
644
- esc_url( 'https://buddypress.org/2018/03/10-years/' )
645
- );
646
- ?>
647
- </p>
648
- <p><?php esc_html_e( 'Nouveau provides vertical and horizontal layout options for BuddyPress navigation, and for the component directories, you can choose between a grid layout, and a classic flat list.', 'buddypress' ); ?></p>
649
- <p>
650
- <?php
651
- printf(
652
- __( 'Nouveau is fully compatible with WordPress. Existing BuddyPress themes have been written for our legacy template pack, and until they are updated, resolve any compatibility issues by choosing the legacy template pack option in <a href="%s">Settings &gt; BuddyPress</a>.', 'buddypress' ),
653
- esc_url( bp_get_admin_url( 'admin.php?page=bp-settings' ) )
654
- );
655
- ?>
656
  </p>
657
 
658
- <?php echo $GLOBALS['wp_embed']->autoembed( 'https://player.vimeo.com/video/270507360' ); ?>
659
-
660
- <h2><?php esc_html_e( 'Support for WP-CLI', 'buddypress' ); ?></h2>
661
- <p>
662
- <?php
663
- printf(
664
- __( '<a href="%s">WP-CLI</a> is the command-line interface for WordPress. You can update plugins, configure multisite installs, and much more, without using a web browser. With this version of BuddyPress, you can now manage your BuddyPress content from WP-CLI.', 'buddypress' ),
665
- esc_url( 'https://wp-cli.org' )
666
- );
667
- ?>
668
- </p>
669
 
670
- <h2><?php echo esc_html( _x( 'Control site-wide notices from your dashboard', 'section heading', 'buddypress' ) ); ?></h2>
671
- <p><?php esc_html_e( 'Site Notices are a feature within the Private Messaging component that allows community managers to share important messages with all members of their community. With Nouveau, the management interface for Site Notices has been removed from the front-end theme templates.', 'buddypress' ); ?></p>
672
 
673
- <?php if ( bp_is_active( 'messages' ) ) : ?>
674
- <p>
675
- <?php
676
- printf(
677
- __( 'Explore the new management interface at <a href="%s">Users &gt; Site Notices</a>.', 'buddypress' ),
678
- esc_url( bp_get_admin_url( 'users.php?page=bp-notices' ) )
679
- );
680
- ?>
681
- </p>
682
- <?php endif; ?>
683
 
684
- <h2><?php esc_html_e( 'New profile field type: telephone numbers', 'buddypress' ); ?></h2>
685
- <p><?php esc_html_e( 'A new telephone number field type has been added to the Extended Profiles component, with support for all international number formats. With a modern web browser, your members can use this field type to touch-to-dial a number directly.', 'buddypress' ); ?></p>
686
 
687
  <h2><?php esc_html_e( "BuddyPress: leaner, faster, stronger", 'buddypress' ); ?></h2>
688
- <p><?php esc_html_e( 'With every BuddyPress version, we strive to make performance improvements alongside new features and fixes; this version is no exception. Memory use has been optimised &mdash; within active components, we now only load each individual code file when it\'s needed, not before.', 'buddypress' ); ?></p>
689
- <p>
690
- <?php
691
- printf(
692
- __( 'Most notably, the <a href="%s">Legacy Forums component has been removed</a> after 9 years of service. If your site was using Legacy Forums, you need to <a href="%s">migrate to the bbPress plugin</a>.', 'buddypress' ),
693
- esc_url( 'https://bpdevel.wordpress.com/2017/12/07/legacy-forums-support-will-be/' ),
694
- esc_url( 'https://codex.buddypress.org/getting-started/guides/migrating-from-old-forums-to-bbpress-2/' )
695
- );
696
- ?>
697
- </p>
698
 
699
  <p><em>
700
  <?php
701
  printf(
702
  __( 'To read the full list of features, fixes, and changes in this version of BuddyPress, <a href="%s">visit Trac</a>.', 'buddypress' ),
703
- esc_url( 'https://buddypress.trac.wordpress.org/query?group=status&milestone=3.0' )
704
  );
705
  ?>
706
  </em></p>
@@ -724,9 +686,9 @@ class BP_Admin {
724
  <p>
725
  <?php
726
  printf(
727
- _n( 'Built by <a href="%s">%s volunteer</a>.', 'Built by <a href="%s">%s volunteers</a>.', 57, 'buddypress' ),
728
  esc_url( bp_get_admin_url( 'admin.php?page=bp-credits' ) ),
729
- number_format_i18n( 57 )
730
  );
731
  ?>
732
  </p>
@@ -797,7 +759,7 @@ class BP_Admin {
797
  <li class="wp-person" id="wp-person-djpaul">
798
  <a class="web" href="https://profiles.wordpress.org/djpaul"><img alt="" class="gravatar" src="//www.gravatar.com/avatar/3bc9ab796299d67ce83dceb9554f75df?s=120">
799
  Paul Gibbs</a>
800
- <span class="title"><?php _e( 'Release Lead', 'buddypress' ); ?></span>
801
  </li>
802
  </ul>
803
 
@@ -901,62 +863,41 @@ class BP_Admin {
901
 
902
  <h3 class="wp-people-group"><?php printf( esc_html__( 'Contributors to BuddyPress %s', 'buddypress' ), self::display_version() ); ?></h3>
903
  <p class="wp-credits-list">
904
- <a href="https://profiles.wordpress.org/1naveengiri">1naveengiri</a>,
905
- <a href="https://profiles.wordpress.org/abhishekfdd/">Abhishek Kumar (abhishekfdd)</a>,
906
- <a href="https://profiles.wordpress.org/andrewteg/">Andrew Tegenkamp (andrewteg)</a>,
907
  <a href="https://profiles.wordpress.org/ankit-k-gupta/">Ankit K Gupta (ankit-k-gupta)</a>,
908
- <a href="https://profiles.wordpress.org/antonioeatgoat/">Antonio Mangiacapra (antonioeatgoat)</a>,
909
  <a href="https://profiles.wordpress.org/boonebgorges/">Boone B Gorges (boonebgorges)</a>,
910
- <a href="https://profiles.wordpress.org/thebrandonallen/">Brandon Allen (thebrandonallen)</a>,
911
- <a href="https://profiles.wordpress.org/brandonliles/">brandonliles</a>,
912
  <a href="https://profiles.wordpress.org/sbrajesh/">Brajesh Singh (sbrajesh)</a>,
913
- <a href="https://profiles.wordpress.org/ketuchetan/">chetansatasiya (ketuchetan)</a>,
914
- <a href="https://profiles.wordpress.org/chherbst/">chherbst</a>,
915
  <a href="https://profiles.wordpress.org/needle/">Christian Wach (needle)</a>,
916
- <a href="https://profiles.wordpress.org/coach-afrane/">Coach Afrane</a>,
917
- <a href="https://profiles.wordpress.org/cshinkin/">cshinkin</a>,
918
- <a href="https://profiles.wordpress.org/danbp/">danbp</a>,
919
- <a href="https://profiles.wordpress.org/dcavins/">David Cavins (dcavins)</a>,
920
- <a href="https://profiles.wordpress.org/devitate/">devitate</a>,
921
  <a href="https://profiles.wordpress.org/garrett-eclipse/">Garrett Hyder (garrett-eclipse)</a>,
922
- <a href="https://profiles.wordpress.org/geminorum/">geminorum</a>,
923
- <a href="https://profiles.wordpress.org/Mamaduka/">George Mamadashvili (Mamaduka)</a>,
924
- <a href="https://profiles.wordpress.org/januzi_pl/">januzi_pl</a>,
925
- <a href="https://profiles.wordpress.org/jcrr/">jcrr</a>,
926
- <a href="https://profiles.wordpress.org/jdgrimes/">J.D. Grimes (jdgrimes)</a>,
927
- <a href="https://profiles.wordpress.org/JohnPBloch/">John P. Bloch (JohnPBloch)</a>,
928
- <a href="https://profiles.wordpress.org/joost-abrahams/">Joost Abrahams (joost-abrahams)</a>,
929
- <a href="https://profiles.wordpress.org/henry.wright">Henry Wright (henry.wright)</a>,
930
  <a href="https://profiles.wordpress.org/hnla/">Hugo (hnla)</a>,
931
- <a href="https://profiles.wordpress.org/idofri/">Ido Friedlander (idofri)</a>,
932
- <a href="https://profiles.wordpress.org/dunhakdis/">Joseph G. (dunhakdis)</a>,
933
  <a href="https://profiles.wordpress.org/johnjamesjacoby/">John James Jacoby (johnjamesjacoby)</a>,
934
- <a href="https://profiles.wordpress.org/Offereins">Laurens Offereins (Offereins)</a>,
935
- <a href="https://profiles.wordpress.org/mechter/">Markus Echterhoff (mechter)</a>,
936
  <a href="https://profiles.wordpress.org/imath/">Mathieu Viet (imath)</a>,
937
- <a href="https://profiles.wordpress.org/meitar/">meitar</a>,
938
  <a href="https://profiles.wordpress.org/mercime/">mercime</a>,
939
- <a href="https://profiles.wordpress.org/tw2113/">Michael Beckwith (tw2113)</a>,
940
- <a href="https://profiles.wordpress.org/mauteri/">Mike Auteri (mauteri)</a>,
941
- <a href="https://profiles.wordpress.org/modemlooper/">modemlooper</a>,
942
- <a href="https://profiles.wordpress.org/m_uysl/">Mustafa Uysal (m_uysl)</a>,
943
  <a href="https://profiles.wordpress.org/pareshradadiya/">paresh.radadiya (pareshradadiya)</a>,
944
  <a href="https://profiles.wordpress.org/DJPaul/">Paul Gibbs (DJPaul)</a>,
945
- <a href="https://profiles.wordpress.org/pavloopanasenko/">pavlo.opanasenko (pavloopanasenko)</a>,
946
- <a href="https://profiles.wordpress.org/pscolv/">pscolv</a>,
947
  <a href="https://profiles.wordpress.org/r-a-y/">r-a-y</a>,
948
- <a href="https://profiles.wordpress.org/rachelbaker/">Rachel Baker (rachelbaker)</a>,
949
- <a href="https://profiles.wordpress.org/rekmla/">rekmla</a>,
950
  <a href="https://profiles.wordpress.org/espellcaste/">Renato Alves (espellcaste)</a>,
951
- <a href="https://profiles.wordpress.org/rianrietveld/">Rian Rietveld (rianrietvelde)</a>,
952
- <a href="https://profiles.wordpress.org/ripstechcom/">ripstechcom</a>,
953
  <a href="https://profiles.wordpress.org/cyclic/">Ryan Williams (cyclic)</a>,
954
- <a href="https://profiles.wordpress.org/slaffik/">Slava Abakumov (slaffik)</a>,
 
 
 
955
  <a href="https://profiles.wordpress.org/netweb/">Stephen Edgar (netweb)</a>,
956
- <a href="https://profiles.wordpress.org/tobiashonold/">Tobias Honold (tobiashonold)</a>,
957
- <a href="https://profiles.wordpress.org/uzosky/">uzosky</a>,
958
  <a href="https://profiles.wordpress.org/vapvarun/">vapvarun</a>,
959
- <a href="https://profiles.wordpress.org/Venutius/">Venutius</a>,
960
  <a href="https://profiles.wordpress.org/yahil/">Yahil Madakiya (yahil)</a>
961
  </p>
962
 
636
  </div>
637
 
638
  <div class="bp-hello-content">
639
+ <h2><?php esc_html_e( 'New tools for data control and privacy', 'buddypress' ); ?></h2>
640
  <p>
641
+ <?php esc_html_e( 'BuddyPress boasts a proud history of letting community members and managers control their data, independent of third-party, commercial entities. In this spirit, as well as the spirit of recent regulations like the EU\'s General Data Protection Regulation (GDPR), BuddyPress 4.0 introduces a suite of tools allowing users and site admins to manage member data and privacy.', 'buddypress' ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
642
  </p>
643
 
644
+ <figure class="bp-hello-alignright">
645
+ <img class="bp-hello-img-border" src="<?php echo esc_url( buddypress()->plugin_url . 'bp-core/images/data-export.png' ); ?>" alt="<?php esc_attr_e( 'Screenshot of Export Data settings panel', 'buddypress' ); ?>" />
646
+ <figcaption>
647
+ <?php esc_html_e( 'Improved user control over data exports', 'buddypress' ); ?>
648
+ </figcaption>
649
+ </figure>
 
 
 
 
 
650
 
651
+ <p><?php esc_html_e( 'The new "Export Data" Settings panel lets users request an export of all BuddyPress data they\'ve created. BuddyPress integrates seamlessly with the data export functionality introduced in WordPress 4.9.8, and BP data is included in exports that are initiated either from the Export Data panel or via WP\'s Tools > Export Personal Data interface.', 'buddypress' ); ?></p>
 
652
 
653
+ <p><?php esc_html_e( 'BuddyPress 4.0 also integrates with WordPress 4.9.8\'s Privacy Policy tools. When you create or update your Privacy Policy, BP will suggest text that\'s specifically tailored to the kinds of social data generated on a BuddyPress site. And will prompt registering users to agree to the Privacy Policy, if your theme supports it.', 'buddypress' ); ?></p>
 
 
 
 
 
 
 
 
 
654
 
655
+ <h2><?php esc_html_e( 'Nouveau template improvements', 'buddypress' ); ?></h2>
656
+ <p><?php esc_html_e( 'BuddyPress 3.0 introduced a new set of default templates, which we call "Nouveau". In 4.0, we\'ve fixed bugs and smoothed the edges in these templates, including more accessible markup and improved appearance on mobile devices.', 'buddypress' ); ?></p>
657
 
658
  <h2><?php esc_html_e( "BuddyPress: leaner, faster, stronger", 'buddypress' ); ?></h2>
659
+ <p><?php esc_html_e( 'With every BuddyPress version, we strive to make internal improvements to performance and code quality in addition to introducing new features and fixes. In BuddyPress 4.0, we\'ve improved PHP compatibility both in our codebase and in our automated testing tools; we\'ve reworked some automated tests for faster performance; we\'ve ensured compatibility with upcoming changes in WordPress; and we\'ve fixed a number of bugs in the formatting and sending of emails.', 'buddypress' ); ?></p>
 
 
 
 
 
 
 
 
 
660
 
661
  <p><em>
662
  <?php
663
  printf(
664
  __( 'To read the full list of features, fixes, and changes in this version of BuddyPress, <a href="%s">visit Trac</a>.', 'buddypress' ),
665
+ esc_url( 'https://buddypress.trac.wordpress.org/query?group=status&milestone=4.0' )
666
  );
667
  ?>
668
  </em></p>
686
  <p>
687
  <?php
688
  printf(
689
+ _n( 'Built by <a href="%s">%s volunteer</a>.', 'Built by <a href="%s">%s volunteers</a>.', 35, 'buddypress' ),
690
  esc_url( bp_get_admin_url( 'admin.php?page=bp-credits' ) ),
691
+ number_format_i18n( 35 )
692
  );
693
  ?>
694
  </p>
759
  <li class="wp-person" id="wp-person-djpaul">
760
  <a class="web" href="https://profiles.wordpress.org/djpaul"><img alt="" class="gravatar" src="//www.gravatar.com/avatar/3bc9ab796299d67ce83dceb9554f75df?s=120">
761
  Paul Gibbs</a>
762
+ <span class="title"><?php _e( 'Lead Developer', 'buddypress' ); ?></span>
763
  </li>
764
  </ul>
765
 
863
 
864
  <h3 class="wp-people-group"><?php printf( esc_html__( 'Contributors to BuddyPress %s', 'buddypress' ), self::display_version() ); ?></h3>
865
  <p class="wp-credits-list">
866
+ <a href="https://profiles.wordpress.org/xknown/">Alex Concha (xknown)</a>,
 
 
867
  <a href="https://profiles.wordpress.org/ankit-k-gupta/">Ankit K Gupta (ankit-k-gupta)</a>,
 
868
  <a href="https://profiles.wordpress.org/boonebgorges/">Boone B Gorges (boonebgorges)</a>,
 
 
869
  <a href="https://profiles.wordpress.org/sbrajesh/">Brajesh Singh (sbrajesh)</a>,
870
+ <a href="https://profiles.wordpress.org/brianbws/">Brian Cruikshank (brianbws)</a>,
 
871
  <a href="https://profiles.wordpress.org/needle/">Christian Wach (needle)</a>,
872
+ <a href="https://profiles.wordpress.org/cyberwani/">Dinesh Kesarwani (cyberwani)</a>,
873
+ <a href="https://profiles.wordpress.org/dipesh.kakadipa/">dipeshkakadiya</a>,
874
+ <a href="https://profiles.wordpress.org/drywallbmb/">drywallbmb</a>,
875
+ <a href="https://profiles.wordpress.org/dullowl/">dullowl</a>,
876
+ <a href="https://profiles.wordpress.org/eric01/">Eric (eric01)</a>,
877
  <a href="https://profiles.wordpress.org/garrett-eclipse/">Garrett Hyder (garrett-eclipse)</a>,
878
+ <a href="https://profiles.wordpress.org/harshall/">Harshal Limaye (harshall)</a>,
 
 
 
 
 
 
 
879
  <a href="https://profiles.wordpress.org/hnla/">Hugo (hnla)</a>,
 
 
880
  <a href="https://profiles.wordpress.org/johnjamesjacoby/">John James Jacoby (johnjamesjacoby)</a>,
881
+ <a href="https://profiles.wordpress.org/marcella1981/">Marcella (marcella1981)</a>,
 
882
  <a href="https://profiles.wordpress.org/imath/">Mathieu Viet (imath)</a>,
 
883
  <a href="https://profiles.wordpress.org/mercime/">mercime</a>,
884
+ <a href="https://profiles.wordpress.org/MorgunovVit/">MorgunovVit</a>,
885
+ <a href="https://profiles.wordpress.org/n0barcode/">n0barcode</a>,
 
 
886
  <a href="https://profiles.wordpress.org/pareshradadiya/">paresh.radadiya (pareshradadiya)</a>,
887
  <a href="https://profiles.wordpress.org/DJPaul/">Paul Gibbs (DJPaul)</a>,
888
+ <a href="https://profiles.wordpress.org/pooja1210/">Pooja N Muchandikar (pooja1210)</a>,
 
889
  <a href="https://profiles.wordpress.org/r-a-y/">r-a-y</a>,
 
 
890
  <a href="https://profiles.wordpress.org/espellcaste/">Renato Alves (espellcaste)</a>,
891
+ <a href="https://profiles.wordpress.org/RT77/">RT77</a>,
 
892
  <a href="https://profiles.wordpress.org/cyclic/">Ryan Williams (cyclic)</a>,
893
+ <a href="https://profiles.wordpress.org/elhardoum/">Samuel Elh (elhardoum)</a>,
894
+ <a href="https://profiles.wordpress.org/shubh14/">shubh14</a>,
895
+ <a href="https://profiles.wordpress.org/spdustin/">spdustin</a>,
896
+ <a href="https://profiles.wordpress.org/suvikki/">suvikki</a>,
897
  <a href="https://profiles.wordpress.org/netweb/">Stephen Edgar (netweb)</a>,
898
+ <a href="https://profiles.wordpress.org/thejimmy/">thejimmy</a>,
 
899
  <a href="https://profiles.wordpress.org/vapvarun/">vapvarun</a>,
900
+ <a href="https://profiles.wordpress.org/wbcomdesigns/">Wbcom Designs (wbcomdesigns)</a>,
901
  <a href="https://profiles.wordpress.org/yahil/">Yahil Madakiya (yahil)</a>
902
  </p>
903
 
bp-core/images/data-export.png ADDED
Binary file
bp-loader.php CHANGED
@@ -15,7 +15,7 @@
15
  * Description: BuddyPress adds community features to WordPress. Member Profiles, Activity Streams, Direct Messaging, Notifications, and more!
16
  * Author: The BuddyPress Community
17
  * Author URI: https://buddypress.org/
18
- * Version: 4.0.0-RC1
19
  * Text Domain: buddypress
20
  * Domain Path: /bp-languages/
21
  * License: GPLv2 or later (license.txt)
15
  * Description: BuddyPress adds community features to WordPress. Member Profiles, Activity Streams, Direct Messaging, Notifications, and more!
16
  * Author: The BuddyPress Community
17
  * Author URI: https://buddypress.org/
18
+ * Version: 4.0.0
19
  * Text Domain: buddypress
20
  * Domain Path: /bp-languages/
21
  * License: GPLv2 or later (license.txt)
buddypress.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the GPLv2 or later (license.txt).
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: BuddyPress 4.0.0-RC1\n"
6
  "Report-Msgid-Bugs-To: https://buddypress.trac.wordpress.org\n"
7
- "POT-Creation-Date: 2018-11-15 21:18:45+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -526,37 +526,37 @@ msgstr ""
526
  msgid "%s posted a new activity comment"
527
  msgstr ""
528
 
529
- #: bp-activity/bp-activity-functions.php:2590
530
  #: bp-templates/bp-legacy/buddypress-functions.php:1049
531
  #: bp-templates/bp-nouveau/includes/activity/ajax.php:328
532
  msgid "There was an error posting your reply. Please try again."
533
  msgstr ""
534
 
535
- #: bp-activity/bp-activity-functions.php:2618
536
  msgid "The item you were replying to no longer exists."
537
  msgstr ""
538
 
539
- #: bp-activity/bp-activity-functions.php:3227
540
  msgid "Thumbnail"
541
  msgstr ""
542
 
543
- #: bp-activity/bp-activity-functions.php:4185
544
  msgid "Activity Date"
545
  msgstr ""
546
 
547
- #: bp-activity/bp-activity-functions.php:4189
548
  msgid "Activity Description"
549
  msgstr ""
550
 
551
- #: bp-activity/bp-activity-functions.php:4193
552
  msgid "Activity URL"
553
  msgstr ""
554
 
555
- #: bp-activity/bp-activity-functions.php:4200
556
  msgid "Activity Content"
557
  msgstr ""
558
 
559
- #: bp-activity/bp-activity-functions.php:4221
560
  #: bp-activity/bp-activity-notifications.php:389
561
  #: bp-activity/classes/class-bp-activity-oembed-extension.php:138
562
  #: bp-activity/classes/class-bp-activity-theme-compat.php:161
@@ -1183,7 +1183,7 @@ msgstr ""
1183
  #: bp-core/admin/bp-core-admin-components.php:24
1184
  #: bp-core/admin/bp-core-admin-settings.php:267
1185
  #: bp-core/admin/bp-core-admin-slugs.php:24
1186
- #: bp-core/classes/class-bp-admin.php:779
1187
  msgid "BuddyPress Settings"
1188
  msgstr ""
1189
 
@@ -1368,7 +1368,7 @@ msgid "Pages"
1368
  msgstr ""
1369
 
1370
  #: bp-core/admin/bp-core-admin-functions.php:434
1371
- #: bp-core/classes/class-bp-admin.php:781
1372
  msgid "Credits"
1373
  msgstr ""
1374
 
@@ -2985,97 +2985,79 @@ msgid "Close pop-up"
2985
  msgstr ""
2986
 
2987
  #: bp-core/classes/class-bp-admin.php:639
2988
- msgid "Say hello to &ldquo;Nouveau&rdquo;!"
2989
- msgstr ""
2990
-
2991
- #: bp-core/classes/class-bp-admin.php:643
2992
- msgid ""
2993
- "A bold reimagining of our legacy templates, Nouveau is our celebration of "
2994
- "<a href=\"%s\">10 years of BuddyPress</a>! Nouveau delivers modern markup "
2995
- "with fresh JavaScript-powered templates, and full integration with "
2996
- "WordPress' Customizer, allowing more out-of-the-box control of your "
2997
- "BuddyPress content than ever before."
2998
- msgstr ""
2999
-
3000
- #: bp-core/classes/class-bp-admin.php:648
3001
- msgid ""
3002
- "Nouveau provides vertical and horizontal layout options for BuddyPress "
3003
- "navigation, and for the component directories, you can choose between a "
3004
- "grid layout, and a classic flat list."
3005
  msgstr ""
3006
 
3007
- #: bp-core/classes/class-bp-admin.php:652
3008
  msgid ""
3009
- "Nouveau is fully compatible with WordPress. Existing BuddyPress themes have "
3010
- "been written for our legacy template pack, and until they are updated, "
3011
- "resolve any compatibility issues by choosing the legacy template pack "
3012
- "option in <a href=\"%s\">Settings &gt; BuddyPress</a>."
 
 
3013
  msgstr ""
3014
 
3015
- #: bp-core/classes/class-bp-admin.php:660
3016
- msgid "Support for WP-CLI"
3017
  msgstr ""
3018
 
3019
- #: bp-core/classes/class-bp-admin.php:664
3020
- msgid ""
3021
- "<a href=\"%s\">WP-CLI</a> is the command-line interface for WordPress. You "
3022
- "can update plugins, configure multisite installs, and much more, without "
3023
- "using a web browser. With this version of BuddyPress, you can now manage "
3024
- "your BuddyPress content from WP-CLI."
3025
  msgstr ""
3026
 
3027
- #: bp-core/classes/class-bp-admin.php:671
3028
  msgid ""
3029
- "Site Notices are a feature within the Private Messaging component that "
3030
- "allows community managers to share important messages with all members of "
3031
- "their community. With Nouveau, the management interface for Site Notices "
3032
- "has been removed from the front-end theme templates."
 
3033
  msgstr ""
3034
 
3035
- #: bp-core/classes/class-bp-admin.php:677
3036
  msgid ""
3037
- "Explore the new management interface at <a href=\"%s\">Users &gt; Site "
3038
- "Notices</a>."
 
 
 
3039
  msgstr ""
3040
 
3041
- #: bp-core/classes/class-bp-admin.php:684
3042
- msgid "New profile field type: telephone numbers"
3043
  msgstr ""
3044
 
3045
- #: bp-core/classes/class-bp-admin.php:685
3046
  msgid ""
3047
- "A new telephone number field type has been added to the Extended Profiles "
3048
- "component, with support for all international number formats. With a modern "
3049
- "web browser, your members can use this field type to touch-to-dial a number "
3050
- "directly."
3051
  msgstr ""
3052
 
3053
- #: bp-core/classes/class-bp-admin.php:687
3054
  msgid "BuddyPress: leaner, faster, stronger"
3055
  msgstr ""
3056
 
3057
- #: bp-core/classes/class-bp-admin.php:688
3058
- msgid ""
3059
- "With every BuddyPress version, we strive to make performance improvements "
3060
- "alongside new features and fixes; this version is no exception. Memory use "
3061
- "has been optimised &mdash; within active components, we now only load each "
3062
- "individual code file when it's needed, not before."
3063
- msgstr ""
3064
-
3065
- #: bp-core/classes/class-bp-admin.php:692
3066
  msgid ""
3067
- "Most notably, the <a href=\"%s\">Legacy Forums component has been "
3068
- "removed</a> after 9 years of service. If your site was using Legacy Forums, "
3069
- "you need to <a href=\"%s\">migrate to the bbPress plugin</a>."
 
 
 
 
3070
  msgstr ""
3071
 
3072
- #: bp-core/classes/class-bp-admin.php:702
3073
  msgid ""
3074
  "To read the full list of features, fixes, and changes in this version of "
3075
  "BuddyPress, <a href=\"%s\">visit Trac</a>."
3076
  msgstr ""
3077
 
3078
- #: bp-core/classes/class-bp-admin.php:712
3079
  msgid ""
3080
  " How are you using BuddyPress? Receiving your feedback and suggestions for "
3081
  "future versions of BuddyPress genuinely motivates and encourages our "
@@ -3083,80 +3065,77 @@ msgid ""
3083
  "version of BuddyPress on our website. "
3084
  msgstr ""
3085
 
3086
- #: bp-core/classes/class-bp-admin.php:717
3087
  msgid "Thank you for using BuddyPress! 😊"
3088
  msgstr ""
3089
 
3090
- #: bp-core/classes/class-bp-admin.php:727
3091
  msgid "Built by <a href=\"%s\">%s volunteer</a>."
3092
  msgid_plural "Built by <a href=\"%s\">%s volunteers</a>."
3093
  msgstr[0] ""
3094
  msgstr[1] ""
3095
 
3096
- #: bp-core/classes/class-bp-admin.php:783
3097
  msgid "Meet the contributors behind BuddyPress:"
3098
  msgstr ""
3099
 
3100
- #: bp-core/classes/class-bp-admin.php:785
3101
  msgid "Project Leaders"
3102
  msgstr ""
3103
 
3104
- #: bp-core/classes/class-bp-admin.php:790
3105
  msgid "Project Lead"
3106
  msgstr ""
3107
 
3108
- #: bp-core/classes/class-bp-admin.php:795
 
3109
  msgid "Lead Developer"
3110
  msgstr ""
3111
 
3112
- #: bp-core/classes/class-bp-admin.php:800
3113
- msgid "Release Lead"
3114
- msgstr ""
3115
-
3116
- #: bp-core/classes/class-bp-admin.php:804
3117
  msgid "BuddyPress Team"
3118
  msgstr ""
3119
 
3120
- #: bp-core/classes/class-bp-admin.php:809
3121
- #: bp-core/classes/class-bp-admin.php:814
3122
- #: bp-core/classes/class-bp-admin.php:819
3123
- #: bp-core/classes/class-bp-admin.php:829
3124
- #: bp-core/classes/class-bp-admin.php:834
3125
- #: bp-core/classes/class-bp-admin.php:854
3126
- #: bp-core/classes/class-bp-admin.php:859
3127
- #: bp-core/classes/class-bp-admin.php:864
3128
- #: bp-core/classes/class-bp-admin.php:869
3129
  msgid "Core Developer"
3130
  msgstr ""
3131
 
3132
- #: bp-core/classes/class-bp-admin.php:824
3133
  msgid "Navigator"
3134
  msgstr ""
3135
 
3136
- #: bp-core/classes/class-bp-admin.php:839
3137
- #: bp-core/classes/class-bp-admin.php:844
3138
- #: bp-core/classes/class-bp-admin.php:849
3139
- #: bp-core/classes/class-bp-admin.php:874
3140
  msgid "Community Support"
3141
  msgstr ""
3142
 
3143
- #: bp-core/classes/class-bp-admin.php:878
3144
  msgid "Recent Rockstars"
3145
  msgstr ""
3146
 
3147
- #: bp-core/classes/class-bp-admin.php:902
3148
  msgid "Contributors to BuddyPress %s"
3149
  msgstr ""
3150
 
3151
- #: bp-core/classes/class-bp-admin.php:963
3152
  msgid "With our thanks to these Open Source projects"
3153
  msgstr ""
3154
 
3155
- #: bp-core/classes/class-bp-admin.php:977
3156
  msgid "Contributor Emeriti"
3157
  msgstr ""
3158
 
3159
- #: bp-core/classes/class-bp-admin.php:982
3160
  msgid "Project Founder"
3161
  msgstr ""
3162
 
@@ -9591,7 +9570,7 @@ msgctxt "screen heading"
9591
  msgid "Emails"
9592
  msgstr ""
9593
 
9594
- #: bp-core/classes/class-bp-admin.php:708
9595
  msgctxt "screen heading"
9596
  msgid "Your feedback"
9597
  msgstr ""
@@ -9921,12 +9900,7 @@ msgctxt "section heading"
9921
  msgid "New in BuddyPress"
9922
  msgstr ""
9923
 
9924
- #: bp-core/classes/class-bp-admin.php:670
9925
- msgctxt "section heading"
9926
- msgid "Control site-wide notices from your dashboard"
9927
- msgstr ""
9928
-
9929
- #: bp-core/classes/class-bp-admin.php:1018
9930
  msgctxt "Email post type"
9931
  msgid "Situations"
9932
  msgstr ""
2
  # This file is distributed under the GPLv2 or later (license.txt).
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: BuddyPress 4.0.0\n"
6
  "Report-Msgid-Bugs-To: https://buddypress.trac.wordpress.org\n"
7
+ "POT-Creation-Date: 2018-11-27 18:53:11+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
526
  msgid "%s posted a new activity comment"
527
  msgstr ""
528
 
529
+ #: bp-activity/bp-activity-functions.php:2592
530
  #: bp-templates/bp-legacy/buddypress-functions.php:1049
531
  #: bp-templates/bp-nouveau/includes/activity/ajax.php:328
532
  msgid "There was an error posting your reply. Please try again."
533
  msgstr ""
534
 
535
+ #: bp-activity/bp-activity-functions.php:2620
536
  msgid "The item you were replying to no longer exists."
537
  msgstr ""
538
 
539
+ #: bp-activity/bp-activity-functions.php:3229
540
  msgid "Thumbnail"
541
  msgstr ""
542
 
543
+ #: bp-activity/bp-activity-functions.php:4187
544
  msgid "Activity Date"
545
  msgstr ""
546
 
547
+ #: bp-activity/bp-activity-functions.php:4191
548
  msgid "Activity Description"
549
  msgstr ""
550
 
551
+ #: bp-activity/bp-activity-functions.php:4195
552
  msgid "Activity URL"
553
  msgstr ""
554
 
555
+ #: bp-activity/bp-activity-functions.php:4202
556
  msgid "Activity Content"
557
  msgstr ""
558
 
559
+ #: bp-activity/bp-activity-functions.php:4223
560
  #: bp-activity/bp-activity-notifications.php:389
561
  #: bp-activity/classes/class-bp-activity-oembed-extension.php:138
562
  #: bp-activity/classes/class-bp-activity-theme-compat.php:161
1183
  #: bp-core/admin/bp-core-admin-components.php:24
1184
  #: bp-core/admin/bp-core-admin-settings.php:267
1185
  #: bp-core/admin/bp-core-admin-slugs.php:24
1186
+ #: bp-core/classes/class-bp-admin.php:741
1187
  msgid "BuddyPress Settings"
1188
  msgstr ""
1189
 
1368
  msgstr ""
1369
 
1370
  #: bp-core/admin/bp-core-admin-functions.php:434
1371
+ #: bp-core/classes/class-bp-admin.php:743
1372
  msgid "Credits"
1373
  msgstr ""
1374
 
2985
  msgstr ""
2986
 
2987
  #: bp-core/classes/class-bp-admin.php:639
2988
+ msgid "New tools for data control and privacy"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2989
  msgstr ""
2990
 
2991
+ #: bp-core/classes/class-bp-admin.php:641
2992
  msgid ""
2993
+ "BuddyPress boasts a proud history of letting community members and managers "
2994
+ "control their data, independent of third-party, commercial entities. In "
2995
+ "this spirit, as well as the spirit of recent regulations like the EU's "
2996
+ "General Data Protection Regulation (GDPR), BuddyPress 4.0 introduces a "
2997
+ "suite of tools allowing users and site admins to manage member data and "
2998
+ "privacy."
2999
  msgstr ""
3000
 
3001
+ #: bp-core/classes/class-bp-admin.php:645
3002
+ msgid "Screenshot of Export Data settings panel"
3003
  msgstr ""
3004
 
3005
+ #: bp-core/classes/class-bp-admin.php:647
3006
+ msgid "Improved user control over data exports"
 
 
 
 
3007
  msgstr ""
3008
 
3009
+ #: bp-core/classes/class-bp-admin.php:651
3010
  msgid ""
3011
+ "The new \"Export Data\" Settings panel lets users request an export of all "
3012
+ "BuddyPress data they've created. BuddyPress integrates seamlessly with the "
3013
+ "data export functionality introduced in WordPress 4.9.8, and BP data is "
3014
+ "included in exports that are initiated either from the Export Data panel or "
3015
+ "via WP's Tools > Export Personal Data interface."
3016
  msgstr ""
3017
 
3018
+ #: bp-core/classes/class-bp-admin.php:653
3019
  msgid ""
3020
+ "BuddyPress 4.0 also integrates with WordPress 4.9.8's Privacy Policy tools. "
3021
+ "When you create or update your Privacy Policy, BP will suggest text that's "
3022
+ "specifically tailored to the kinds of social data generated on a BuddyPress "
3023
+ "site. And will prompt registering users to agree to the Privacy Policy, if "
3024
+ "your theme supports it."
3025
  msgstr ""
3026
 
3027
+ #: bp-core/classes/class-bp-admin.php:655
3028
+ msgid "Nouveau template improvements"
3029
  msgstr ""
3030
 
3031
+ #: bp-core/classes/class-bp-admin.php:656
3032
  msgid ""
3033
+ "BuddyPress 3.0 introduced a new set of default templates, which we call "
3034
+ "\"Nouveau\". In 4.0, we've fixed bugs and smoothed the edges in these "
3035
+ "templates, including more accessible markup and improved appearance on "
3036
+ "mobile devices."
3037
  msgstr ""
3038
 
3039
+ #: bp-core/classes/class-bp-admin.php:658
3040
  msgid "BuddyPress: leaner, faster, stronger"
3041
  msgstr ""
3042
 
3043
+ #: bp-core/classes/class-bp-admin.php:659
 
 
 
 
 
 
 
 
3044
  msgid ""
3045
+ "With every BuddyPress version, we strive to make internal improvements to "
3046
+ "performance and code quality in addition to introducing new features and "
3047
+ "fixes. In BuddyPress 4.0, we've improved PHP compatibility both in our "
3048
+ "codebase and in our automated testing tools; we've reworked some automated "
3049
+ "tests for faster performance; we've ensured compatibility with upcoming "
3050
+ "changes in WordPress; and we've fixed a number of bugs in the formatting "
3051
+ "and sending of emails."
3052
  msgstr ""
3053
 
3054
+ #: bp-core/classes/class-bp-admin.php:664
3055
  msgid ""
3056
  "To read the full list of features, fixes, and changes in this version of "
3057
  "BuddyPress, <a href=\"%s\">visit Trac</a>."
3058
  msgstr ""
3059
 
3060
+ #: bp-core/classes/class-bp-admin.php:674
3061
  msgid ""
3062
  " How are you using BuddyPress? Receiving your feedback and suggestions for "
3063
  "future versions of BuddyPress genuinely motivates and encourages our "
3065
  "version of BuddyPress on our website. "
3066
  msgstr ""
3067
 
3068
+ #: bp-core/classes/class-bp-admin.php:679
3069
  msgid "Thank you for using BuddyPress! 😊"
3070
  msgstr ""
3071
 
3072
+ #: bp-core/classes/class-bp-admin.php:689
3073
  msgid "Built by <a href=\"%s\">%s volunteer</a>."
3074
  msgid_plural "Built by <a href=\"%s\">%s volunteers</a>."
3075
  msgstr[0] ""
3076
  msgstr[1] ""
3077
 
3078
+ #: bp-core/classes/class-bp-admin.php:745
3079
  msgid "Meet the contributors behind BuddyPress:"
3080
  msgstr ""
3081
 
3082
+ #: bp-core/classes/class-bp-admin.php:747
3083
  msgid "Project Leaders"
3084
  msgstr ""
3085
 
3086
+ #: bp-core/classes/class-bp-admin.php:752
3087
  msgid "Project Lead"
3088
  msgstr ""
3089
 
3090
+ #: bp-core/classes/class-bp-admin.php:757
3091
+ #: bp-core/classes/class-bp-admin.php:762
3092
  msgid "Lead Developer"
3093
  msgstr ""
3094
 
3095
+ #: bp-core/classes/class-bp-admin.php:766
 
 
 
 
3096
  msgid "BuddyPress Team"
3097
  msgstr ""
3098
 
3099
+ #: bp-core/classes/class-bp-admin.php:771
3100
+ #: bp-core/classes/class-bp-admin.php:776
3101
+ #: bp-core/classes/class-bp-admin.php:781
3102
+ #: bp-core/classes/class-bp-admin.php:791
3103
+ #: bp-core/classes/class-bp-admin.php:796
3104
+ #: bp-core/classes/class-bp-admin.php:816
3105
+ #: bp-core/classes/class-bp-admin.php:821
3106
+ #: bp-core/classes/class-bp-admin.php:826
3107
+ #: bp-core/classes/class-bp-admin.php:831
3108
  msgid "Core Developer"
3109
  msgstr ""
3110
 
3111
+ #: bp-core/classes/class-bp-admin.php:786
3112
  msgid "Navigator"
3113
  msgstr ""
3114
 
3115
+ #: bp-core/classes/class-bp-admin.php:801
3116
+ #: bp-core/classes/class-bp-admin.php:806
3117
+ #: bp-core/classes/class-bp-admin.php:811
3118
+ #: bp-core/classes/class-bp-admin.php:836
3119
  msgid "Community Support"
3120
  msgstr ""
3121
 
3122
+ #: bp-core/classes/class-bp-admin.php:840
3123
  msgid "Recent Rockstars"
3124
  msgstr ""
3125
 
3126
+ #: bp-core/classes/class-bp-admin.php:864
3127
  msgid "Contributors to BuddyPress %s"
3128
  msgstr ""
3129
 
3130
+ #: bp-core/classes/class-bp-admin.php:904
3131
  msgid "With our thanks to these Open Source projects"
3132
  msgstr ""
3133
 
3134
+ #: bp-core/classes/class-bp-admin.php:918
3135
  msgid "Contributor Emeriti"
3136
  msgstr ""
3137
 
3138
+ #: bp-core/classes/class-bp-admin.php:923
3139
  msgid "Project Founder"
3140
  msgstr ""
3141
 
9570
  msgid "Emails"
9571
  msgstr ""
9572
 
9573
+ #: bp-core/classes/class-bp-admin.php:670
9574
  msgctxt "screen heading"
9575
  msgid "Your feedback"
9576
  msgstr ""
9900
  msgid "New in BuddyPress"
9901
  msgstr ""
9902
 
9903
+ #: bp-core/classes/class-bp-admin.php:959
 
 
 
 
 
9904
  msgctxt "Email post type"
9905
  msgid "Situations"
9906
  msgstr ""
class-buddypress.php CHANGED
@@ -303,7 +303,7 @@ class BuddyPress {
303
 
304
  /** Versions **********************************************************/
305
 
306
- $this->version = '4.0.0-RC1';
307
  $this->db_version = 11105;
308
 
309
  /** Loading ***********************************************************/
303
 
304
  /** Versions **********************************************************/
305
 
306
+ $this->version = '4.0.0';
307
  $this->db_version = 11105;
308
 
309
  /** Loading ***********************************************************/
cli/component.php CHANGED
@@ -77,6 +77,8 @@ abstract class BuddypressCommand extends CommandWithDBObject {
77
  * Generate random text
78
  *
79
  * @since 1.1
 
 
80
  */
81
  protected function generate_random_text() {
82
  return 'Here is some random text';
@@ -109,4 +111,18 @@ abstract class BuddypressCommand extends CommandWithDBObject {
109
  protected function sanitize_string( $type ) {
110
  return strtolower( str_replace( '-', '_', $type ) );
111
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
  }
77
  * Generate random text
78
  *
79
  * @since 1.1
80
+ *
81
+ * @return string
82
  */
83
  protected function generate_random_text() {
84
  return 'Here is some random text';
111
  protected function sanitize_string( $type ) {
112
  return strtolower( str_replace( '-', '_', $type ) );
113
  }
114
+
115
+ /**
116
+ * Pull up a random active component.
117
+ *
118
+ * @since 1.1
119
+ *
120
+ * @return string
121
+ */
122
+ protected function get_random_component() {
123
+ $c = buddypress()->active_components;
124
+ $ca = $this->get_components_and_actions();
125
+
126
+ return array_rand( array_flip( array_intersect( array_keys( $c ), array_keys( $ca ) ) ) );
127
+ }
128
  }
cli/components/activity.php CHANGED
@@ -669,22 +669,6 @@ class Activity extends BuddypressCommand {
669
  }
670
  }
671
 
672
- /**
673
- * Pull up a random active component for use in activity items.
674
- *
675
- * @since 1.1
676
- *
677
- * @return string
678
- */
679
- protected function get_random_component() {
680
- $c = buddypress()->active_components;
681
-
682
- // Core components that accept activity items.
683
- $ca = $this->get_components_and_actions();
684
-
685
- return array_rand( array_flip( array_intersect( array_keys( $c ), array_keys( $ca ) ) ) );
686
- }
687
-
688
  /**
689
  * Get a random type from a component.
690
  *
669
  }
670
  }
671
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
672
  /**
673
  * Get a random type from a component.
674
  *
cli/components/buddypress.php CHANGED
@@ -29,9 +29,9 @@ class BuddyPress extends BuddypressCommand {
29
  */
30
  private function command_to_array( $command ) {
31
  $dump = array(
32
- 'name' => $command->get_name(),
33
  'description' => $command->get_shortdesc(),
34
- 'longdesc' => $command->get_longdesc(),
35
  );
36
 
37
  foreach ( $command->get_subcommands() as $subcommand ) {
29
  */
30
  private function command_to_array( $command ) {
31
  $dump = array(
32
+ 'name' => $command->get_name(),
33
  'description' => $command->get_shortdesc(),
34
+ 'longdesc' => $command->get_longdesc(),
35
  );
36
 
37
  foreach ( $command->get_subcommands() as $subcommand ) {
cli/components/component.php CHANGED
@@ -197,7 +197,7 @@ class Components extends BuddypressCommand {
197
  // Inactive components.
198
  $inactive_components = array_diff( array_keys( $components ), array_keys( $active_components ) );
199
 
200
- $current_components = array();
201
  switch ( $status ) {
202
  case 'all':
203
  $index = 0;
@@ -219,6 +219,7 @@ class Components extends BuddypressCommand {
219
  $index++;
220
 
221
  $info = $components[ $component ];
 
222
  $current_components[] = array(
223
  'number' => $index,
224
  'id' => $component,
@@ -235,6 +236,7 @@ class Components extends BuddypressCommand {
235
  $index++;
236
 
237
  $info = $components[ $component ];
 
238
  $current_components[] = array(
239
  'number' => $index,
240
  'id' => $component,
197
  // Inactive components.
198
  $inactive_components = array_diff( array_keys( $components ), array_keys( $active_components ) );
199
 
200
+ $current_components = array();
201
  switch ( $status ) {
202
  case 'all':
203
  $index = 0;
219
  $index++;
220
 
221
  $info = $components[ $component ];
222
+
223
  $current_components[] = array(
224
  'number' => $index,
225
  'id' => $component,
236
  $index++;
237
 
238
  $info = $components[ $component ];
239
+
240
  $current_components[] = array(
241
  'number' => $index,
242
  'id' => $component,
cli/components/email.php CHANGED
@@ -71,7 +71,7 @@ class Email extends BuddypressCommand {
71
  restore_current_blog();
72
  }
73
 
74
- WP_CLI::error( "Email type '{$assoc_args['type']}' already exists." );
75
  }
76
 
77
  if ( ! empty( $args[0] ) ) {
@@ -89,8 +89,6 @@ class Email extends BuddypressCommand {
89
  }
90
  }
91
 
92
- $id = $assoc_args['type'];
93
-
94
  $defaults = array(
95
  'post_status' => 'publish',
96
  'post_type' => bp_get_email_post_type(),
@@ -102,6 +100,8 @@ class Email extends BuddypressCommand {
102
  'post_excerpt' => ! empty( $assoc_args['plain-text-content'] ) ? $assoc_args['plain-text-content'] : '',
103
  );
104
 
 
 
105
  // Email post content.
106
  $post_id = wp_insert_post( bp_parse_args( $email, $defaults, 'install_email_' . $id ), true );
107
 
@@ -121,7 +121,7 @@ class Email extends BuddypressCommand {
121
  restore_current_blog();
122
  }
123
 
124
- WP_CLI::success( "Email post created for type '{$assoc_args['type']}'." );
125
  } else {
126
  if ( true === $switched ) {
127
  restore_current_blog();
@@ -168,7 +168,7 @@ class Email extends BuddypressCommand {
168
  $email = bp_get_email( $args[0] );
169
 
170
  if ( is_wp_error( $email ) ) {
171
- WP_CLI::error( "Email post for type '{$args[0]}' does not exist." );
172
  }
173
 
174
  $post_arr = get_object_vars( $email->get_post_object() );
@@ -219,7 +219,7 @@ class Email extends BuddypressCommand {
219
  */
220
  protected function _edit( $content, $title ) {
221
  $content = apply_filters( 'the_editor_content', $content );
222
- $output = \WP_CLI\Utils\launch_editor_for_input( $content, $title );
223
 
224
  return ( is_string( $output ) ) ?
225
  apply_filters( 'content_save_pre', $output )
71
  restore_current_blog();
72
  }
73
 
74
+ WP_CLI::error( sprintf( 'Email type %s already exists.', $assoc_args['type'] ) );
75
  }
76
 
77
  if ( ! empty( $args[0] ) ) {
89
  }
90
  }
91
 
 
 
92
  $defaults = array(
93
  'post_status' => 'publish',
94
  'post_type' => bp_get_email_post_type(),
100
  'post_excerpt' => ! empty( $assoc_args['plain-text-content'] ) ? $assoc_args['plain-text-content'] : '',
101
  );
102
 
103
+ $id = $assoc_args['type'];
104
+
105
  // Email post content.
106
  $post_id = wp_insert_post( bp_parse_args( $email, $defaults, 'install_email_' . $id ), true );
107
 
121
  restore_current_blog();
122
  }
123
 
124
+ WP_CLI::success( sprintf( 'Email post created for type %s.', $assoc_args['type'] ) );
125
  } else {
126
  if ( true === $switched ) {
127
  restore_current_blog();
168
  $email = bp_get_email( $args[0] );
169
 
170
  if ( is_wp_error( $email ) ) {
171
+ WP_CLI::error( sprintf( 'Email post for type %s does not exist.', $args[0] ) );
172
  }
173
 
174
  $post_arr = get_object_vars( $email->get_post_object() );
219
  */
220
  protected function _edit( $content, $title ) {
221
  $content = apply_filters( 'the_editor_content', $content );
222
+ $output = \WP_CLI\Utils\launch_editor_for_input( $content, $title );
223
 
224
  return ( is_string( $output ) ) ?
225
  apply_filters( 'content_save_pre', $output )
cli/components/friend.php CHANGED
@@ -130,13 +130,13 @@ class Friend extends BuddypressCommand {
130
  *
131
  * ## EXAMPLES
132
  *
133
- * $ wp bp friend accept_invitation 2161
134
  * Success: Friendship successfully accepted.
135
  *
136
  * $ wp bp friend accept 2161
137
  * Success: Friendship successfully accepted.
138
  *
139
- * @alias accept_invitation
140
  */
141
  public function accept( $args, $assoc_args ) {
142
  foreach ( $args as $friendship_id ) {
@@ -158,13 +158,13 @@ class Friend extends BuddypressCommand {
158
  *
159
  * ## EXAMPLES
160
  *
161
- * $ wp bp friend reject_invitation 2161
162
  * Success: Friendship successfully accepted.
163
  *
164
  * $ wp bp friend reject 2161 151 2121
165
  * Success: Friendship successfully accepted.
166
  *
167
- * @alias reject_invitation
168
  */
169
  public function reject( $args, $assoc_args ) {
170
  foreach ( $args as $friendship_id ) {
130
  *
131
  * ## EXAMPLES
132
  *
133
+ * $ wp bp friend accept-invitation 2161
134
  * Success: Friendship successfully accepted.
135
  *
136
  * $ wp bp friend accept 2161
137
  * Success: Friendship successfully accepted.
138
  *
139
+ * @alias accept-invitation
140
  */
141
  public function accept( $args, $assoc_args ) {
142
  foreach ( $args as $friendship_id ) {
158
  *
159
  * ## EXAMPLES
160
  *
161
+ * $ wp bp friend reject-invitation 2161
162
  * Success: Friendship successfully accepted.
163
  *
164
  * $ wp bp friend reject 2161 151 2121
165
  * Success: Friendship successfully accepted.
166
  *
167
+ * @alias reject-invitation
168
  */
169
  public function reject( $args, $assoc_args ) {
170
  foreach ( $args as $friendship_id ) {
cli/components/notification.php ADDED
@@ -0,0 +1,388 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace Buddypress\CLI\Command;
3
+
4
+ use WP_CLI;
5
+
6
+ /**
7
+ * Manage BuddyPress Notifications.
8
+ *
9
+ * ## EXAMPLES
10
+ *
11
+ * # Create notification item.
12
+ * $ wp bp notification create
13
+ * Success: Successfully created new notification. (ID #5464)
14
+ *
15
+ * # Delete a notification item.
16
+ * $ wp bp notification delete 520
17
+ * Success: Notification deleted.
18
+ *
19
+ * @since 1.8.0
20
+ */
21
+ class Notification extends BuddypressCommand {
22
+
23
+ /**
24
+ * Object fields.
25
+ *
26
+ * @var array
27
+ */
28
+ protected $obj_fields = array(
29
+ 'id',
30
+ 'user_id',
31
+ 'item_id',
32
+ 'secondary_item_id',
33
+ 'component_name',
34
+ 'component_action',
35
+ 'date_notified',
36
+ 'is_new',
37
+ );
38
+
39
+ /**
40
+ * Create a notification item.
41
+ *
42
+ * ## OPTIONS
43
+ *
44
+ * [--component=<component>]
45
+ * : The component for the notification item (groups, activity, etc). If
46
+ * none is provided, a component will be randomly selected from the
47
+ * active components.
48
+ *
49
+ * [--action=<action>]
50
+ * : Name of the action to associate the notification. (comment_reply, update_reply, etc).
51
+ *
52
+ * [--user-id=<user>]
53
+ * : ID of the user associated with the new notification.
54
+ *
55
+ * [--item-id=<item>]
56
+ * : ID of the associated notification.
57
+ *
58
+ * [--secondary-item-id=<item>]
59
+ * : ID of the secondary associated notification.
60
+ *
61
+ * [--date=<date>]
62
+ * : GMT timestamp, in Y-m-d h:i:s format.
63
+ * ---
64
+ * default: Current time
65
+ * ---
66
+ *
67
+ * [--silent]
68
+ * : Whether to silent the notification creation.
69
+ *
70
+ * [--porcelain]
71
+ * : Output only the new notification id.
72
+ *
73
+ * ## EXAMPLES
74
+ *
75
+ * $ wp bp notification create --component=messages --action=update_reply --user-id=523
76
+ * Success: Successfully created new notification. (ID #5464)
77
+ *
78
+ * $ wp bp notification add --component=groups --action=comment_reply --user-id=10
79
+ * Success: Successfully created new notification (ID #48949)
80
+ *
81
+ * @alias add
82
+ */
83
+ public function create( $args, $assoc_args ) {
84
+ $r = wp_parse_args( $assoc_args, array(
85
+ 'component' => '',
86
+ 'action' => '',
87
+ 'user-id' => 0,
88
+ 'item-id' => 0,
89
+ 'secondary-item-id' => 0,
90
+ 'date' => bp_core_current_time(),
91
+ ) );
92
+
93
+ $id = bp_notifications_add_notification( array(
94
+ 'user_id' => $r['user-id'],
95
+ 'item_id' => $r['item-id'],
96
+ 'secondary_item_id' => $r['secondary-item-id'],
97
+ 'component_name' => $r['component'],
98
+ 'component_action' => $r['action'],
99
+ 'date_notified' => $r['date'],
100
+ ) );
101
+
102
+ // Silent it before it errors.
103
+ if ( WP_CLI\Utils\get_flag_value( $assoc_args, 'silent' ) ) {
104
+ return;
105
+ }
106
+
107
+ if ( ! is_numeric( $id ) ) {
108
+ WP_CLI::error( 'Could not create notification.' );
109
+ }
110
+
111
+ if ( WP_CLI\Utils\get_flag_value( $assoc_args, 'porcelain' ) ) {
112
+ WP_CLI::line( $id );
113
+ } else {
114
+ WP_CLI::success( sprintf( 'Successfully created new notification (ID #%d)', $id ) );
115
+ }
116
+ }
117
+
118
+ /**
119
+ * Get specific notification.
120
+ *
121
+ * ## OPTIONS
122
+ *
123
+ * <notification-id>
124
+ * : Identifier for the notification.
125
+ *
126
+ * [--fields=<fields>]
127
+ * : Limit the output to specific fields.
128
+ *
129
+ * [--format=<format>]
130
+ * : Render output in a particular format.
131
+ * ---
132
+ * default: table
133
+ * options:
134
+ * - table
135
+ * - csv
136
+ * - ids
137
+ * - json
138
+ * - count
139
+ * - yaml
140
+ * ---
141
+ *
142
+ * ## EXAMPLES
143
+ *
144
+ * $ wp bp notification get 500
145
+ * $ wp bp notification get 56 --format=json
146
+ *
147
+ * @alias see
148
+ */
149
+ public function get( $args, $assoc_args ) {
150
+ $notification = bp_notifications_get_notification( $args[0] );
151
+
152
+ if ( empty( $notification->id ) ) {
153
+ WP_CLI::error( 'No notification found by that ID.' );
154
+ }
155
+
156
+ if ( ! is_object( $notification ) ) {
157
+ WP_CLI::error( 'Could not find the notification.' );
158
+ }
159
+
160
+ $notification_arr = get_object_vars( $notification );
161
+
162
+ if ( empty( $assoc_args['fields'] ) ) {
163
+ $assoc_args['fields'] = array_keys( $notification_arr );
164
+ }
165
+
166
+ $formatter = $this->get_formatter( $assoc_args );
167
+ $formatter->display_item( $notification_arr );
168
+ }
169
+
170
+ /**
171
+ * Delete a notification.
172
+ *
173
+ * ## OPTIONS
174
+ *
175
+ * <notification-id>...
176
+ * : ID or IDs of notification to delete.
177
+ *
178
+ * [--yes]
179
+ * : Answer yes to the confirmation message.
180
+ *
181
+ * ## EXAMPLES
182
+ *
183
+ * $ wp bp notification delete 520 --yes
184
+ * Success: Deleted notification 520.
185
+ *
186
+ * $ wp bp notification delete 55654 54564 --yes
187
+ * Success: Deleted notification 55654.
188
+ * Success: Deleted notification 54564.
189
+ *
190
+ * $ wp bp notification delete $(wp bp notification list --format=ids) --yes
191
+ * Success: Deleted notification 35456465.
192
+ * Success: Deleted notification 46546546.
193
+ * Success: Deleted notification 46465465.
194
+ *
195
+ * @alias trash
196
+ */
197
+ public function delete( $args, $assoc_args ) {
198
+ $notifications = $args;
199
+
200
+ if ( count( $notifications ) > 1 ) {
201
+ WP_CLI::confirm( 'Are you sure want to delete these notifications?', $assoc_args );
202
+ } else {
203
+ WP_CLI::confirm( 'Are you sure you want to delete this notification?', $assoc_args );
204
+ }
205
+
206
+ parent::_delete( $notifications, $assoc_args, function( $notification_id ) {
207
+
208
+ $notification = bp_notifications_get_notification( $notification_id );
209
+
210
+ if ( empty( $notification->id ) ) {
211
+ WP_CLI::error( sprintf( 'No notification found by ID %d.', $notification_id ) );
212
+ }
213
+
214
+ if ( ! is_object( $notification ) ) {
215
+ WP_CLI::error( sprintf( 'Could not find the notification %d.', $notification_id ) );
216
+ }
217
+
218
+ if ( \BP_Notifications_Notification::delete( array( 'id' => $notification_id ) ) ) {
219
+ return array( 'success', sprintf( 'Deleted notification %d.', $notification_id ) );
220
+ } else {
221
+ return array( 'error', sprintf( 'Could not delete notification %d.', $notification_id ) );
222
+ }
223
+ } );
224
+ }
225
+
226
+ /**
227
+ * Generate random notifications.
228
+ *
229
+ * ## OPTIONS
230
+ *
231
+ * [--count=<number>]
232
+ * : How many notifications to generate.
233
+ * ---
234
+ * default: 100
235
+ * ---
236
+ *
237
+ * ## EXAMPLE
238
+ *
239
+ * $ wp bp notification generate --count=50
240
+ */
241
+ public function generate( $args, $assoc_args ) {
242
+ $notify = WP_CLI\Utils\make_progress_bar( 'Generating notifications', $assoc_args['count'] );
243
+
244
+ for ( $i = 0; $i < $assoc_args['count']; $i++ ) {
245
+
246
+ $component = $this->get_random_component();
247
+
248
+ $this->create( array(), array(
249
+ 'user-id' => $this->get_random_user_id(),
250
+ 'component' => $component,
251
+ 'action' => $this->get_random_action( $component ),
252
+ 'silent',
253
+ ) );
254
+
255
+ $notify->tick();
256
+ }
257
+
258
+ $notify->finish();
259
+ }
260
+
261
+ /**
262
+ * Get a list of notifications.
263
+ *
264
+ * ## OPTIONS
265
+ *
266
+ * [--<field>=<value>]
267
+ * : One or more parameters to pass.
268
+ *
269
+ * [--fields=<fields>]
270
+ * : Fields to display.
271
+ *
272
+ * [--user-id=<user>]
273
+ * : Limit results to a specific member. Accepts either a user_login or a numeric ID.
274
+ *
275
+ * [--component=<component>]
276
+ * : The component to fetch notifications (groups, activity, etc).
277
+ *
278
+ * [--action=<action>]
279
+ * : Name of the action to fetch notifications. (comment_reply, update_reply, etc).
280
+ *
281
+ * [--count=<number>]
282
+ * : How many notification items to list.
283
+ * ---
284
+ * default: 50
285
+ * ---
286
+ *
287
+ * [--format=<format>]
288
+ * : Render output in a particular format.
289
+ * ---
290
+ * default: table
291
+ * options:
292
+ * - table
293
+ * - ids
294
+ * - csv
295
+ * - count
296
+ * - haml
297
+ * ---
298
+
299
+ * ## EXAMPLES
300
+ *
301
+ * $ wp bp notification list --format=ids
302
+ * 15 25 34 37 198
303
+ *
304
+ * $ wp bp notification list --format=count
305
+ * 10
306
+ *
307
+ * $ wp bp notification list --fields=id,user_id
308
+ * | id | user_id |
309
+ * | 66546 | 656 |
310
+ * | 54554 | 646546 |
311
+ *
312
+ * @subcommand list
313
+ */
314
+ public function _list( $args, $assoc_args ) {
315
+ $formatter = $this->get_formatter( $assoc_args );
316
+
317
+ $query_args = wp_parse_args( $assoc_args, array(
318
+ 'count' => 50,
319
+ ) );
320
+
321
+ if ( isset( $assoc_args['user-id'] ) ) {
322
+ $user = $this->get_user_id_from_identifier( $assoc_args['user-id'] );
323
+ $query_args['user_id'] = $user->ID;
324
+ }
325
+
326
+ if ( isset( $assoc_args['action'] ) ) {
327
+ $query_args['component_action'] = $assoc_args['action'];
328
+ }
329
+
330
+ if ( isset( $assoc_args['component'] ) ) {
331
+ $query_args['component_name'] = $assoc_args['component'];
332
+ }
333
+
334
+ $query_args['per_page'] = $query_args['count'];
335
+
336
+ $query_args = self::process_csv_arguments_to_arrays( $query_args );
337
+
338
+ $notifications = \BP_Notifications_Notification::get( $query_args );
339
+
340
+ if ( empty( $notifications ) ) {
341
+ WP_CLI::error( 'No notification items found.' );
342
+ }
343
+
344
+ if ( 'ids' === $formatter->format ) {
345
+ echo implode( ' ', wp_list_pluck( $notifications, 'id' ) ); // WPCS: XSS ok.
346
+ } elseif ( 'count' === $formatter->format ) {
347
+ $formatter->display_items( $notifications );
348
+ } else {
349
+ $formatter->display_items( $notifications );
350
+ }
351
+ }
352
+
353
+ /**
354
+ * Get random notification actions based on component.
355
+ *
356
+ * @since 1.8.0
357
+ *
358
+ * @param string $component BuddyPress Component.
359
+ *
360
+ * @return string
361
+ */
362
+ protected function get_random_action( $component ) {
363
+ $bp = buddypress();
364
+ $actions = '';
365
+
366
+ // Activity.
367
+ if ( $bp->activity->id === $component ) {
368
+ $actions = [ 'comment_reply', 'update_reply', 'new_at_mention' ];
369
+ }
370
+
371
+ // Friendship.
372
+ if ( $bp->friends->id === $component ) {
373
+ $actions = [ 'friendship_request', 'friendship_accepted' ];
374
+ }
375
+
376
+ // Groups.
377
+ if ( $bp->groups->id === $component ) {
378
+ $actions = [ 'new_membership_request', 'membership_request_accepted', 'membership_request_rejected', 'member_promoted_to_admin', 'member_promoted_to_mod', 'group_invite' ];
379
+ }
380
+
381
+ // Messages.
382
+ if ( $bp->messages->id === $component ) {
383
+ $actions = [ 'new_message' ];
384
+ }
385
+
386
+ return array_rand( $actions );
387
+ }
388
+ }
cli/components/xprofile.php CHANGED
@@ -29,9 +29,9 @@ class XProfile extends BuddypressCommand {
29
  */
30
  private function command_to_array( $command ) {
31
  $dump = array(
32
- 'name' => $command->get_name(),
33
  'description' => $command->get_shortdesc(),
34
- 'longdesc' => $command->get_longdesc(),
35
  );
36
 
37
  foreach ( $command->get_subcommands() as $subcommand ) {
29
  */
30
  private function command_to_array( $command ) {
31
  $dump = array(
32
+ 'name' => $command->get_name(),
33
  'description' => $command->get_shortdesc(),
34
+ 'longdesc' => $command->get_longdesc(),
35
  );
36
 
37
  foreach ( $command->get_subcommands() as $subcommand ) {
cli/composer.json CHANGED
@@ -21,7 +21,7 @@
21
  "files": [ "wp-cli-bp.php" ]
22
  },
23
  "require": {
24
- "php": ">=5.3",
25
  "wp-cli/wp-cli": ">=0.23.0"
26
  },
27
  "require-dev": {
21
  "files": [ "wp-cli-bp.php" ]
22
  },
23
  "require": {
24
+ "php": ">=5.4",
25
  "wp-cli/wp-cli": ">=0.23.0"
26
  },
27
  "require-dev": {
cli/composer.lock CHANGED
@@ -4,7 +4,7 @@
4
  "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
5
  "This file is @generated automatically"
6
  ],
7
- "content-hash": "49131b60c9111f9e35feb53ac9b9eb9f",
8
  "packages": [
9
  {
10
  "name": "composer/ca-bundle",
@@ -702,7 +702,7 @@
702
  },
703
  {
704
  "name": "symfony/config",
705
- "version": "v2.8.41",
706
  "source": {
707
  "type": "git",
708
  "url": "https://github.com/symfony/config.git",
@@ -759,7 +759,7 @@
759
  },
760
  {
761
  "name": "symfony/console",
762
- "version": "v2.8.41",
763
  "source": {
764
  "type": "git",
765
  "url": "https://github.com/symfony/console.git",
@@ -877,16 +877,16 @@
877
  },
878
  {
879
  "name": "symfony/dependency-injection",
880
- "version": "v2.8.41",
881
  "source": {
882
  "type": "git",
883
  "url": "https://github.com/symfony/dependency-injection.git",
884
- "reference": "3d7cbf34cd75ede7f94b9b990f85bd089e15cd55"
885
  },
886
  "dist": {
887
  "type": "zip",
888
- "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/3d7cbf34cd75ede7f94b9b990f85bd089e15cd55",
889
- "reference": "3d7cbf34cd75ede7f94b9b990f85bd089e15cd55",
890
  "shasum": ""
891
  },
892
  "require": {
@@ -936,11 +936,11 @@
936
  ],
937
  "description": "Symfony DependencyInjection Component",
938
  "homepage": "https://symfony.com",
939
- "time": "2018-02-19T16:23:47+00:00"
940
  },
941
  {
942
  "name": "symfony/event-dispatcher",
943
- "version": "v2.8.41",
944
  "source": {
945
  "type": "git",
946
  "url": "https://github.com/symfony/event-dispatcher.git",
@@ -1049,16 +1049,16 @@
1049
  },
1050
  {
1051
  "name": "symfony/finder",
1052
- "version": "v2.8.41",
1053
  "source": {
1054
  "type": "git",
1055
  "url": "https://github.com/symfony/finder.git",
1056
- "reference": "79764d21163db295f0daf8bd9d9b91f97e65db6a"
1057
  },
1058
  "dist": {
1059
  "type": "zip",
1060
- "url": "https://api.github.com/repos/symfony/finder/zipball/79764d21163db295f0daf8bd9d9b91f97e65db6a",
1061
- "reference": "79764d21163db295f0daf8bd9d9b91f97e65db6a",
1062
  "shasum": ""
1063
  },
1064
  "require": {
@@ -1094,7 +1094,7 @@
1094
  ],
1095
  "description": "Symfony Finder Component",
1096
  "homepage": "https://symfony.com",
1097
- "time": "2018-05-15T21:17:45+00:00"
1098
  },
1099
  {
1100
  "name": "symfony/polyfill-ctype",
@@ -1212,16 +1212,16 @@
1212
  },
1213
  {
1214
  "name": "symfony/process",
1215
- "version": "v3.4.11",
1216
  "source": {
1217
  "type": "git",
1218
  "url": "https://github.com/symfony/process.git",
1219
- "reference": "4cbf2db9abcb01486a21b7a059e03a62fae63187"
1220
  },
1221
  "dist": {
1222
  "type": "zip",
1223
- "url": "https://api.github.com/repos/symfony/process/zipball/4cbf2db9abcb01486a21b7a059e03a62fae63187",
1224
- "reference": "4cbf2db9abcb01486a21b7a059e03a62fae63187",
1225
  "shasum": ""
1226
  },
1227
  "require": {
@@ -1257,11 +1257,11 @@
1257
  ],
1258
  "description": "Symfony Process Component",
1259
  "homepage": "https://symfony.com",
1260
- "time": "2018-05-16T08:49:21+00:00"
1261
  },
1262
  {
1263
  "name": "symfony/translation",
1264
- "version": "v2.8.41",
1265
  "source": {
1266
  "type": "git",
1267
  "url": "https://github.com/symfony/translation.git",
@@ -1325,7 +1325,7 @@
1325
  },
1326
  {
1327
  "name": "symfony/yaml",
1328
- "version": "v2.8.41",
1329
  "source": {
1330
  "type": "git",
1331
  "url": "https://github.com/symfony/yaml.git",
@@ -1600,16 +1600,16 @@
1600
  },
1601
  {
1602
  "name": "wp-cli/core-command",
1603
- "version": "v1.0.9",
1604
  "source": {
1605
  "type": "git",
1606
  "url": "https://github.com/wp-cli/core-command.git",
1607
- "reference": "0e825668d2c060c40ec1d7debbee94bc08eec9b3"
1608
  },
1609
  "dist": {
1610
  "type": "zip",
1611
- "url": "https://api.github.com/repos/wp-cli/core-command/zipball/0e825668d2c060c40ec1d7debbee94bc08eec9b3",
1612
- "reference": "0e825668d2c060c40ec1d7debbee94bc08eec9b3",
1613
  "shasum": ""
1614
  },
1615
  "require-dev": {
@@ -1656,7 +1656,7 @@
1656
  ],
1657
  "description": "Downloads, installs, updates, and manages a WordPress installation.",
1658
  "homepage": "https://github.com/wp-cli/core-command",
1659
- "time": "2018-01-30T06:57:10+00:00"
1660
  },
1661
  {
1662
  "name": "wp-cli/cron-command",
@@ -1719,16 +1719,16 @@
1719
  },
1720
  {
1721
  "name": "wp-cli/db-command",
1722
- "version": "v1.3.3",
1723
  "source": {
1724
  "type": "git",
1725
  "url": "https://github.com/wp-cli/db-command.git",
1726
- "reference": "7d361a15ffe34dfc9d798a81208fe61b8a2f049a"
1727
  },
1728
  "dist": {
1729
  "type": "zip",
1730
- "url": "https://api.github.com/repos/wp-cli/db-command/zipball/7d361a15ffe34dfc9d798a81208fe61b8a2f049a",
1731
- "reference": "7d361a15ffe34dfc9d798a81208fe61b8a2f049a",
1732
  "shasum": ""
1733
  },
1734
  "require-dev": {
@@ -1756,7 +1756,8 @@
1756
  "db import",
1757
  "db search",
1758
  "db tables",
1759
- "db size"
 
1760
  ]
1761
  },
1762
  "autoload": {
@@ -1780,7 +1781,7 @@
1780
  ],
1781
  "description": "Performs basic database operations using credentials stored in wp-config.php.",
1782
  "homepage": "https://github.com/wp-cli/db-command",
1783
- "time": "2018-01-29T02:30:16+00:00"
1784
  },
1785
  {
1786
  "name": "wp-cli/embed-command",
@@ -1841,16 +1842,16 @@
1841
  },
1842
  {
1843
  "name": "wp-cli/entity-command",
1844
- "version": "v1.2.0",
1845
  "source": {
1846
  "type": "git",
1847
  "url": "https://github.com/wp-cli/entity-command.git",
1848
- "reference": "035b74ea16912f5b14db7d28036a6d123eb90547"
1849
  },
1850
  "dist": {
1851
  "type": "zip",
1852
- "url": "https://api.github.com/repos/wp-cli/entity-command/zipball/035b74ea16912f5b14db7d28036a6d123eb90547",
1853
- "reference": "035b74ea16912f5b14db7d28036a6d123eb90547",
1854
  "shasum": ""
1855
  },
1856
  "require-dev": {
@@ -2037,7 +2038,7 @@
2037
  ],
2038
  "description": "Manage WordPress core entities.",
2039
  "homepage": "https://github.com/wp-cli/entity-command",
2040
- "time": "2018-01-29T15:10:05+00:00"
2041
  },
2042
  {
2043
  "name": "wp-cli/eval-command",
@@ -2095,16 +2096,16 @@
2095
  },
2096
  {
2097
  "name": "wp-cli/export-command",
2098
- "version": "v1.0.6",
2099
  "source": {
2100
  "type": "git",
2101
  "url": "https://github.com/wp-cli/export-command.git",
2102
- "reference": "4ae43d370ed6ed0cffd166dd84cfc6c8c2f3f633"
2103
  },
2104
  "dist": {
2105
  "type": "zip",
2106
- "url": "https://api.github.com/repos/wp-cli/export-command/zipball/4ae43d370ed6ed0cffd166dd84cfc6c8c2f3f633",
2107
- "reference": "4ae43d370ed6ed0cffd166dd84cfc6c8c2f3f633",
2108
  "shasum": ""
2109
  },
2110
  "require": {
@@ -2145,20 +2146,20 @@
2145
  ],
2146
  "description": "Exports WordPress content to a WXR file.",
2147
  "homepage": "https://github.com/wp-cli/export-command",
2148
- "time": "2018-01-29T02:33:05+00:00"
2149
  },
2150
  {
2151
  "name": "wp-cli/extension-command",
2152
- "version": "v1.1.10",
2153
  "source": {
2154
  "type": "git",
2155
  "url": "https://github.com/wp-cli/extension-command.git",
2156
- "reference": "3fd9ff469311bb2d6935997bc7d7e9f157fe29e6"
2157
  },
2158
  "dist": {
2159
  "type": "zip",
2160
- "url": "https://api.github.com/repos/wp-cli/extension-command/zipball/3fd9ff469311bb2d6935997bc7d7e9f157fe29e6",
2161
- "reference": "3fd9ff469311bb2d6935997bc7d7e9f157fe29e6",
2162
  "shasum": ""
2163
  },
2164
  "require-dev": {
@@ -2202,7 +2203,8 @@
2202
  "theme path",
2203
  "theme search",
2204
  "theme status",
2205
- "theme update"
 
2206
  ]
2207
  },
2208
  "autoload": {
@@ -2226,20 +2228,20 @@
2226
  ],
2227
  "description": "Manages plugins and themes, including installs, activations, and updates.",
2228
  "homepage": "https://github.com/wp-cli/extension-command",
2229
- "time": "2018-03-02T13:26:40+00:00"
2230
  },
2231
  {
2232
  "name": "wp-cli/import-command",
2233
- "version": "v1.0.6",
2234
  "source": {
2235
  "type": "git",
2236
  "url": "https://github.com/wp-cli/import-command.git",
2237
- "reference": "d2c21d590a1bfae6ac4e289a0b57fb1870b5990c"
2238
  },
2239
  "dist": {
2240
  "type": "zip",
2241
- "url": "https://api.github.com/repos/wp-cli/import-command/zipball/d2c21d590a1bfae6ac4e289a0b57fb1870b5990c",
2242
- "reference": "d2c21d590a1bfae6ac4e289a0b57fb1870b5990c",
2243
  "shasum": ""
2244
  },
2245
  "require": {
@@ -2279,7 +2281,7 @@
2279
  ],
2280
  "description": "Imports content from a given WXR file.",
2281
  "homepage": "https://github.com/wp-cli/import-command",
2282
- "time": "2017-12-08T15:13:36+00:00"
2283
  },
2284
  {
2285
  "name": "wp-cli/language-command",
@@ -2442,16 +2444,16 @@
2442
  },
2443
  {
2444
  "name": "wp-cli/package-command",
2445
- "version": "v1.0.13",
2446
  "source": {
2447
  "type": "git",
2448
  "url": "https://github.com/wp-cli/package-command.git",
2449
- "reference": "c912f5bbad216997d7496d46fc5c05af0e16fc5b"
2450
  },
2451
  "dist": {
2452
  "type": "zip",
2453
- "url": "https://api.github.com/repos/wp-cli/package-command/zipball/c912f5bbad216997d7496d46fc5c05af0e16fc5b",
2454
- "reference": "c912f5bbad216997d7496d46fc5c05af0e16fc5b",
2455
  "shasum": ""
2456
  },
2457
  "require": {
@@ -2497,7 +2499,7 @@
2497
  ],
2498
  "description": "Lists, installs, and removes WP-CLI packages.",
2499
  "homepage": "https://github.com/wp-cli/package-command",
2500
- "time": "2018-04-20T23:33:22+00:00"
2501
  },
2502
  {
2503
  "name": "wp-cli/php-cli-tools",
@@ -2724,16 +2726,16 @@
2724
  },
2725
  {
2726
  "name": "wp-cli/search-replace-command",
2727
- "version": "v1.3.0",
2728
  "source": {
2729
  "type": "git",
2730
  "url": "https://github.com/wp-cli/search-replace-command.git",
2731
- "reference": "df1092f65a5953dddace5fc060a9155f430a560e"
2732
  },
2733
  "dist": {
2734
  "type": "zip",
2735
- "url": "https://api.github.com/repos/wp-cli/search-replace-command/zipball/df1092f65a5953dddace5fc060a9155f430a560e",
2736
- "reference": "df1092f65a5953dddace5fc060a9155f430a560e",
2737
  "shasum": ""
2738
  },
2739
  "require-dev": {
@@ -2771,7 +2773,7 @@
2771
  ],
2772
  "description": "Searches/replaces strings in the database.",
2773
  "homepage": "https://github.com/wp-cli/search-replace-command",
2774
- "time": "2018-04-21T01:30:44+00:00"
2775
  },
2776
  {
2777
  "name": "wp-cli/server-command",
@@ -3000,12 +3002,12 @@
3000
  "source": {
3001
  "type": "git",
3002
  "url": "https://github.com/wp-cli/wp-cli.git",
3003
- "reference": "76ee045996169a50b3466dac518e38cdf24109a7"
3004
  },
3005
  "dist": {
3006
  "type": "zip",
3007
- "url": "https://api.github.com/repos/wp-cli/wp-cli/zipball/76ee045996169a50b3466dac518e38cdf24109a7",
3008
- "reference": "76ee045996169a50b3466dac518e38cdf24109a7",
3009
  "shasum": ""
3010
  },
3011
  "require": {
@@ -3273,7 +3275,7 @@
3273
  "prefer-stable": true,
3274
  "prefer-lowest": false,
3275
  "platform": {
3276
- "php": ">=5.3"
3277
  },
3278
  "platform-dev": []
3279
  }
4
  "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
5
  "This file is @generated automatically"
6
  ],
7
+ "content-hash": "f026ee372574818b3e068cddac720c12",
8
  "packages": [
9
  {
10
  "name": "composer/ca-bundle",
702
  },
703
  {
704
  "name": "symfony/config",
705
+ "version": "v2.8.42",
706
  "source": {
707
  "type": "git",
708
  "url": "https://github.com/symfony/config.git",
759
  },
760
  {
761
  "name": "symfony/console",
762
+ "version": "v2.8.42",
763
  "source": {
764
  "type": "git",
765
  "url": "https://github.com/symfony/console.git",
877
  },
878
  {
879
  "name": "symfony/dependency-injection",
880
+ "version": "v2.8.42",
881
  "source": {
882
  "type": "git",
883
  "url": "https://github.com/symfony/dependency-injection.git",
884
+ "reference": "0f42a0827d99a867ffd279ae083e7daf1fe42cb7"
885
  },
886
  "dist": {
887
  "type": "zip",
888
+ "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/0f42a0827d99a867ffd279ae083e7daf1fe42cb7",
889
+ "reference": "0f42a0827d99a867ffd279ae083e7daf1fe42cb7",
890
  "shasum": ""
891
  },
892
  "require": {
936
  ],
937
  "description": "Symfony DependencyInjection Component",
938
  "homepage": "https://symfony.com",
939
+ "time": "2018-05-25T13:50:34+00:00"
940
  },
941
  {
942
  "name": "symfony/event-dispatcher",
943
+ "version": "v2.8.42",
944
  "source": {
945
  "type": "git",
946
  "url": "https://github.com/symfony/event-dispatcher.git",
1049
  },
1050
  {
1051
  "name": "symfony/finder",
1052
+ "version": "v2.8.42",
1053
  "source": {
1054
  "type": "git",
1055
  "url": "https://github.com/symfony/finder.git",
1056
+ "reference": "995cd7c28a0778cece02e2133b4d813dc509dfc3"
1057
  },
1058
  "dist": {
1059
  "type": "zip",
1060
+ "url": "https://api.github.com/repos/symfony/finder/zipball/995cd7c28a0778cece02e2133b4d813dc509dfc3",
1061
+ "reference": "995cd7c28a0778cece02e2133b4d813dc509dfc3",
1062
  "shasum": ""
1063
  },
1064
  "require": {
1094
  ],
1095
  "description": "Symfony Finder Component",
1096
  "homepage": "https://symfony.com",
1097
+ "time": "2018-06-19T11:07:17+00:00"
1098
  },
1099
  {
1100
  "name": "symfony/polyfill-ctype",
1212
  },
1213
  {
1214
  "name": "symfony/process",
1215
+ "version": "v3.4.12",
1216
  "source": {
1217
  "type": "git",
1218
  "url": "https://github.com/symfony/process.git",
1219
+ "reference": "acc5a37c706ace827962851b69705b24e71ca17c"
1220
  },
1221
  "dist": {
1222
  "type": "zip",
1223
+ "url": "https://api.github.com/repos/symfony/process/zipball/acc5a37c706ace827962851b69705b24e71ca17c",
1224
+ "reference": "acc5a37c706ace827962851b69705b24e71ca17c",
1225
  "shasum": ""
1226
  },
1227
  "require": {
1257
  ],
1258
  "description": "Symfony Process Component",
1259
  "homepage": "https://symfony.com",
1260
+ "time": "2018-05-30T04:24:30+00:00"
1261
  },
1262
  {
1263
  "name": "symfony/translation",
1264
+ "version": "v2.8.42",
1265
  "source": {
1266
  "type": "git",
1267
  "url": "https://github.com/symfony/translation.git",
1325
  },
1326
  {
1327
  "name": "symfony/yaml",
1328
+ "version": "v2.8.42",
1329
  "source": {
1330
  "type": "git",
1331
  "url": "https://github.com/symfony/yaml.git",
1600
  },
1601
  {
1602
  "name": "wp-cli/core-command",
1603
+ "version": "v1.0.11",
1604
  "source": {
1605
  "type": "git",
1606
  "url": "https://github.com/wp-cli/core-command.git",
1607
+ "reference": "96b7ee4a035c11f473a07c04cd6c07bbf053d797"
1608
  },
1609
  "dist": {
1610
  "type": "zip",
1611
+ "url": "https://api.github.com/repos/wp-cli/core-command/zipball/96b7ee4a035c11f473a07c04cd6c07bbf053d797",
1612
+ "reference": "96b7ee4a035c11f473a07c04cd6c07bbf053d797",
1613
  "shasum": ""
1614
  },
1615
  "require-dev": {
1656
  ],
1657
  "description": "Downloads, installs, updates, and manages a WordPress installation.",
1658
  "homepage": "https://github.com/wp-cli/core-command",
1659
+ "time": "2018-07-20T12:46:52+00:00"
1660
  },
1661
  {
1662
  "name": "wp-cli/cron-command",
1719
  },
1720
  {
1721
  "name": "wp-cli/db-command",
1722
+ "version": "v1.3.4",
1723
  "source": {
1724
  "type": "git",
1725
  "url": "https://github.com/wp-cli/db-command.git",
1726
+ "reference": "c9b7a5ef80f08a16cb7710ac8e63fc57a419bb9f"
1727
  },
1728
  "dist": {
1729
  "type": "zip",
1730
+ "url": "https://api.github.com/repos/wp-cli/db-command/zipball/c9b7a5ef80f08a16cb7710ac8e63fc57a419bb9f",
1731
+ "reference": "c9b7a5ef80f08a16cb7710ac8e63fc57a419bb9f",
1732
  "shasum": ""
1733
  },
1734
  "require-dev": {
1756
  "db import",
1757
  "db search",
1758
  "db tables",
1759
+ "db size",
1760
+ "db columns"
1761
  ]
1762
  },
1763
  "autoload": {
1781
  ],
1782
  "description": "Performs basic database operations using credentials stored in wp-config.php.",
1783
  "homepage": "https://github.com/wp-cli/db-command",
1784
+ "time": "2018-05-15T15:36:55+00:00"
1785
  },
1786
  {
1787
  "name": "wp-cli/embed-command",
1842
  },
1843
  {
1844
  "name": "wp-cli/entity-command",
1845
+ "version": "v1.3.0",
1846
  "source": {
1847
  "type": "git",
1848
  "url": "https://github.com/wp-cli/entity-command.git",
1849
+ "reference": "bf540e238bffc8c39286b1d16708c9d52866c4a5"
1850
  },
1851
  "dist": {
1852
  "type": "zip",
1853
+ "url": "https://api.github.com/repos/wp-cli/entity-command/zipball/bf540e238bffc8c39286b1d16708c9d52866c4a5",
1854
+ "reference": "bf540e238bffc8c39286b1d16708c9d52866c4a5",
1855
  "shasum": ""
1856
  },
1857
  "require-dev": {
2038
  ],
2039
  "description": "Manage WordPress core entities.",
2040
  "homepage": "https://github.com/wp-cli/entity-command",
2041
+ "time": "2018-05-28T19:07:39+00:00"
2042
  },
2043
  {
2044
  "name": "wp-cli/eval-command",
2096
  },
2097
  {
2098
  "name": "wp-cli/export-command",
2099
+ "version": "v1.0.7",
2100
  "source": {
2101
  "type": "git",
2102
  "url": "https://github.com/wp-cli/export-command.git",
2103
+ "reference": "776d33ad6b2ac93c00fded27402ca8e188e7bff0"
2104
  },
2105
  "dist": {
2106
  "type": "zip",
2107
+ "url": "https://api.github.com/repos/wp-cli/export-command/zipball/776d33ad6b2ac93c00fded27402ca8e188e7bff0",
2108
+ "reference": "776d33ad6b2ac93c00fded27402ca8e188e7bff0",
2109
  "shasum": ""
2110
  },
2111
  "require": {
2146
  ],
2147
  "description": "Exports WordPress content to a WXR file.",
2148
  "homepage": "https://github.com/wp-cli/export-command",
2149
+ "time": "2018-04-20T08:10:47+00:00"
2150
  },
2151
  {
2152
  "name": "wp-cli/extension-command",
2153
+ "version": "v1.2.0",
2154
  "source": {
2155
  "type": "git",
2156
  "url": "https://github.com/wp-cli/extension-command.git",
2157
+ "reference": "fe25c2acbe23963a5a95524b3770e04aedfd3d9e"
2158
  },
2159
  "dist": {
2160
  "type": "zip",
2161
+ "url": "https://api.github.com/repos/wp-cli/extension-command/zipball/fe25c2acbe23963a5a95524b3770e04aedfd3d9e",
2162
+ "reference": "fe25c2acbe23963a5a95524b3770e04aedfd3d9e",
2163
  "shasum": ""
2164
  },
2165
  "require-dev": {
2203
  "theme path",
2204
  "theme search",
2205
  "theme status",
2206
+ "theme update",
2207
+ "theme mod list"
2208
  ]
2209
  },
2210
  "autoload": {
2228
  ],
2229
  "description": "Manages plugins and themes, including installs, activations, and updates.",
2230
  "homepage": "https://github.com/wp-cli/extension-command",
2231
+ "time": "2018-07-18T20:24:09+00:00"
2232
  },
2233
  {
2234
  "name": "wp-cli/import-command",
2235
+ "version": "v1.0.7",
2236
  "source": {
2237
  "type": "git",
2238
  "url": "https://github.com/wp-cli/import-command.git",
2239
+ "reference": "421fec5bd96671931f2119a89d28bae2f9edeb6b"
2240
  },
2241
  "dist": {
2242
  "type": "zip",
2243
+ "url": "https://api.github.com/repos/wp-cli/import-command/zipball/421fec5bd96671931f2119a89d28bae2f9edeb6b",
2244
+ "reference": "421fec5bd96671931f2119a89d28bae2f9edeb6b",
2245
  "shasum": ""
2246
  },
2247
  "require": {
2281
  ],
2282
  "description": "Imports content from a given WXR file.",
2283
  "homepage": "https://github.com/wp-cli/import-command",
2284
+ "time": "2018-04-20T08:07:05+00:00"
2285
  },
2286
  {
2287
  "name": "wp-cli/language-command",
2444
  },
2445
  {
2446
  "name": "wp-cli/package-command",
2447
+ "version": "v1.0.14",
2448
  "source": {
2449
  "type": "git",
2450
  "url": "https://github.com/wp-cli/package-command.git",
2451
+ "reference": "a7ce916de5e1d0c3d910d4fc8ca31928ee3775d3"
2452
  },
2453
  "dist": {
2454
  "type": "zip",
2455
+ "url": "https://api.github.com/repos/wp-cli/package-command/zipball/a7ce916de5e1d0c3d910d4fc8ca31928ee3775d3",
2456
+ "reference": "a7ce916de5e1d0c3d910d4fc8ca31928ee3775d3",
2457
  "shasum": ""
2458
  },
2459
  "require": {
2499
  ],
2500
  "description": "Lists, installs, and removes WP-CLI packages.",
2501
  "homepage": "https://github.com/wp-cli/package-command",
2502
+ "time": "2018-05-28T11:40:24+00:00"
2503
  },
2504
  {
2505
  "name": "wp-cli/php-cli-tools",
2726
  },
2727
  {
2728
  "name": "wp-cli/search-replace-command",
2729
+ "version": "v1.3.1",
2730
  "source": {
2731
  "type": "git",
2732
  "url": "https://github.com/wp-cli/search-replace-command.git",
2733
+ "reference": "be21639dc530ad6506664baa813862d39b6d78ba"
2734
  },
2735
  "dist": {
2736
  "type": "zip",
2737
+ "url": "https://api.github.com/repos/wp-cli/search-replace-command/zipball/be21639dc530ad6506664baa813862d39b6d78ba",
2738
+ "reference": "be21639dc530ad6506664baa813862d39b6d78ba",
2739
  "shasum": ""
2740
  },
2741
  "require-dev": {
2773
  ],
2774
  "description": "Searches/replaces strings in the database.",
2775
  "homepage": "https://github.com/wp-cli/search-replace-command",
2776
+ "time": "2018-05-29T10:21:19+00:00"
2777
  },
2778
  {
2779
  "name": "wp-cli/server-command",
3002
  "source": {
3003
  "type": "git",
3004
  "url": "https://github.com/wp-cli/wp-cli.git",
3005
+ "reference": "3aac73bc4d629372531f3e15bbb67945d19b5d5a"
3006
  },
3007
  "dist": {
3008
  "type": "zip",
3009
+ "url": "https://api.github.com/repos/wp-cli/wp-cli/zipball/3aac73bc4d629372531f3e15bbb67945d19b5d5a",
3010
+ "reference": "3aac73bc4d629372531f3e15bbb67945d19b5d5a",
3011
  "shasum": ""
3012
  },
3013
  "require": {
3275
  "prefer-stable": true,
3276
  "prefer-lowest": false,
3277
  "platform": {
3278
+ "php": ">=5.4"
3279
  },
3280
  "platform-dev": []
3281
  }
cli/features/notification.feature ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Feature: Manage BuddyPress Notifications
2
+
3
+ Scenario: Notifications CRUD Operations
4
+ Given a BP install
5
+
6
+ When I run `wp user create testuser2 testuser2@example.com --first_name=test --last_name=user --role=subscriber --porcelain`
7
+ Then STDOUT should be a number
8
+ And save STDOUT as {MEMBER_ID}
9
+
10
+ When I run `wp bp notification create --component=activity --action=comment_reply --user-id={MEMBER_ID} --porcelain`
11
+ Then STDOUT should be a number
12
+ And save STDOUT as {NOTIFICATION_ID}
13
+
14
+ When I run `wp bp notification get {NOTIFICATION_ID} --fields=user_id,component_name,component_action`
15
+ Then STDOUT should be a table containing rows:
16
+ | Field | Value |
17
+ | user_id | {MEMBER_ID} |
18
+ | component_name | activity |
19
+ | component_action | comment_reply |
20
+
21
+ When I run `wp bp notification list --fields=id,user_id`
22
+ Then STDOUT should be a table containing rows:
23
+ | id | user_id |
24
+ | {NOTIFICATION_ID} | {MEMBER_ID} |
25
+
26
+ When I run `wp bp notification get {NOTIFICATION_ID}`
27
+ Then STDOUT should be a table containing rows:
28
+ | Field | Value |
29
+ | user_id | {MEMBER_ID} |
30
+ | component_name | activity |
31
+ | component_action | comment_reply |
32
+
33
+ When I run `wp bp notification delete {NOTIFICATION_ID} --yes`
34
+ Then STDOUT should contain:
35
+ """
36
+ Success: Deleted notification {NOTIFICATION_ID}.
37
+ """
38
+
39
+ Scenario: Notification list
40
+ Given a BP install
41
+
42
+ When I run `wp user create testuser1 testuser1@example.com --first_name=test --last_name=user --role=subscriber --porcelain`
43
+ Then STDOUT should be a number
44
+ And save STDOUT as {MEMBER_ONE_ID}
45
+
46
+ When I run `wp user create testuser2 testuser2@example.com --first_name=test --last_name=user --role=subscriber --porcelain`
47
+ Then STDOUT should be a number
48
+ And save STDOUT as {MEMBER_TWO_ID}
49
+
50
+ When I run `wp bp notification create --component=groups --user-id={MEMBER_ONE_ID} --porcelain`
51
+ Then STDOUT should be a number
52
+ And save STDOUT as {NOTIFICATION_ONE_ID}
53
+
54
+ When I run `wp bp notification create --component=activity --user-id={MEMBER_TWO_ID} --porcelain`
55
+ Then STDOUT should be a number
56
+ And save STDOUT as {NOTIFICATION_TWO_ID}
57
+
58
+ When I run `wp bp notification list --fields=id,user_id`
59
+ Then STDOUT should be a table containing rows:
60
+ | id | user_id |
61
+ | {NOTIFICATION_ONE_ID} | {MEMBER_ONE_ID} |
62
+ | {NOTIFICATION_TWO_ID} | {MEMBER_TWO_ID} |
63
+
64
+ When I run `wp bp notification delete {NOTIFICATION_ONE_ID} {NOTIFICATION_TWO_ID} --yes`
65
+ Then STDOUT should contain:
66
+ """
67
+ Success: Deleted notification {NOTIFICATION_ONE_ID}.
68
+ Success: Deleted notification {NOTIFICATION_TWO_ID}.
69
+ """
cli/features/steps/given-custom.php CHANGED
@@ -21,7 +21,7 @@ $steps->Given( '/^a BP install$/',
21
  $world->copy_dir( $bp_src_dir, $dest_dir );
22
  $world->proc( 'wp plugin activate buddypress' )->run_check();
23
 
24
- $components = array( 'friends', 'groups', 'xprofile', 'activity', 'messages' );
25
  foreach ( $components as $component ) {
26
  $world->proc( "wp bp component activate $component" )->run_check();
27
  }
21
  $world->copy_dir( $bp_src_dir, $dest_dir );
22
  $world->proc( 'wp plugin activate buddypress' )->run_check();
23
 
24
+ $components = array( 'friends', 'groups', 'xprofile', 'activity', 'messages', 'notifications' );
25
  foreach ( $components as $component ) {
26
  $world->proc( "wp bp component activate $component" )->run_check();
27
  }
cli/license.txt DELETED
@@ -1,280 +0,0 @@
1
- GNU GENERAL PUBLIC LICENSE
2
- Version 2, June 1991
3
-
4
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5
- 675 Mass Ave, Cambridge, MA 02139, USA
6
- Everyone is permitted to copy and distribute verbatim copies
7
- of this license document, but changing it is not allowed.
8
-
9
- Preamble
10
-
11
- The licenses for most software are designed to take away your
12
- freedom to share and change it. By contrast, the GNU General Public
13
- License is intended to guarantee your freedom to share and change free
14
- software--to make sure the software is free for all its users. This
15
- General Public License applies to most of the Free Software
16
- Foundation's software and to any other program whose authors commit to
17
- using it. (Some other Free Software Foundation software is covered by
18
- the GNU Library General Public License instead.) You can apply it to
19
- your programs, too.
20
-
21
- When we speak of free software, we are referring to freedom, not
22
- price. Our General Public Licenses are designed to make sure that you
23
- have the freedom to distribute copies of free software (and charge for
24
- this service if you wish), that you receive source code or can get it
25
- if you want it, that you can change the software or use pieces of it
26
- in new free programs; and that you know you can do these things.
27
-
28
- To protect your rights, we need to make restrictions that forbid
29
- anyone to deny you these rights or to ask you to surrender the rights.
30
- These restrictions translate to certain responsibilities for you if you
31
- distribute copies of the software, or if you modify it.
32
-
33
- For example, if you distribute copies of such a program, whether
34
- gratis or for a fee, you must give the recipients all the rights that
35
- you have. You must make sure that they, too, receive or can get the
36
- source code. And you must show them these terms so they know their
37
- rights.
38
-
39
- We protect your rights with two steps: (1) copyright the software, and
40
- (2) offer you this license which gives you legal permission to copy,
41
- distribute and/or modify the software.
42
-
43
- Also, for each author's protection and ours, we want to make certain
44
- that everyone understands that there is no warranty for this free
45
- software. If the software is modified by someone else and passed on, we
46
- want its recipients to know that what they have is not the original, so
47
- that any problems introduced by others will not reflect on the original
48
- authors' reputations.
49
-
50
- Finally, any free program is threatened constantly by software
51
- patents. We wish to avoid the danger that redistributors of a free
52
- program will individually obtain patent licenses, in effect making the
53
- program proprietary. To prevent this, we have made it clear that any
54
- patent must be licensed for everyone's free use or not licensed at all.
55
-
56
- The precise terms and conditions for copying, distribution and
57
- modification follow.
58
-
59
- GNU GENERAL PUBLIC LICENSE
60
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
-
62
- 0. This License applies to any program or other work which contains
63
- a notice placed by the copyright holder saying it may be distributed
64
- under the terms of this General Public License. The "Program", below,
65
- refers to any such program or work, and a "work based on the Program"
66
- means either the Program or any derivative work under copyright law:
67
- that is to say, a work containing the Program or a portion of it,
68
- either verbatim or with modifications and/or translated into another
69
- language. (Hereinafter, translation is included without limitation in
70
- the term "modification".) Each licensee is addressed as "you".
71
-
72
- Activities other than copying, distribution and modification are not
73
- covered by this License; they are outside its scope. The act of
74
- running the Program is not restricted, and the output from the Program
75
- is covered only if its contents constitute a work based on the
76
- Program (independent of having been made by running the Program).
77
- Whether that is true depends on what the Program does.
78
-
79
- 1. You may copy and distribute verbatim copies of the Program's
80
- source code as you receive it, in any medium, provided that you
81
- conspicuously and appropriately publish on each copy an appropriate
82
- copyright notice and disclaimer of warranty; keep intact all the
83
- notices that refer to this License and to the absence of any warranty;
84
- and give any other recipients of the Program a copy of this License
85
- along with the Program.
86
-
87
- You may charge a fee for the physical act of transferring a copy, and
88
- you may at your option offer warranty protection in exchange for a fee.
89
-
90
- 2. You may modify your copy or copies of the Program or any portion
91
- of it, thus forming a work based on the Program, and copy and
92
- distribute such modifications or work under the terms of Section 1
93
- above, provided that you also meet all of these conditions:
94
-
95
- a) You must cause the modified files to carry prominent notices
96
- stating that you changed the files and the date of any change.
97
-
98
- b) You must cause any work that you distribute or publish, that in
99
- whole or in part contains or is derived from the Program or any
100
- part thereof, to be licensed as a whole at no charge to all third
101
- parties under the terms of this License.
102
-
103
- c) If the modified program normally reads commands interactively
104
- when run, you must cause it, when started running for such
105
- interactive use in the most ordinary way, to print or display an
106
- announcement including an appropriate copyright notice and a
107
- notice that there is no warranty (or else, saying that you provide
108
- a warranty) and that users may redistribute the program under
109
- these conditions, and telling the user how to view a copy of this
110
- License. (Exception: if the Program itself is interactive but
111
- does not normally print such an announcement, your work based on
112
- the Program is not required to print an announcement.)
113
-
114
- These requirements apply to the modified work as a whole. If
115
- identifiable sections of that work are not derived from the Program,
116
- and can be reasonably considered independent and separate works in
117
- themselves, then this License, and its terms, do not apply to those
118
- sections when you distribute them as separate works. But when you
119
- distribute the same sections as part of a whole which is a work based
120
- on the Program, the distribution of the whole must be on the terms of
121
- this License, whose permissions for other licensees extend to the
122
- entire whole, and thus to each and every part regardless of who wrote it.
123
- Thus, it is not the intent of this section to claim rights or contest
124
- your rights to work written entirely by you; rather, the intent is to
125
- exercise the right to control the distribution of derivative or
126
- collective works based on the Program.
127
-
128
- In addition, mere aggregation of another work not based on the Program
129
- with the Program (or with a work based on the Program) on a volume of
130
- a storage or distribution medium does not bring the other work under
131
- the scope of this License.
132
-
133
- 3. You may copy and distribute the Program (or a work based on it,
134
- under Section 2) in object code or executable form under the terms of
135
- Sections 1 and 2 above provided that you also do one of the following:
136
-
137
- a) Accompany it with the complete corresponding machine-readable
138
- source code, which must be distributed under the terms of Sections
139
- 1 and 2 above on a medium customarily used for software interchange; or,
140
-
141
- b) Accompany it with a written offer, valid for at least three
142
- years, to give any third party, for a charge no more than your
143
- cost of physically performing source distribution, a complete
144
- machine-readable copy of the corresponding source code, to be
145
- distributed under the terms of Sections 1 and 2 above on a medium
146
- customarily used for software interchange; or,
147
-
148
- c) Accompany it with the information you received as to the offer
149
- to distribute corresponding source code. (This alternative is
150
- allowed only for noncommercial distribution and only if you
151
- received the program in object code or executable form with such
152
- an offer, in accord with Subsection b above.)
153
-
154
- The source code for a work means the preferred form of the work for
155
- making modifications to it. For an executable work, complete source
156
- code means all the source code for all modules it contains, plus any
157
- associated interface definition files, plus the scripts used to
158
- control compilation and installation of the executable. However, as a
159
- special exception, the source code distributed need not include
160
- anything that is normally distributed (in either source or binary
161
- form) with the major components (compiler, kernel, and so on) of the
162
- operating system on which the executable runs, unless that component
163
- itself accompanies the executable.
164
-
165
- If distribution of executable or object code is made by offering
166
- access to copy from a designated place, then offering equivalent
167
- access to copy the source code from the same place counts as
168
- distribution of the source code, even though third parties are not
169
- compelled to copy the source along with the object code.
170
-
171
- 4. You may not copy, modify, sublicense, or distribute the Program
172
- except as expressly provided under this License. Any attempt
173
- otherwise to copy, modify, sublicense or distribute the Program is
174
- void, and will automatically terminate your rights under this License.
175
- However, parties who have received copies, or rights, from you under
176
- this License will not have their licenses terminated so long as such
177
- parties remain in full compliance.
178
-
179
- 5. You are not required to accept this License, since you have not
180
- signed it. However, nothing else grants you permission to modify or
181
- distribute the Program or its derivative works. These actions are
182
- prohibited by law if you do not accept this License. Therefore, by
183
- modifying or distributing the Program (or any work based on the
184
- Program), you indicate your acceptance of this License to do so, and
185
- all its terms and conditions for copying, distributing or modifying
186
- the Program or works based on it.
187
-
188
- 6. Each time you redistribute the Program (or any work based on the
189
- Program), the recipient automatically receives a license from the
190
- original licensor to copy, distribute or modify the Program subject to
191
- these terms and conditions. You may not impose any further
192
- restrictions on the recipients' exercise of the rights granted herein.
193
- You are not responsible for enforcing compliance by third parties to
194
- this License.
195
-
196
- 7. If, as a consequence of a court judgment or allegation of patent
197
- infringement or for any other reason (not limited to patent issues),
198
- conditions are imposed on you (whether by court order, agreement or
199
- otherwise) that contradict the conditions of this License, they do not
200
- excuse you from the conditions of this License. If you cannot
201
- distribute so as to satisfy simultaneously your obligations under this
202
- License and any other pertinent obligations, then as a consequence you
203
- may not distribute the Program at all. For example, if a patent
204
- license would not permit royalty-free redistribution of the Program by
205
- all those who receive copies directly or indirectly through you, then
206
- the only way you could satisfy both it and this License would be to
207
- refrain entirely from distribution of the Program.
208
-
209
- If any portion of this section is held invalid or unenforceable under
210
- any particular circumstance, the balance of the section is intended to
211
- apply and the section as a whole is intended to apply in other
212
- circumstances.
213
-
214
- It is not the purpose of this section to induce you to infringe any
215
- patents or other property right claims or to contest validity of any
216
- such claims; this section has the sole purpose of protecting the
217
- integrity of the free software distribution system, which is
218
- implemented by public license practices. Many people have made
219
- generous contributions to the wide range of software distributed
220
- through that system in reliance on consistent application of that
221
- system; it is up to the author/donor to decide if he or she is willing
222
- to distribute software through any other system and a licensee cannot
223
- impose that choice.
224
-
225
- This section is intended to make thoroughly clear what is believed to
226
- be a consequence of the rest of this License.
227
-
228
- 8. If the distribution and/or use of the Program is restricted in
229
- certain countries either by patents or by copyrighted interfaces, the
230
- original copyright holder who places the Program under this License
231
- may add an explicit geographical distribution limitation excluding
232
- those countries, so that distribution is permitted only in or among
233
- countries not thus excluded. In such case, this License incorporates
234
- the limitation as if written in the body of this License.
235
-
236
- 9. The Free Software Foundation may publish revised and/or new versions
237
- of the General Public License from time to time. Such new versions will
238
- be similar in spirit to the present version, but may differ in detail to
239
- address new problems or concerns.
240
-
241
- Each version is given a distinguishing version number. If the Program
242
- specifies a version number of this License which applies to it and "any
243
- later version", you have the option of following the terms and conditions
244
- either of that version or of any later version published by the Free
245
- Software Foundation. If the Program does not specify a version number of
246
- this License, you may choose any version ever published by the Free Software
247
- Foundation.
248
-
249
- 10. If you wish to incorporate parts of the Program into other free
250
- programs whose distribution conditions are different, write to the author
251
- to ask for permission. For software which is copyrighted by the Free
252
- Software Foundation, write to the Free Software Foundation; we sometimes
253
- make exceptions for this. Our decision will be guided by the two goals
254
- of preserving the free status of all derivatives of our free software and
255
- of promoting the sharing and reuse of software generally.
256
-
257
- NO WARRANTY
258
-
259
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
260
- FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
261
- OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
262
- PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
263
- OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
264
- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
265
- TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
266
- PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
267
- REPAIR OR CORRECTION.
268
-
269
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
270
- WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
271
- REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
272
- INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
273
- OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
274
- TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
275
- YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
276
- PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
277
- POSSIBILITY OF SUCH DAMAGES.
278
-
279
- END OF TERMS AND CONDITIONS
280
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cli/readme.md CHANGED
@@ -10,7 +10,7 @@ Please use and provide feedback!
10
 
11
  ## System Requirements
12
 
13
- * PHP >= 5.3
14
  * wp-cli >= 0.23.0
15
  * BuddyPress trunk (development version).
16
 
@@ -22,6 +22,11 @@ Please use and provide feedback!
22
 
23
  ## Changelog
24
 
 
 
 
 
 
25
  ### 1.7.0
26
 
27
  * Updated `bp` and `bp xprofile` commands PHPDoc info
10
 
11
  ## System Requirements
12
 
13
+ * PHP >= 5.4
14
  * wp-cli >= 0.23.0
15
  * BuddyPress trunk (development version).
16
 
22
 
23
  ## Changelog
24
 
25
+ ### 1.8.0
26
+
27
+ * `wp-cli-buddypress` requires PHP 5.4
28
+ * `bp notification` commands introduced
29
+
30
  ### 1.7.0
31
 
32
  * Updated `bp` and `bp xprofile` commands PHPDoc info
cli/wp-cli-bp.php CHANGED
@@ -26,6 +26,7 @@ WP_CLI::add_hook( 'before_wp_load', function() {
26
  require_once( __DIR__ . '/components/xprofile-data.php' );
27
  require_once( __DIR__ . '/components/tool.php' );
28
  require_once( __DIR__ . '/components/message.php' );
 
29
  require_once( __DIR__ . '/components/email.php' );
30
 
31
  WP_CLI::add_command( 'bp', __NAMESPACE__ . '\\Command\\Buddypress', array(
@@ -44,6 +45,18 @@ WP_CLI::add_hook( 'before_wp_load', function() {
44
  },
45
  ) );
46
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  WP_CLI::add_command( 'bp email', __NAMESPACE__ . '\\Command\\Email', array(
48
  'before_invoke' => function() {
49
  if ( ! class_exists( 'Buddypress' ) ) {
26
  require_once( __DIR__ . '/components/xprofile-data.php' );
27
  require_once( __DIR__ . '/components/tool.php' );
28
  require_once( __DIR__ . '/components/message.php' );
29
+ require_once( __DIR__ . '/components/notification.php' );
30
  require_once( __DIR__ . '/components/email.php' );
31
 
32
  WP_CLI::add_command( 'bp', __NAMESPACE__ . '\\Command\\Buddypress', array(
45
  },
46
  ) );
47
 
48
+ WP_CLI::add_command( 'bp notification', __NAMESPACE__ . '\\Command\\Notification', array(
49
+ 'before_invoke' => function() {
50
+ if ( ! class_exists( 'Buddypress' ) ) {
51
+ WP_CLI::error( 'The BuddyPress plugin is not active.' );
52
+ }
53
+
54
+ if ( ! bp_is_active( 'notifications' ) ) {
55
+ WP_CLI::error( 'The Notification component is not active.' );
56
+ }
57
+ },
58
+ ) );
59
+
60
  WP_CLI::add_command( 'bp email', __NAMESPACE__ . '\\Command\\Email', array(
61
  'before_invoke' => function() {
62
  if ( ! class_exists( 'Buddypress' ) ) {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: user profiles, activity streams, messaging, friends, user groups, notifica
4
  Requires at least: 4.6
5
  Tested up to: 4.9.8
6
  Requires PHP: 5.3
7
- Stable tag: 3.0.0
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
4
  Requires at least: 4.6
5
  Tested up to: 4.9.8
6
  Requires PHP: 5.3
7
+ Stable tag: 4.0.0
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10