Add fictioneer_main_end action hook

This commit is contained in:
Tetrakern 2024-09-07 16:57:34 +02:00
parent ef68706cd6
commit b07325d47e
32 changed files with 72 additions and 1 deletions

View File

@ -38,6 +38,8 @@ get_header( null, array( 'no_index' => 1 ) );
</div> </div>
<?php do_action( 'fictioneer_main_end', '404' ); ?>
</main> </main>
<?php <?php

View File

@ -684,7 +684,15 @@ Fires after opening the sites `<main>` container.
**Hooked Actions:** **Hooked Actions:**
* `fictioneer_main_observer()` Renders the main observer element. Priority 1. * `fictioneer_main_observer()` Renders the main observer element. Priority 1.
* `fictioneer_page_background()` Renders the page background. Priority 10. * `fictioneer_page_background()` Renders the page background. Priority 10.
* `fictioneer_sidebar() Renders the sidebar if enabled. Priority 10. * `fictioneer_sidebar() Renders the sidebar if enabled (depends on location). Priority 10.
---
### `do_action( 'fictioneer_main_end', $context )`
Fires before closing the sites `<main>` container.
**Parameters:**
* $context (string|null) Context of the action call, typically related to the template. Unsafe.
--- ---

View File

@ -216,6 +216,8 @@ get_header();
</div> </div>
<?php do_action( 'fictioneer_main_end', 'author' ); ?>
</main> </main>
<?php <?php

View File

@ -75,6 +75,8 @@ get_header();
</div> </div>
<?php do_action( 'fictioneer_main_end', 'category-archive' ); ?>
</main> </main>
<?php <?php

View File

@ -142,6 +142,8 @@ get_header();
</div> </div>
<?php do_action( 'fictioneer_main_end', 'chapters' ); ?>
</main> </main>
<?php <?php

View File

@ -102,6 +102,8 @@ get_header();
</div> </div>
<?php do_action( 'fictioneer_main_end', 'collections' ); ?>
</main> </main>
<?php <?php

View File

@ -102,6 +102,8 @@ get_header();
</div> </div>
<?php do_action( 'fictioneer_main_end', 'recommendations' ); ?>
</main> </main>
<?php <?php

View File

@ -151,6 +151,9 @@ get_header();
</article> </article>
</div> </div>
<?php do_action( 'fictioneer_main_end', 'search' ); ?>
</main> </main>
<?php <?php

View File

@ -196,6 +196,8 @@ get_header(
</div> </div>
<?php do_action( 'fictioneer_main_end', 'chapter' ); ?>
</main> </main>
<?php <?php

View File

@ -125,6 +125,8 @@ get_header( null, array( 'type' => 'fcn_collection' ) );
</div> </div>
<?php do_action( 'fictioneer_main_end', 'collection' ); ?>
</main> </main>
<?php <?php

View File

@ -75,6 +75,8 @@ get_header( null, array( 'type' => 'fcn_recommendation' ) );
</div> </div>
<?php do_action( 'fictioneer_main_end', 'recommendation' ); ?>
</main> </main>
<?php <?php

View File

@ -106,6 +106,8 @@ get_header(
</div> </div>
<?php do_action( 'fictioneer_main_end', 'story' ); ?>
</main> </main>
<?php <?php

View File

@ -68,6 +68,8 @@ get_header();
</div> </div>
<?php do_action( 'fictioneer_main_end', 'post' ); ?>
</main> </main>
<?php <?php

View File

@ -162,6 +162,8 @@ reset( $sorted_authors );
</div> </div>
<?php do_action( 'fictioneer_main_end', 'singular-index' ); ?>
</main> </main>
<?php <?php

View File

@ -132,6 +132,8 @@ reset( $sorted_authors );
</div> </div>
<?php do_action( 'fictioneer_main_end', 'singular-index' ); ?>
</main> </main>
<?php <?php

View File

@ -75,6 +75,8 @@ get_header( null, array( 'no_index' => 1 ) );
</div> </div>
<?php do_action( 'fictioneer_main_end', 'singular-bookmarks' ); ?>
</main> </main>
<?php <?php

View File

@ -169,6 +169,8 @@ get_header( null, array( 'no_index' => 1 ) );
</div> </div>
<?php do_action( 'fictioneer_main_end', 'singular-bookmarks-ajax' ); ?>
</main> </main>
<?php <?php

View File

@ -203,6 +203,8 @@ get_header( null, array( 'no_index' => 1 ) );
</div> </div>
<?php do_action( 'fictioneer_main_end', 'singular-bookshelf' ); ?>
</main> </main>
<?php <?php

View File

@ -44,6 +44,8 @@ get_header();
</div> </div>
<?php do_action( 'fictioneer_main_end', 'singular-canvas-page' ); ?>
</main> </main>
<?php <?php

View File

@ -162,6 +162,8 @@ reset( $sorted_stories );
</div> </div>
<?php do_action( 'fictioneer_main_end', 'singular-index-advanced' ); ?>
</main> </main>
<?php <?php

View File

@ -151,6 +151,8 @@ reset( $sorted_stories );
</div> </div>
<?php do_action( 'fictioneer_main_end', 'singular-index' ); ?>
</main> </main>
<?php <?php

View File

@ -88,6 +88,8 @@ get_header(
<?php endwhile; ?> <?php endwhile; ?>
</div> </div>
<?php do_action( 'fictioneer_main_end', 'singular-story' ); ?>
</main> </main>
<?php <?php

View File

@ -125,6 +125,8 @@ get_header();
</div> </div>
<?php do_action( 'fictioneer_main_end', 'singular-taxonomies' ); ?>
</main> </main>
<?php <?php

View File

@ -53,6 +53,8 @@ get_header();
</div> </div>
<?php do_action( 'fictioneer_main_end', 'singular-titleless' ); ?>
</main> </main>
<?php <?php

View File

@ -57,6 +57,8 @@ get_header();
</div> </div>
<?php do_action( 'fictioneer_main_end', 'singular' ); ?>
</main> </main>
<?php <?php

View File

@ -152,6 +152,8 @@ get_header();
</div> </div>
<?php do_action( 'fictioneer_main_end', 'stories' ); ?>
</main> </main>
<?php <?php

View File

@ -83,6 +83,8 @@ get_header();
</div> </div>
<?php do_action( 'fictioneer_main_end', 'tag-archive' ); ?>
</main> </main>
<?php <?php

View File

@ -84,6 +84,8 @@ get_header();
</div> </div>
<?php do_action( 'fictioneer_main_end', 'character-archive' ); ?>
</main> </main>
<?php <?php

View File

@ -84,6 +84,8 @@ get_header();
</div> </div>
<?php do_action( 'fictioneer_main_end', 'content-warning-archive' ); ?>
</main> </main>
<?php <?php

View File

@ -84,6 +84,8 @@ get_header();
</div> </div>
<?php do_action( 'fictioneer_main_end', 'fandom-archive' ); ?>
</main> </main>
<?php <?php

View File

@ -84,6 +84,8 @@ get_header();
</div> </div>
<?php do_action( 'fictioneer_main_end', 'genre-archive' ); ?>
</main> </main>
<?php <?php

View File

@ -85,6 +85,8 @@ get_header( null, array( 'type' => 'user-profile', 'no_index' => 1 ) );
</div> </div>
<?php do_action( 'fictioneer_main_end', 'user-profile' ); ?>
</main> </main>
<?php <?php