Changeset 7942 for trunk/bp-blogs/bp-blogs-template.php
- Timestamp:
- 02/20/2014 09:02:33 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-blogs/bp-blogs-template.php
r7919 r7942 1150 1150 1151 1151 /** 1152 * Output the Create a Site button. 1153 * 1154 * @since BuddyPress (2.0.0) 1155 */ 1156 function bp_blog_create_button() { 1157 echo bp_get_blog_create_button(); 1158 } 1159 /** 1160 * Get the Create a Site button. 1161 * 1162 * @since BuddyPress (2.0.0) 1163 * 1164 * @return string 1165 */ 1166 function bp_get_blog_create_button() { 1167 if ( ! is_user_logged_in() ) { 1168 return false; 1169 } 1170 1171 if ( ! bp_blog_signup_enabled() ) { 1172 return false; 1173 } 1174 1175 $button_args = array( 1176 'id' => 'create_blog', 1177 'component' => 'blogs', 1178 'link_text' => __( 'Create a Site', 'buddypress' ), 1179 'link_title' => __( 'Create a Site', 'buddypress' ), 1180 'link_class' => 'button blog-create bp-title-button', 1181 'link_href' => trailingslashit( bp_get_root_domain() ) . trailingslashit( bp_get_blogs_root_slug() ) . trailingslashit( 'create' ), 1182 'wrapper' => false, 1183 ); 1184 1185 return bp_get_button( $button_args ); 1186 } 1187 1188 /** 1152 1189 * Output button for visiting a blog in a loop. 1153 1190 *
Note: See TracChangeset
for help on using the changeset viewer.