s2_excerpt_length
The Subscribe2 s2 excerpt length hook.
Description
Parameters (1)
- 0. $int (int) =>
55
- The int.
Usage
- To run the hook, copy the example below.
- $int = apply_filters( 's2_excerpt_length', $int );
- if ( !empty( $int ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the s2_excerpt_length callback
- function filter_s2_excerpt_length( $int ) {
- // make filter magic happen here...
- return $int;
- };
- // add the filter
- add_filter( 's2_excerpt_length', 'filter_s2_excerpt_length', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 's2_excerpt_length', 'filter_s2_excerpt_length', 10, 1 );
Defined (1)
The filter is defined in the following location(s).
- /classes/class-s2-core.php
- $this->excerpt_length = apply_filters('s2_excerpt_length', 55);