Changeset 6310 for trunk/bp-core/bp-core-classes.php
- Timestamp:
- 09/06/2012 04:24:22 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-classes.php
r6259 r6310 877 877 */ 878 878 class BP_Button { 879 // Button properties 879 880 /** Button properties *****************************************************/ 880 881 881 882 /** … … 884 885 * @var integer 885 886 */ 886 var $id;887 private $id = ''; 887 888 888 889 /** … … 891 892 * @var string 892 893 */ 893 var $component;894 private $component = 'core'; 894 895 895 896 /** … … 898 899 * @var boolean 899 900 */ 900 var $must_be_logged_in; 901 902 /** 903 * True or false if the button should not be displayed while viewing your own profile. 901 private $must_be_logged_in = true; 902 903 /** 904 * True or false if the button should not be displayed while viewing your 905 * own profile. 904 906 * 905 907 * @var boolean 906 908 */ 907 var $block_self; 908 909 910 // Wrapper 909 private $block_self = true; 910 911 /** Wrapper ***************************************************************/ 911 912 912 913 /** … … 916 917 * @var mixed div|span|p|li, or false for no wrapper 917 918 */ 918 var $wrapper;919 private $wrapper = 'div'; 919 920 920 921 /** … … 923 924 * @var string 924 925 */ 925 var $wrapper_class;926 private $wrapper_class = ''; 926 927 927 928 /** … … 930 931 * @var string 931 932 */ 932 var $wrapper_id; 933 934 935 // Button 933 private $wrapper_id = ''; 934 935 /** Button ****************************************************************/ 936 936 937 937 /** … … 940 940 * @var string 941 941 */ 942 var $link_href;942 private $link_href = ''; 943 943 944 944 /** … … 947 947 * @var string 948 948 */ 949 var $link_class;949 private $link_class = ''; 950 950 951 951 /** … … 954 954 * @var string 955 955 */ 956 var $link_id;956 private $link_id = ''; 957 957 958 958 /** … … 961 961 * @var string 962 962 */ 963 var $link_rel;963 private $link_rel = ''; 964 964 965 965 /** … … 968 968 * @var string 969 969 */ 970 var $link_title;970 private $link_title = ''; 971 971 972 972 /** … … 975 975 * @var string 976 976 */ 977 var $link_text; 978 979 980 // HTML result 981 982 var $contents; 983 984 /** 985 * bp_button() 986 * 977 private $link_text = ''; 978 979 /** HTML result ***********************************************************/ 980 981 public $contents = ''; 982 983 /** 987 984 * Builds the button based on passed parameters: 988 985 * … … 1003 1000 * @return bool False if not allowed 1004 1001 */ 1005 function __construct( $args = '' ) { 1006 1007 // Default arguments 1008 $defaults = array( 1009 'id' => '', 1010 'component' => 'core', 1011 'must_be_logged_in' => true, 1012 'block_self' => true, 1013 1014 'wrapper' => 'div', 1015 'wrapper_id' => '', 1016 'wrapper_class' => '', 1017 1018 'link_href' => '', 1019 'link_title' => '', 1020 'link_id' => '', 1021 'link_class' => '', 1022 'link_rel' => '', 1023 'link_text' => '', 1024 ); 1025 1026 $r = wp_parse_args( $args, $defaults ); 1002 public function __construct( $args = '' ) { 1003 1004 $r = wp_parse_args( $args, get_class_vars( __CLASS__ ) ); 1027 1005 extract( $r, EXTR_SKIP ); 1028 1006 … … 1101 1079 1102 1080 /** 1103 * contents()1104 *1105 1081 * Return contents of button 1106 1082 * 1107 1083 * @return string 1108 1084 */ 1109 function contents() {1085 public function contents() { 1110 1086 return $this->contents; 1111 1087 } 1112 1088 1113 1089 /** 1114 * display()1115 *1116 1090 * Output contents of button 1117 1091 */ 1118 function display() {1092 public function display() { 1119 1093 if ( !empty( $this->contents ) ) 1120 1094 echo $this->contents;
Note: See TracChangeset
for help on using the changeset viewer.