Changeset 5060 for trunk/includes/topics/functions.php
- Timestamp:
- 08/02/2013 07:20:49 AM (13 years ago)
- File:
-
- 1 edited
-
trunk/includes/topics/functions.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/topics/functions.php
r5055 r5060 276 276 $topic_status = bbp_get_pending_status_id(); 277 277 278 // Default to published 278 // Check a whitelist of possible topic status ID's 279 } elseif ( in_array( $_POST['bbp_topic_status'], array( bbp_get_public_status_id(), bbp_get_closed_status_id(), bbp_get_spam_status_id(), bbp_get_pending_status_id(), bbp_get_trash_status_id(), bbp_get_orphan_status_id() ) ) ) { 280 $topic_status = $_POST['bbp_topic_status']; 281 282 // Default to published if nothing else 279 283 } else { 280 284 $topic_status = bbp_get_public_status_id(); … … 608 612 } 609 613 614 // Check a whitelist of possible topic status ID's 615 } elseif ( in_array( $_POST['bbp_topic_status'], array( bbp_get_public_status_id(), bbp_get_closed_status_id(), bbp_get_spam_status_id(), bbp_get_pending_status_id(), bbp_get_trash_status_id(), bbp_get_orphan_status_id() ) ) ) { 616 $topic_status = $_POST['bbp_topic_status']; 617 610 618 // Use existing post_status 611 619 } else { … … 1944 1952 } 1945 1953 1954 /** Helpers *******************************************************************/ 1955 1956 /** 1957 * Return an associative array of available topic statuses 1958 * 1959 * @since bbPress (r5059) 1960 * 1961 * @return array 1962 */ 1963 function bbp_get_topic_statuses() { 1964 return apply_filters( 'bbp_get_topic_statuses', array( 1965 bbp_get_public_status_id() => _x( 'Open', 'Open the topic', 'bbpress' ), 1966 bbp_get_closed_status_id() => _x( 'Closed', 'Close the topic', 'bbpress' ), 1967 bbp_get_spam_status_id() => _x( 'Spam', 'Spam the topic', 'bbpress' ), 1968 bbp_get_trash_status_id() => _x( 'Trash', 'Trash the topic', 'bbpress' ), 1969 bbp_get_pending_status_id() => _x( 'Pending', 'Mark topic as pending', 'bbpress' ), 1970 ) ); 1971 } 1972 1973 /** 1974 * Return an associative array of topic sticky types 1975 * 1976 * @since bbPress (r5059) 1977 * 1978 * @return array 1979 */ 1980 function bbp_get_topic_types() { 1981 return apply_filters( 'bbp_get_topic_types', array( 1982 'unstick' => _x( 'Normal', 'Unstick a topic', 'bbpress' ), 1983 'stick' => _x( 'Sticky', 'Make topic sticky', 'bbpress' ), 1984 'super' => _x( 'Super Sticky', 'Make topic super sticky', 'bbpress' ) 1985 ) ); 1986 } 1987 1946 1988 /** Stickies ******************************************************************/ 1947 1989
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)