Constant to turn off chapter-story filter
Dubious action but okay.
This commit is contained in:
parent
61d2f29b09
commit
6b1a2a10dd
@ -123,6 +123,12 @@ if ( ! defined( 'FICTIONEER_SHOW_AJAX_COMMENT_DISALLOWED_KEYS' ) ) {
|
|||||||
define( 'FICTIONEER_SHOW_AJAX_COMMENT_DISALLOWED_KEYS', true );
|
define( 'FICTIONEER_SHOW_AJAX_COMMENT_DISALLOWED_KEYS', true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Boolean: Only allow assigned chapters in stories
|
||||||
|
// Warning: The chapter navigation always refers to the parent story!
|
||||||
|
if ( ! defined( 'FICTIONEER_FILTER_STORY_CHAPTERS' ) ) {
|
||||||
|
define( 'FICTIONEER_FILTER_STORY_CHAPTERS', true );
|
||||||
|
}
|
||||||
|
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
// GLOBAL
|
// GLOBAL
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
|
@ -89,7 +89,10 @@ function fictioneer_acf_filter_chapters( $args, $field, $post_id ) {
|
|||||||
);
|
);
|
||||||
return $args;
|
return $args;
|
||||||
}
|
}
|
||||||
add_filter( 'acf/fields/relationship/query/name=fictioneer_story_chapters', 'fictioneer_acf_filter_chapters', 10, 3 );
|
|
||||||
|
if ( FICTIONEER_FILTER_STORY_CHAPTERS ) {
|
||||||
|
add_filter( 'acf/fields/relationship/query/name=fictioneer_story_chapters', 'fictioneer_acf_filter_chapters', 10, 3 );
|
||||||
|
}
|
||||||
|
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
// UPDATE POST FEATURED LIST RELATIONSHIP REGISTRY
|
// UPDATE POST FEATURED LIST RELATIONSHIP REGISTRY
|
||||||
|
Loading…
x
Reference in New Issue
Block a user