Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/24/2015 11:55:02 PM (9 years ago)
Author:
tw2113
Message:

Standardizing our @since tags for the Notifications component.

See #6576

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-notifications/bp-notifications-template.php

    r10079 r10138  
    11<?php
    2 
    32/**
    43 * BuddyPress Notifications Template Functions.
     
    87 */
    98
    10 // Exit if accessed directly
     9// Exit if accessed directly.
    1110defined( 'ABSPATH' ) || exit;
    1211
     
    1413 * Output the notifications component slug.
    1514 *
    16  * @since BuddyPress (1.9.0)
     15 * @since 1.9.0
    1716 */
    1817function bp_notifications_slug() {
     
    2221     * Return the notifications component slug.
    2322     *
    24      * @since BuddyPress (1.9.0)
     23     * @since 1.9.0
    2524     *
    2625     * @return string Slug of the Notifications component.
     
    3130         * Filters the notifications component slug.
    3231         *
    33          * @since BuddyPress (1.9.0)
     32         * @since 1.9.0
    3433         *
    3534         * @param string $slug Notifications component slug.
     
    4140 * Output the notifications permalink.
    4241 *
    43  * @since BuddyPress (1.9.0)
     42 * @since 1.9.0
    4443 */
    4544function bp_notifications_permalink() {
     
    4948     * Return the notifications permalink.
    5049     *
    51      * @since BuddyPress (1.9.0)
     50     * @since 1.9.0
    5251     *
    5352     * @return string Notifications permalink.
     
    5958         * Filters the notifications permalink.
    6059         *
    61          * @since BuddyPress (1.9.0)
     60         * @since 1.9.0
    6261         *
    6362         * @param string $retval Permalink for the notifications.
     
    6968 * Output the unread notifications permalink.
    7069 *
    71  * @since BuddyPress (1.9.0)
     70 * @since 1.9.0
    7271 */
    7372function bp_notifications_unread_permalink() {
     
    7776     * Return the unread notifications permalink.
    7877     *
    79      * @since BuddyPress (1.9.0)
     78     * @since 1.9.0
    8079     *
    8180     * @return string Unread notifications permalink.
     
    8786         * Filters the unread notifications permalink.
    8887         *
    89          * @since BuddyPress (1.9.0)
     88         * @since 1.9.0
    9089         *
    9190         * @param string $retval Permalink for the unread notifications.
     
    9796 * Output the read notifications permalink.
    9897 *
    99  * @since BuddyPress (1.9.0)
     98 * @since 1.9.0
    10099 */
    101100function bp_notifications_read_permalink() {
     
    105104     * Return the read notifications permalink.
    106105     *
    107      * @since BuddyPress (1.9.0)
     106     * @since 1.9.0
    108107     *
    109108     * @return string Read notifications permalink.
     
    115114         * Filters the read notifications permalink.
    116115         *
    117          * @since BuddyPress (1.9.0)
     116         * @since 1.9.0
    118117         *
    119118         * @param string $retval Permalink for the read notifications.
     
    129128 * Responsible for loading a group of notifications into a loop for display.
    130129 *
    131  * @since BuddyPress (1.9.0)
     130 * @since 1.9.0
    132131 */
    133132class BP_Notifications_Template {
     
    136135     * The loop iterator.
    137136     *
    138      * @since BuddyPress (1.9.0)
     137     * @since 1.9.0
    139138     * @access public
    140139     * @var int
     
    145144     * The number of notifications returned by the paged query.
    146145     *
    147      * @since BuddyPress (1.9.0)
     146     * @since 1.9.0
    148147     * @access public
    149148     * @var int
     
    154153     * Total number of notifications matching the query.
    155154     *
    156      * @since BuddyPress (1.9.0)
     155     * @since 1.9.0
    157156     * @access public
    158157     * @var int
     
    163162     * Array of notifications located by the query.
    164163     *
    165      * @since BuddyPress (1.9.0)
     164     * @since 1.9.0
    166165     * @access public
    167166     * @var array
     
    172171     * The notification object currently being iterated on.
    173172     *
    174      * @since BuddyPress (1.9.0)
     173     * @since 1.9.0
    175174     * @access public
    176175     * @var object
     
    181180     * A flag for whether the loop is currently being iterated.
    182181     *
    183      * @since BuddyPress (1.9.0)
     182     * @since 1.9.0
    184183     * @access public
    185184     * @var bool
     
    190189     * The ID of the user to whom the displayed notifications belong.
    191190     *
    192      * @since BuddyPress (1.9.0)
     191     * @since 1.9.0
    193192     * @access public
    194193     * @var int
     
    199198     * The page number being requested.
    200199     *
    201      * @since BuddyPress (1.9.0)
     200     * @since 1.9.0
    202201     * @access public
    203202     * @var int
     
    208207     * The $_GET argument used in URLs for determining pagination.
    209208     *
    210      * @since BuddyPress (1.9.0)
     209     * @since 1.9.0
    211210     * @access public
    212211     * @var int
     
    217216     * The number of items to display per page of results.
    218217     *
    219      * @since BuddyPress (1.9.0)
     218     * @since 1.9.0
    220219     * @access public
    221220     * @var int
     
    226225     * An HTML string containing pagination links.
    227226     *
    228      * @since BuddyPress (1.9.0)
     227     * @since 1.9.0
    229228     * @access public
    230229     * @var string
     
    235234     * A string to match against.
    236235     *
    237      * @since BuddyPress (1.9.0)
     236     * @since 1.9.0
    238237     * @access public
    239238     * @var string
     
    244243     * A database column to order the results by.
    245244     *
    246      * @since BuddyPress (1.9.0)
     245     * @since 1.9.0
    247246     * @access public
    248247     * @var string
     
    253252     * The direction to sort the results (ASC or DESC).
    254253     *
    255      * @since BuddyPress (1.9.0)
     254     * @since 1.9.0
    256255     * @access public
    257256     * @var string
     
    262261     * Array of variables used in this notification query.
    263262     *
    264      * @since BuddyPress (2.2.2)
     263     * @since 2.2.2
    265264     * @var array
    266265     */
     
    272271     * @see bp_has_notifications() For information on the array format.
    273272     *
    274      * @since BuddyPress (1.9.0)
     273     * @since 1.9.0
    275274     *
    276275     * @param array $args {
     
    378377     * Whether there are notifications available in the loop.
    379378     *
    380      * @since BuddyPress (1.9.0)
     379     * @since 1.9.0
    381380     *
    382381     * @see bp_has_notifications()
     
    395394     * Set up the next notification and iterate index.
    396395     *
    397      * @since BuddyPress (1.9.0)
     396     * @since 1.9.0
    398397     *
    399398     * @return object The next notification to iterate over.
     
    411410     * Rewind the blogs and reset blog index.
    412411     *
    413      * @since BuddyPress (1.9.0)
     412     * @since 1.9.0
    414413     */
    415414    public function rewind_notifications() {
     
    429428     *     while ( bp_notifications() ) { ...
    430429     *
    431      * @since BuddyPress (1.9.0)
     430     * @since 1.9.0
    432431     *
    433432     * @see bp_notifications()
     
    446445             * Fires right before the rewinding of notification posts.
    447446             *
    448              * @since BuddyPress (1.9.0)
     447             * @since 1.9.0
    449448             */
    450449            do_action( 'notifications_loop_end');
     
    464463     * that iteration make reference to the current notification.
    465464     *
    466      * @since BuddyPress (1.9.0)
     465     * @since 1.9.0
    467466     *
    468467     * @see bp_the_notification()
     
    478477             * Fires if the current notification item is the first in the notification loop.
    479478             *
    480              * @since BuddyPress (1.9.0)
     479             * @since 1.9.0
    481480             */
    482481            do_action( 'notifications_loop_start' );
     
    494493 * templates and template functions to display a list of notifications.
    495494 *
    496  * @since BuddyPress (1.9.0)
     495 * @since 1.9.0
    497496 *
    498497 * @param array|string $args {
     
    561560     * Filters whether or not the user has notifications to display.
    562561     *
    563      * @since BuddyPress (1.9.0)
     562     * @since 1.9.0
    564563     *
    565564     * @param bool                      $value      Whether or not there are notifications to display.
     
    572571 * Get the notifications returned by the template loop.
    573572 *
    574  * @since BuddyPress (1.9.0)
     573 * @since 1.9.0
    575574 *
    576575 * @return array List of notifications.
     
    583582 * Get the current notification object in the loop.
    584583 *
    585  * @since BuddyPress (1.9.0)
     584 * @since 1.9.0
    586585 *
    587586 * @return object The current notification within the loop.
     
    596595 * Output the ID of the notification currently being iterated on.
    597596 *
    598  * @since BuddyPress (1.9.0)
     597 * @since 1.9.0
    599598 */
    600599function bp_the_notification_id() {
     
    604603     * Return the ID of the notification currently being iterated on.
    605604     *
    606      * @since BuddyPress (1.9.0)
     605     * @since 1.9.0
    607606     *
    608607     * @return int ID of the current notification.
     
    613612         * Filters the ID of the notification currently being iterated on.
    614613         *
    615          * @since BuddyPress (1.9.0)
     614         * @since 1.9.0
    616615         *
    617616         * @param int $id ID of the notification being iterated on.
     
    623622 * Output the associated item ID of the notification currently being iterated on.
    624623 *
    625  * @since BuddyPress (1.9.0)
     624 * @since 1.9.0
    626625 */
    627626function bp_the_notification_item_id() {
     
    631630     * Return the associated item ID of the notification currently being iterated on.
    632631     *
    633      * @since BuddyPress (1.9.0)
     632     * @since 1.9.0
    634633     *
    635634     * @return int ID of the item associated with the current notification.
     
    640639         * Filters the associated item ID of the notification currently being iterated on.
    641640         *
    642          * @since BuddyPress (1.9.0)
     641         * @since 1.9.0
    643642         *
    644643         * @param int $item_id ID of the associated item.
     
    650649 * Output the secondary associated item ID of the notification currently being iterated on.
    651650 *
    652  * @since BuddyPress (1.9.0)
     651 * @since 1.9.0
    653652 */
    654653function bp_the_notification_secondary_item_id() {
     
    658657     * Return the secondary associated item ID of the notification currently being iterated on.
    659658     *
    660      * @since BuddyPress (1.9.0)
     659     * @since 1.9.0
    661660     *
    662661     * @return int ID of the secondary item associated with the current notification.
     
    667666         * Filters the secondary associated item ID of the notification currently being iterated on.
    668667         *
    669          * @since BuddyPress (1.9.0)
     668         * @since 1.9.0
    670669         *
    671670         * @param int $secondary_item_id ID of the secondary associated item.
     
    677676 * Output the name of the component associated with the notification currently being iterated on.
    678677 *
    679  * @since BuddyPress (1.9.0)
     678 * @since 1.9.0
    680679 */
    681680function bp_the_notification_component_name() {
     
    685684     * Return the name of the component associated with the notification currently being iterated on.
    686685     *
    687      * @since BuddyPress (1.9.0)
     686     * @since 1.9.0
    688687     *
    689688     * @return int Name of the component associated with the current notification.
     
    694693         * Filters the name of the component associated with the notification currently being iterated on.
    695694         *
    696          * @since BuddyPress (1.9.0)
     695         * @since 1.9.0
    697696         *
    698697         * @param int $component_name Name of the component associated with the current notification.
     
    704703 * Output the name of the action associated with the notification currently being iterated on.
    705704 *
    706  * @since BuddyPress (1.9.0)
     705 * @since 1.9.0
    707706 */
    708707function bp_the_notification_component_action() {
     
    712711     * Return the name of the action associated with the notification currently being iterated on.
    713712     *
    714      * @since BuddyPress (1.9.0)
     713     * @since 1.9.0
    715714     *
    716715     * @return int Name of the action associated with the current notification.
     
    721720         * Filters the name of the action associated with the notification currently being iterated on.
    722721         *
    723          * @since BuddyPress (1.9.0)
     722         * @since 1.9.0
    724723         *
    725724         * @param int $component_action Name of the action associated with the current notification.
     
    731730 * Output the timestamp of the current notification.
    732731 *
    733  * @since BuddyPress (1.9.0)
     732 * @since 1.9.0
    734733 */
    735734function bp_the_notification_date_notified() {
     
    739738     * Return the timestamp of the current notification.
    740739     *
    741      * @since BuddyPress (1.9.0)
     740     * @since 1.9.0
    742741     *
    743742     * @return string Timestamp of the current notification.
     
    748747         * Filters the timestamp of the current notification.
    749748         *
    750          * @since BuddyPress (1.9.0)
     749         * @since 1.9.0
    751750         *
    752751         * @param string $date_notified Timestamp of the current notification.
     
    758757 * Output the timestamp of the current notification.
    759758 *
    760  * @since BuddyPress (1.9.0)
     759 * @since 1.9.0
    761760 */
    762761function bp_the_notification_time_since() {
     
    766765     * Return the timestamp of the current notification.
    767766     *
    768      * @since BuddyPress (1.9.0)
     767     * @since 1.9.0
    769768     *
    770769     * @return string Timestamp of the current notification.
     
    787786         * Filters the time since value of the current notification.
    788787         *
    789          * @since BuddyPress (1.9.0)
     788         * @since 1.9.0
    790789         *
    791790         * @param string $retval Time since value for current notification.
     
    797796 * Output full-text description for a specific notification.
    798797 *
    799  * @since BuddyPress (1.9.0)
     798 * @since 1.9.0
    800799 */
    801800function bp_the_notification_description() {
     
    806805     * Get full-text description for a specific notification.
    807806     *
    808      * @since BuddyPress (1.9.0)
     807     * @since 1.9.0
    809808     *
    810809     * @return string
     
    832831         * Filters the full-text description for a specific notification.
    833832         *
    834          * @since BuddyPress (1.9.0)
    835          * @since BuddyPress (2.3.0) Added the `$notification` parameter.
     833         * @since 1.9.0
     834         * @since 2.3.0 Added the `$notification` parameter.
    836835         *
    837836         * @param string $description  Full-text description for a specific notification.
     
    844843 * Output the mark read link for the current notification.
    845844 *
    846  * @since BuddyPress (1.9.0)
     845 * @since 1.9.0
    847846 *
    848847 * @uses bp_get_the_notification_mark_read_link()
     
    854853     * Return the mark read link for the current notification.
    855854     *
    856      * @since BuddyPress (1.9.0)
     855     * @since 1.9.0
    857856     */
    858857    function bp_get_the_notification_mark_read_link() {
     
    868867         * Filters the mark read link for the current notification.
    869868         *
    870          * @since BuddyPress (1.9.0)
     869         * @since 1.9.0
    871870         *
    872871         * @param string $retval HTML for the mark read link for the current notification.
     
    880879 * Since this function directly outputs a URL, it is escaped.
    881880 *
    882  * @since BuddyPress (2.1.0)
     881 * @since 2.1.0
    883882 *
    884883 * @uses bp_get_the_notification_mark_read_url()
     
    890889     * Return the URL used for marking a single notification as read.
    891890     *
    892      * @since BuddyPress (2.1.0)
     891     * @since 2.1.0
    893892     */
    894893    function bp_get_the_notification_mark_read_url() {
     
    912911         * Filters the URL used for marking a single notification as read.
    913912         *
    914          * @since BuddyPress (2.1.0)
     913         * @since 2.1.0
    915914         *
    916915         * @param string $url URL to use for marking the single notification as read.
     
    922921 * Output the mark unread link for the current notification.
    923922 *
    924  * @since BuddyPress (1.9.0)
     923 * @since 1.9.0
    925924 *
    926925 * @uses bp_get_the_notification_mark_unread_link()
     
    932931     * Return the mark unread link for the current notification.
    933932     *
    934      * @since BuddyPress (1.9.0)
     933     * @since 1.9.0
    935934     */
    936935    function bp_get_the_notification_mark_unread_link() {
     
    946945         * Filters the link used for marking a single notification as unread.
    947946         *
    948          * @since BuddyPress (1.9.0)
     947         * @since 1.9.0
    949948         *
    950949         * @param string $retval HTML for the mark unread link for the current notification.
     
    958957 * Since this function directly outputs a URL, it is escaped.
    959958 *
    960  * @since BuddyPress (2.1.0)
     959 * @since 2.1.0
    961960 *
    962961 * @uses bp_get_the_notification_mark_unread_url()
     
    968967     * Return the URL used for marking a single notification as unread.
    969968     *
    970      * @since BuddyPress (2.1.0)
     969     * @since 2.1.0
    971970     */
    972971    function bp_get_the_notification_mark_unread_url() {
     
    990989         * Filters the URL used for marking a single notification as unread.
    991990         *
    992          * @since BuddyPress (2.1.0)
     991         * @since 2.1.0
    993992         *
    994993         * @param string $url URL to use for marking the single notification as unread.
     
    1000999 * Output the mark link for the current notification.
    10011000 *
    1002  * @since BuddyPress (1.9.0)
     1001 * @since 1.9.0
    10031002 *
    10041003 * @uses bp_get_the_notification_mark_unread_link()
     
    10101009     * Return the mark link for the current notification.
    10111010     *
    1012      * @since BuddyPress (1.9.0)
     1011     * @since 1.9.0
    10131012     */
    10141013    function bp_get_the_notification_mark_link() {
     
    10231022         * Filters the mark link for the current notification.
    10241023         *
    1025          * @since BuddyPress (1.9.0)
     1024         * @since 1.9.0
    10261025         *
    10271026         * @param string $retval The mark link for the current notification.
     
    10331032 * Output the delete link for the current notification.
    10341033 *
    1035  * @since BuddyPress (1.9.0)
     1034 * @since 1.9.0
    10361035 *
    10371036 * @uses bp_get_the_notification_delete_link()
     
    10431042     * Return the delete link for the current notification.
    10441043     *
    1045      * @since BuddyPress (1.9.0)
     1044     * @since 1.9.0
    10461045     */
    10471046    function bp_get_the_notification_delete_link() {
     
    10571056         * Filters the delete link for the current notification.
    10581057         *
    1059          * @since BuddyPress (1.9.0)
     1058         * @since 1.9.0
    10601059         *
    10611060         * @param string $retval HTML for the delete link for the current notification.
     
    10691068 * Since this function directly outputs a URL, it is escaped.
    10701069 *
    1071  * @since BuddyPress (2.1.0)
     1070 * @since 2.1.0
    10721071 *
    10731072 * @uses esc_url()
     
    10801079     * Return the URL used for deleting a single notification.
    10811080     *
    1082      * @since BuddyPress (2.1.0)
     1081     * @since 2.1.0
    10831082     *
    10841083     * @return string
     
    11111110         * Filters the URL used for deleting a single notification.
    11121111         *
    1113          * @since BuddyPress (2.1.0)
     1112         * @since 2.1.0
    11141113         *
    11151114         * @param string $url URL used for deleting a single notification.
     
    11221121 *
    11231122 * @param array|string $args Array of arguments.
    1124  * @since BuddyPress (1.9.0)
     1123 * @since 1.9.0
    11251124 */
    11261125function bp_the_notification_action_links( $args = '' ) {
     
    11301129     * Return the action links for the current notification.
    11311130     *
    1132      * @since BuddyPress (1.9.0)
     1131     * @since 1.9.0
    11331132     *
    11341133     * @param array|string $args {
     
    11601159         * Filters the action links for the current notification.
    11611160         *
    1162          * @since BuddyPress (1.9.0)
     1161         * @since 1.9.0
    11631162         *
    11641163         * @param string $retval HTML links for actions to take on single notifications.
     
    11701169 * Output the pagination count for the current notification loop.
    11711170 *
    1172  * @since BuddyPress (1.9.0)
     1171 * @since 1.9.0
    11731172 */
    11741173function bp_notifications_pagination_count() {
     
    11781177     * Return the pagination count for the current notification loop.
    11791178     *
    1180      * @since BuddyPress (1.9.0)
     1179     * @since 1.9.0
    11811180     *
    11821181     * @return string HTML for the pagination count.
     
    11981197         * Filters the pagination count for the current notification loop.
    11991198         *
    1200          * @since BuddyPress (1.9.0)
     1199         * @since 1.9.0
    12011200         *
    12021201         * @param string $pag HTML for the pagination count.
     
    12081207 * Output the pagination links for the current notification loop.
    12091208 *
    1210  * @since BuddyPress (1.9.0)
     1209 * @since 1.9.0
    12111210 */
    12121211function bp_notifications_pagination_links() {
     
    12161215     * Return the pagination links for the current notification loop.
    12171216     *
    1218      * @since BuddyPress (1.9.0)
     1217     * @since 1.9.0
    12191218     *
    12201219     * @return string HTML for the pagination links.
     
    12251224         * Filters the pagination links for the current notification loop.
    12261225         *
    1227          * @since BuddyPress (1.9.0)
     1226         * @since 1.9.0
    12281227         *
    12291228         * @param string $pag_links HTML for the pagination links.
     
    12371236 * Output the form for changing the sort order of notifications.
    12381237 *
    1239  * @since BuddyPress (1.9.0)
     1238 * @since 1.9.0
    12401239 */
    12411240function bp_notifications_sort_order_form() {
     
    12711270 * Output the dropdown for bulk management of notifications.
    12721271 *
    1273  * @since BuddyPress (2.2.0)
     1272 * @since 2.2.0
    12741273 */
    12751274function bp_notifications_bulk_management_dropdown() {
Note: See TracChangeset for help on using the changeset viewer.