Skip to:
Content

bbPress.org

Changeset 5823


Ignore:
Timestamp:
07/13/2015 10:02:16 PM (9 years ago)
Author:
johnjamesjacoby
Message:

Introduce core/abstraction.php to provide a layer of protection against touching common WordPress global variables directly.

This commit introduces a few new helper functions to protect sensitive global variables, and also introduces the ability to filter and override them explicitly within the scope of the bbPress plugin. These functions will be used in place of existing global touches in future commits.

See #2786.

Location:
trunk/src
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bbpress.php

    r5821 r5823  
    294294        /** Core **************************************************************/
    295295
     296        require $this->includes_dir . 'core/abstraction.php';
    296297        require $this->includes_dir . 'core/sub-actions.php';
    297298        require $this->includes_dir . 'core/functions.php';
  • trunk/src/includes/core/functions.php

    r5770 r5823  
    566566
    567567/**
    568  * Get the slug used for paginated requests
    569  *
    570  * @since bbPress (r4926)
    571  * @global object $wp_rewrite The WP_Rewrite object
    572  * @return string
    573  */
    574 function bbp_get_paged_slug() {
    575     global $wp_rewrite;
    576     return $wp_rewrite->pagination_base;
    577 }
    578 
    579 /**
    580568 * Delete a blogs rewrite rules, so that they are automatically rebuilt on
    581569 * the subsequent page load.
Note: See TracChangeset for help on using the changeset viewer.