[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-core/deprecated/ -> 10.0.php (source)

   1  <?php
   2  /**
   3   * Deprecated functions.
   4   *
   5   * @package BuddyPress
   6   * @deprecated 10.0.0
   7   */
   8  
   9  // Exit if accessed directly.
  10  if ( ! defined( 'ABSPATH' ) ) {
  11      exit;
  12  }
  13  
  14  /**
  15   * Returns the name of the hook to use once a WordPress Site is inserted into the Database.
  16   *
  17   * WordPress 5.1.0 deprecated the `wpmu_new_blog` action. As BuddyPress is supporting WordPress back
  18   * to 4.9.0, this function makes sure we are using the new hook `wp_initialize_site` when the current
  19   * WordPress version is upper or equal to 5.1.0 and that we keep on using `wpmu_new_blog` for earlier
  20   * versions of WordPress.
  21   *
  22   * @since 6.0.0
  23   * @deprecated 10.0.0
  24   *
  25   * @return string The name of the hook to use.
  26   */
  27  function bp_insert_site_hook() {
  28      _deprecated_function( __FUNCTION__, '10.0.0' );
  29  
  30      $wp_hook = 'wpmu_new_blog';
  31  
  32      if ( function_exists( 'wp_insert_site' ) ) {
  33          $wp_hook = 'wp_initialize_site';
  34      }
  35  
  36      return $wp_hook;
  37  }
  38  
  39  /**
  40   * Returns the name of the hook to use once a WordPress Site is deleted.
  41   *
  42   * WordPress 5.1.0 deprecated the `delete_blog` action. As BuddyPress is supporting WordPress back
  43   * to 4.9.0, this function makes sure we are using the new hook `wp_validate_site_deletion` when the
  44   * current WordPress version is upper or equal to 5.1.0 and that we keep on using `delete_blog` for
  45   * earlier versions of WordPress.
  46   *
  47   * @since 6.0.0
  48   * @deprecated 10.0.0
  49   *
  50   * @return string The name of the hook to use.
  51   */
  52  function bp_delete_site_hook() {
  53      _deprecated_function( __FUNCTION__, '10.0.0' );
  54  
  55      $wp_hook = 'delete_blog';
  56  
  57      if ( function_exists( 'wp_delete_site' ) ) {
  58          $wp_hook = 'wp_validate_site_deletion';
  59      }
  60  
  61      return $wp_hook;
  62  }


Generated: Thu Nov 21 01:00:57 2024 Cross-referenced by PHPXref 0.7.1