Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/04/2015 07:29:24 AM (9 years ago)
Author:
tw2113
Message:

Initial documentation cleanup for the BP Forums Component.

See #6397.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-forums/deprecated/1.7.php

    r9819 r10183  
    11<?php
    2 
    32/**
    4  * BuddyPress Forums Deprecated Functions
     3 * BuddyPress Forums Deprecated Functions.
    54 *
    65 * This file contains all the deprecated functions for BuddyPress forums since
     
    1211 */
    1312
    14 // Exit if accessed directly
     13// Exit if accessed directly.
    1514defined( 'ABSPATH' ) || exit;
    1615
     
    2221    $page  = bp_core_do_network_admin()  ? 'settings.php' : 'options-general.php';
    2322
    24     // Add the administration tab under the "Site Admin" tab for site administrators
     23    // Add the administration tab under the "Site Admin" tab for site administrators.
    2524    $hook = add_submenu_page( $page, __( 'Forums', 'buddypress' ), __( 'Forums', 'buddypress' ), 'manage_options', 'bb-forums-setup', "bp_forums_bbpress_admin" );
    2625
    27     // Fudge the highlighted subnav item when on the BuddyPress Forums admin page
     26    // Fudge the highlighted subnav item when on the BuddyPress Forums admin page.
    2827    add_action( "admin_head-$hook", 'bp_core_modify_admin_menu_highlight' );
    2928}
     
    3534    check_admin_referer( 'bp_forums_existing_install_init' );
    3635
    37     // Sanitize $_REQUEST['bbconfigloc']
     36    // Sanitize $_REQUEST['bbconfigloc'].
    3837    $_REQUEST['bbconfigloc'] = apply_filters( 'bp_forums_bbconfig_location', $_REQUEST['bbconfigloc'] );
    3938
     
    6564    $bp = buddypress();
    6665
    67     // Create the bb-config.php file
     66    // Create the bb-config.php file.
    6867    $initial_write = bp_forums_bbpress_write(
    6968        $bp->plugin_dir . '/bp-forums/bbpress/bb-config-sample.php',
     
    8584    );
    8685
    87     // Add the custom user and usermeta entries to the config file
     86    // Add the custom user and usermeta entries to the config file.
    8887    if ( $initial_write == 1 ) {
    8988        $file = file_get_contents( $location );
     
    147146    }
    148147
    149     // Get the existing lines in the file
     148    // Get the existing lines in the file.
    150149    $lines = file( $file_source );
    151150
    152     // Initialise an array to store the modified lines
     151    // Initialise an array to store the modified lines.
    153152    $modified_lines = array();
    154153
    155     // Loop through the lines and modify them
     154    // Loop through the lines and modify them.
    156155    foreach ( (array) $lines as $line ) {
    157156        if ( isset( $alterations[substr( $line, 0, 20 )] ) ) {
     
    184183    }
    185184
    186     // Open the file for writing - rewrites the whole file
     185    // Open the file for writing - rewrites the whole file.
    187186    $file_handle = fopen( $file_target, 'w' );
    188187
    189     // Write lines one by one to avoid OS specific newline hassles
     188    // Write lines one by one to avoid OS specific newline hassles.
    190189    foreach ( (array) $modified_lines as $modified_line ) {
    191190        if ( strlen( $modified_line ) - 2 === strrpos( $modified_line, '?>' ) ) {
     
    199198    }
    200199
    201     // Close the config file
     200    // Close the config file.
    202201    fclose( $file_handle );
    203202
Note: See TracChangeset for help on using the changeset viewer.