Changeset 7555
- Timestamp:
- 11/10/2013 02:04:14 AM (12 years ago)
- Location:
- trunk/bp-blogs
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-blogs/bp-blogs-actions.php
r7407 r7555 14 14 * Redirect to a random blog in the multisite network. 15 15 * 16 * @since BuddyPress (1.0 )16 * @since BuddyPress (1.0.0) 17 17 */ 18 18 function bp_blogs_redirect_to_random_blog() { -
trunk/bp-blogs/bp-blogs-activity.php
r7407 r7555 14 14 * Register activity actions for the blogs component. 15 15 * 16 * @since BuddyPress (1.0 )16 * @since BuddyPress (1.0.0) 17 17 * 18 18 * @global object $bp The BuddyPress global settings object. … … 42 42 * Record blog-related activity to the activity stream. 43 43 * 44 * @since BuddyPress (1.0 )44 * @since BuddyPress (1.0.0) 45 45 * 46 46 * @see bp_activity_add() for description of parameters. … … 49 49 * @param array $args { 50 50 * See {@link bp_activity_add()} for complete description of arguments. 51 * The arguments listed here have different default values from bp_activity_add(). 51 * The arguments listed here have different default values from 52 * bp_activity_add(). 52 53 * @type string $component Default: 'blogs'. 53 54 * } … … 102 103 * Delete a blog-related activity stream item. 103 104 * 104 * @since BuddyPress (1.0 )105 * @since BuddyPress (1.0.0) 105 106 * 106 107 * @see bp_activity_delete() for description of parameters. … … 109 110 * @param array $args { 110 111 * See {@link bp_activity_delete()} for complete description of arguments. 111 * The arguments listed here have different default values from bp_activity_add(). 112 * The arguments listed here have different default values from 113 * bp_activity_add(). 112 114 * @type string $component Default: 'blogs'. 113 115 * } -
trunk/bp-blogs/bp-blogs-buddybar.php
r7407 r7555 14 14 * Add a Sites menu to the BuddyBar. 15 15 * 16 * @since BuddyPress (1.0 )16 * @since BuddyPress (1.0.0) 17 17 * 18 18 * @global object $bp The BuddyPress global settings object. 19 * 19 20 * @return bool|null Returns false on failure. Otherwise echoes the menu item. 20 21 */ 21 22 22 function bp_adminbar_blogs_menu() { 23 23 global $bp; -
trunk/bp-blogs/bp-blogs-cache.php
r7407 r7555 17 17 * Clear the blog object cache. 18 18 * 19 * @since BuddyPress (1.0 )19 * @since BuddyPress (1.0.0) 20 20 * 21 21 * @param int $blog_id ID of the current blog. … … 30 30 * Clear cache when a new blog is created. 31 31 * 32 * @since BuddyPress (1.0 )32 * @since BuddyPress (1.0.0) 33 33 * 34 * @param BP_Blogs_Blog $recorded_blog_obj The recorded blog, passed by 'bp_blogs_new_blog'. 34 * @param BP_Blogs_Blog $recorded_blog_obj The recorded blog, passed by 35 * 'bp_blogs_new_blog'. 35 36 */ 36 37 function bp_blogs_format_clear_blog_cache( $recorded_blog_obj ) { -
trunk/bp-blogs/bp-blogs-classes.php
r7407 r7555 17 17 * network and a specific user on that blog. 18 18 * 19 * @since BuddyPress (1.0 )19 * @since BuddyPress (1.0.0) 20 20 */ 21 21 class BP_Blogs_Blog { … … 215 215 * Get all of a user's blogs, as tracked by BuddyPress. 216 216 * 217 * Note that this is different from the WordPress function {@link get_blogs_of_user()};218 * the current method returns only those blogs that have been recorded219 * b y BuddyPress, while the WP function does a true query of a user's220 * blog capabilities.217 * Note that this is different from the WordPress function 218 * {@link get_blogs_of_user()}; the current method returns only those 219 * blogs that have been recorded by BuddyPress, while the WP function 220 * does a true query of a user's blog capabilities. 221 221 * 222 222 * @param int $user_id Optional. ID of the user whose blogs are being -
trunk/bp-blogs/bp-blogs-filters.php
r7409 r7555 6 6 * @package BuddyPress 7 7 * @subpackage Blogs 8 * @since BuddyPress (1.6 )8 * @since BuddyPress (1.6.0) 9 9 */ 10 10 … … 23 23 24 24 /** 25 * Ensure that the 'Create a new site' link at wp-admin/my-sites.php points to the BP blog signup 25 * Ensure that the 'Create a new site' link at wp-admin/my-sites.php points to the BP blog signup. 26 26 * 27 * @since BuddyPress (1.6 )27 * @since BuddyPress (1.6.0) 28 28 * 29 29 * @uses apply_filters() Filter 'bp_blogs_creation_location' to alter the -
trunk/bp-blogs/bp-blogs-functions.php
r7447 r7555 13 13 * Check whether the $bp global lists an activity directory page. 14 14 * 15 * @since BuddyPress (1.5 )15 * @since BuddyPress (1.5.0) 16 16 * 17 17 * @global BuddyPress $bp The one true BuddyPress instance. … … 100 100 * only to particular users. 101 101 * 102 * @since BuddyPress (1.7 )102 * @since BuddyPress (1.7.0) 103 103 * 104 104 * @uses apply_filters() … … 131 131 * being trackable only to particular users. 132 132 * 133 * @since BuddyPress (1.7 )133 * @since BuddyPress (1.7.0) 134 134 * 135 135 * @uses bp_blogs_is_blog_recordable … … 160 160 * Make BuddyPress aware of a new site so that it can track its activity. 161 161 * 162 * @since BuddyPress (1.0 )162 * @since BuddyPress (1.0.0) 163 163 * 164 164 * @uses BP_Blogs_Blog … … 220 220 * @global object $wpdb DB Layer. 221 221 * 222 * @param string $oldvalue Value before save. Passed by do_action() but unused here. 222 * @param string $oldvalue Value before save. Passed by do_action() but 223 * unused here. 223 224 * @param string $newvalue Value to change meta to. 224 225 */ … … 235 236 * @global object $wpdb DB Layer. 236 237 * 237 * @param string $oldvalue Value before save. Passed by do_action() but unused here. 238 * @param string $oldvalue Value before save. Passed by do_action() but 239 * unused here. 238 240 * @param string $newvalue Value to change meta to. 239 241 */ … … 606 608 * When a blog comment status transition occurs, update the relevant activity's status. 607 609 * 608 * @since BuddyPress (1.6 )610 * @since BuddyPress (1.6.0) 609 611 * 610 612 * @global object $bp BuddyPress global settings. … … 833 835 * Get metadata for a given blog. 834 836 * 835 * @since BuddyPress (1.2 )837 * @since BuddyPress (1.2.0) 836 838 * 837 839 * @global object $wpdb WordPress database access object. -
trunk/bp-blogs/bp-blogs-loader.php
r7454 r7555 16 16 17 17 /** 18 * Start the blogs component creation process 19 * 20 * @since BuddyPress (1.5 )18 * Start the blogs component creation process. 19 * 20 * @since BuddyPress (1.5.0) 21 21 */ 22 22 function __construct() { … … 32 32 33 33 /** 34 * Set up globals34 * Set up global settings for the blogs component. 35 35 * 36 36 * The BP_BLOGS_SLUG constant is deprecated, and only used here for 37 37 * backwards compatibility. 38 38 * 39 * @since BuddyPress (1.5) 39 * @since BuddyPress (1.5.0) 40 * 41 * @see BP_Component::setup_globals() for description of parameters. 42 * 43 * @param array $args See {@link BP_Component::setup_globals()}. 40 44 */ 41 45 public function setup_globals( $args = array() ) { … … 68 72 69 73 /** 70 * Include files 74 * Include bp-blogs files. 75 * 76 * @see BP_Component::includes() for description of parameters. 77 * 78 * @param array $includes See {@link BP_Component::includes()}. 71 79 */ 72 80 public function includes( $includes = array() ) { … … 92 100 93 101 /** 94 * Setup BuddyBar navigation 102 * Set up component navigation for bp-blogs. 103 * 104 * @see BP_Component::setup_nav() for a description of arguments. 105 * 106 * @param array $main_nav Optional. See BP_Component::setup_nav() for 107 * description. 108 * @param array $sub_nav Optional. See BP_Component::setup_nav() for 109 * description. 95 110 */ 96 111 public function setup_nav( $main_nav = array(), $sub_nav = array() ) { … … 140 155 141 156 /** 142 * Set up the Toolbar 143 * 144 * @global BuddyPress $bp The one true BuddyPress instance 157 * Set up bp-blogs integration with the WordPress admin bar. 158 * 159 * @since BuddyPress (1.5.0) 160 * 161 * @see BP_Component::setup_admin_bar() for a description of arguments. 162 * 163 * @param array $wp_admin_nav See BP_Component::setup_admin_bar() 164 * for description. 145 165 */ 146 166 public function setup_admin_bar( $wp_admin_nav = array() ) { … … 191 211 192 212 /** 193 * Set sup the title for pages and <title>213 * Set up the title for pages and <title> 194 214 */ 195 215 function setup_title() { … … 219 239 } 220 240 241 /** 242 * Set up the bp-blogs component. 243 */ 221 244 function bp_setup_blogs() { 222 245 buddypress()->blogs = new BP_Blogs_Component(); -
trunk/bp-blogs/bp-blogs-screens.php
r7386 r7555 11 11 if ( !defined( 'ABSPATH' ) ) exit; 12 12 13 /** 14 * Load the "My Blogs" screen. 15 */ 13 16 function bp_blogs_screen_my_blogs() { 14 17 if ( !is_multisite() ) … … 20 23 } 21 24 25 /** 26 * Load the "Create a Blog" screen. 27 */ 22 28 function bp_blogs_screen_create_a_blog() { 23 29 … … 34 40 add_action( 'bp_screens', 'bp_blogs_screen_create_a_blog', 3 ); 35 41 42 /** 43 * Load the top-level Blogs directory. 44 */ 36 45 function bp_blogs_screen_index() { 37 46 if ( is_multisite() && bp_is_blogs_component() && !bp_current_action() ) { … … 48 57 49 58 /** 50 * The main theme compat class for BuddyPress Activity59 * The main theme compat class for BuddyPress Blogs 51 60 * 52 61 * This class sets up the necessary theme compatability actions to safely output 53 62 * group template parts to the_title and the_content areas of a theme. 54 63 * 55 * @since BuddyPress (1.7 )64 * @since BuddyPress (1.7.0) 56 65 */ 57 66 class BP_Blogs_Theme_Compat { 58 67 59 68 /** 60 * Set up the groups component theme compatibility61 * 62 * @since BuddyPress (1.7 )69 * Set up theme compatibility for the Blogs component. 70 * 71 * @since BuddyPress (1.7.0) 63 72 */ 64 73 public function __construct() { … … 67 76 68 77 /** 69 * Are we looking at something that needs grouptheme compatability?70 * 71 * @since BuddyPress (1.7 )78 * Are we looking at something that needs Blogs theme compatability? 79 * 80 * @since BuddyPress (1.7.0) 72 81 */ 73 82 public function is_blogs() { … … 104 113 * Add template hierarchy to theme compat for the blog directory page. 105 114 * 106 * This is to mirror how WordPress has {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}. 107 * 108 * @since BuddyPress (1.8) 109 * 110 * @param string $templates The templates from bp_get_theme_compat_templates() 115 * This is to mirror how WordPress has 116 * {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}. 117 * 118 * @since BuddyPress (1.8.0) 119 * 120 * @param string $templates The templates from 121 * bp_get_theme_compat_templates(). 111 122 * @return array $templates Array of custom templates to look for. 112 123 */ … … 125 136 126 137 /** 127 * Update the global $post with directory data 128 * 129 * @since BuddyPress (1.7 )138 * Update the global $post with directory data. 139 * 140 * @since BuddyPress (1.7.0) 130 141 */ 131 142 public function directory_dummy_post() { … … 152 163 153 164 /** 154 * Filter the_content with the groups index template part 155 * 156 * @since BuddyPress (1.7 )165 * Filter the_content with the groups index template part. 166 * 167 * @since BuddyPress (1.7.0) 157 168 */ 158 169 public function directory_content() { … … 165 176 * Add custom template hierarchy to theme compat for the blog create page. 166 177 * 167 * This is to mirror how WordPress has {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}. 168 * 169 * @since BuddyPress (1.8) 170 * 171 * @param string $templates The templates from bp_get_theme_compat_templates() 178 * This is to mirror how WordPress has 179 * {@link https://codex.wordpress.org/Template_Hierarchy template hierarchy}. 180 * 181 * @since BuddyPress (1.8.0) 182 * 183 * @param string $templates The templates from 184 * bp_get_theme_compat_templates(). 172 185 * @return array $templates Array of custom templates to look for. 173 186 */ … … 186 199 187 200 /** 188 * Update the global $post with create screen data 189 * 190 * @since BuddyPress (1.7 )201 * Update the global $post with create screen data. 202 * 203 * @since BuddyPress (1.7.0) 191 204 */ 192 205 public function create_dummy_post() { … … 213 226 214 227 /** 215 * Filter the_content with the create screen template part 216 * 217 * @since BuddyPress (1.7 )228 * Filter the_content with the create screen template part. 229 * 230 * @since BuddyPress (1.7.0) 218 231 */ 219 232 public function create_content() { -
trunk/bp-blogs/bp-blogs-template.php
r7513 r7555 14 14 * Output the blogs component slug. 15 15 * 16 * @since BuddyPress (1.5 )16 * @since BuddyPress (1.5.0) 17 17 * 18 18 * @uses bp_get_blogs_slug() … … 24 24 * Return the blogs component slug. 25 25 * 26 * @since BuddyPress (1.5 )26 * @since BuddyPress (1.5.0) 27 27 * 28 28 * @return string The 'blogs' slug. … … 35 35 * Output the blogs component root slug. 36 36 * 37 * @since BuddyPress (1.5 )37 * @since BuddyPress (1.5.0) 38 38 * 39 39 * @uses bp_get_blogs_root_slug() … … 45 45 * Return the blogs component root slug. 46 46 * 47 * @since BuddyPress (1.5 )47 * @since BuddyPress (1.5.0) 48 48 * 49 49 * @return string The 'blogs' root slug. … … 56 56 * Output blog directory permalink. 57 57 * 58 * @since BuddyPress (1.5 )58 * @since BuddyPress (1.5.0) 59 59 * 60 60 * @uses bp_get_blogs_directory_permalink() … … 66 66 * Return blog directory permalink. 67 67 * 68 * @since BuddyPress (1.5 )68 * @since BuddyPress (1.5.0) 69 69 * 70 70 * @uses apply_filters() … … 84 84 */ 85 85 class BP_Blogs_Template { 86 86 87 /** 87 88 * The loop iterator. … … 299 300 300 301 /** 301 * Initialize the activityloop.302 * Initialize the blogs loop. 302 303 * 303 304 * Based on the $args passed, bp_has_blogs() populates the $blogs_template … … 545 546 * Output the ID of the current blog in the loop. 546 547 * 547 * @since BuddyPress (1.7 )548 * @since BuddyPress (1.7.0) 548 549 */ 549 550 function bp_blog_id() { … … 553 554 * Return the ID of the current blog in the loop. 554 555 * 555 * @since BuddyPress (1.7 )556 * @since BuddyPress (1.7.0) 556 557 * 557 558 * @return int ID of the current blog in the loop. … … 583 584 * Output the row class of the current blog in the loop. 584 585 * 585 * @since BuddyPress (1.7 )586 * @since BuddyPress (1.7.0) 586 587 */ 587 588 function bp_blog_class() { … … 591 592 * Return the row class of the current blog in the loop. 592 593 * 593 * @since BuddyPress (1.7 )594 * @since BuddyPress (1.7.0) 594 595 * 595 596 * @global BP_Blogs_Template $blogs_template … … 658 659 * Output the title of the latest post on the current blog in the loop. 659 660 * 660 * @since BuddyPress (1.7 )661 * @since BuddyPress (1.7.0) 661 662 * 662 663 * @see bp_get_blog_latest_post_title() … … 668 669 * Return the title of the latest post on the current blog in the loop. 669 670 * 670 * @since BuddyPress (1.7 )671 * @since BuddyPress (1.7.0) 671 672 * 672 673 * @global BP_Blogs_Template … … 688 689 * Output the permalink of the latest post on the current blog in the loop. 689 690 * 690 * @since BuddyPress (1.7 )691 * @since BuddyPress (1.7.0) 691 692 * 692 693 * @see bp_get_blog_latest_post_title() … … 698 699 * Return the permalink of the latest post on the current blog in the loop. 699 700 * 700 * @since BuddyPress (1.7 )701 * @since BuddyPress (1.7.0) 701 702 * 702 703 * @global BP_Blogs_Template … … 718 719 * Output the content of the latest post on the current blog in the loop. 719 720 * 720 * @since BuddyPress (1.7 )721 * @since BuddyPress (1.7.0) 721 722 * 722 723 * @uses bp_get_blog_latest_post_content() … … 728 729 * Return the content of the latest post on the current blog in the loop. 729 730 * 730 * @since BuddyPress (1.7 )731 * @since BuddyPress (1.7.0) 731 732 * 732 733 * @global BP_Blogs_Template … … 748 749 * Output the featured image of the latest post on the current blog in the loop. 749 750 * 750 * @since BuddyPress (1.7 )751 * @since BuddyPress (1.7.0) 751 752 * 752 753 * @see bp_get_blog_latest_post_content() For description of parameters. … … 760 761 * Return the featured image of the latest post on the current blog in the loop. 761 762 * 762 * @since BuddyPress (1.7 )763 * @since BuddyPress (1.7.0) 763 764 * 764 765 * @global BP_Blogs_Template … … 782 783 * Does the latest blog post have a featured image? 783 784 * 784 * @since BuddyPress (1.7 )785 * @since BuddyPress (1.7.0) 785 786 * 786 787 * @param string $size Image version to return. 'thumbnail', 'medium', 'large', … … 994 995 * Output the base URL for subdomain installations of WordPress Multisite. 995 996 * 996 * @since BuddyPress (1.6 )997 * @since BuddyPress (1.6.0) 997 998 */ 998 999 function bp_blogs_subdomain_base() { … … 1002 1003 * Return the base URL for subdomain installations of WordPress Multisite. 1003 1004 * 1004 * @since BuddyPress (1.6 )1005 * @since BuddyPress (1.6.0) 1005 1006 * 1006 1007 * @return string The base URL - eg, 'example.com' for site_url() example.com or www.example.com. -
trunk/bp-blogs/bp-blogs-widgets.php
r7210 r7555 11 11 if ( !defined( 'ABSPATH' ) ) exit; 12 12 13 // @todo not use create_function() 13 /** 14 * Register the widgets for the Blogs component. 15 */ 14 16 function bp_blogs_register_widgets() { 15 17 global $wpdb; … … 25 27 class BP_Blogs_Recent_Posts_Widget extends WP_Widget { 26 28 29 /** 30 * Constructor method. 31 */ 27 32 function __construct() { 28 33 $widget_ops = array( … … 33 38 } 34 39 40 /** 41 * Display the networkwide posts widget. 42 * 43 * @see WP_Widget::widget() for description of parameters. 44 * 45 * @param array $args Widget arguments. 46 * @param array $instance Widget settings, as saved by the user. 47 */ 35 48 function widget( $args, $instance ) { 36 49 … … 84 97 } 85 98 99 /** 100 * Update the networkwide posts widget options. 101 * 102 * @param array $new_instance The new instance options. 103 * @param array $old_instance The old instance options. 104 * @return array $instance The parsed options to be saved. 105 */ 86 106 function update( $new_instance, $old_instance ) { 87 107 $instance = $old_instance; … … 93 113 } 94 114 115 /** 116 * Output the networkwide posts widget options form. 117 * 118 * @param $instance Settings for this widget. 119 */ 95 120 function form( $instance ) { 96 121 $instance = wp_parse_args( (array) $instance, array(
Note: See TracChangeset
for help on using the changeset viewer.