Filter hook 'xmlrpc_element_limit'

in WP Core File wp-includes/IXR/class-IXR-message.php at line 86

View Source

xmlrpc_element_limit

Filter Hook
Description
Filters the number of elements to parse in an XML-RPC response.

Hook Information

File Location wp-includes/IXR/class-IXR-message.php View on GitHub
Hook Type Filter
Line Number 86

Hook Parameters

Type Name Description
int $element_limit Default elements limit.

Usage Examples

Basic Usage
<?php
// Hook into xmlrpc_element_limit
add_filter('xmlrpc_element_limit', 'my_custom_filter', 10, 1);

function my_custom_filter($element_limit) {
    // Your custom filtering logic here
    return $element_limit;
}

Source Code Context

wp-includes/IXR/class-IXR-message.php:86 - How this hook is used in WordPress core
<?php
  81               *
  82               * @since 4.0.0
  83               *
  84               * @param int $element_limit Default elements limit.
  85               */
  86              $element_limit = apply_filters( 'xmlrpc_element_limit', $element_limit );
  87          }
  88          if ( $element_limit && 2 * $element_limit < substr_count( $this->message, '<' ) ) {
  89              return false;
  90          }
  91  

PHP Documentation

<?php
/**
             * Filters the number of elements to parse in an XML-RPC response.
             *
             * @since 4.0.0
             *
             * @param int $element_limit Default elements limit.
             */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/IXR/class-IXR-message.php
Related Hooks

Related hooks will be displayed here in future updates.