[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-templates/bp-nouveau/includes/blogs/ -> ajax.php (source)

   1  <?php
   2  /**
   3   * Blogs Ajax functions
   4   *
   5   * @since 3.0.0
   6   * @version 3.0.0
   7   */
   8  
   9  // Exit if accessed directly.
  10  defined( 'ABSPATH' ) || exit;
  11  
  12  add_action( 'admin_init', function() {
  13      $ajax_actions = array(
  14          array(
  15              'blogs_filter' => array(
  16                  'function' => 'bp_nouveau_ajax_object_template_loader',
  17                  'nopriv'   => true,
  18              ),
  19          ),
  20      );
  21  
  22      foreach ( $ajax_actions as $ajax_action ) {
  23          $action = key( $ajax_action );
  24  
  25          add_action( 'wp_ajax_' . $action, $ajax_action[ $action ]['function'] );
  26  
  27          if ( ! empty( $ajax_action[ $action ]['nopriv'] ) ) {
  28              add_action( 'wp_ajax_nopriv_' . $action, $ajax_action[ $action ]['function'] );
  29          }
  30      }
  31  }, 12 );


Generated: Wed Dec 11 01:01:37 2019 Cross-referenced by PHPXref 0.7.1