Rename fictioneer_ajax_get_chapter_groups()

This does not return the groups, just the options.
This commit is contained in:
Tetrakern 2024-10-12 13:52:49 +02:00
parent 0207309275
commit 36249b71eb
3 changed files with 4 additions and 4 deletions

View File

@ -1156,7 +1156,7 @@ if ( ! wp_doing_ajax() ) {
* @since 5.7.4
*/
function fictioneer_ajax_get_chapter_groups() {
function fictioneer_ajax_get_chapter_group_options() {
// Validate
$user = fictioneer_get_validated_ajax_user( 'nonce', 'fictioneer_nonce' );
$story_id = isset( $_GET['story_id'] ) ? fictioneer_validate_id( $_GET['story_id'], 'fcn_story' ) : null;
@ -1219,7 +1219,7 @@ function fictioneer_ajax_get_chapter_groups() {
wp_send_json_success( array( 'html' => $html ) );
}
}
add_action( 'wp_ajax_fictioneer_ajax_get_chapter_groups', 'fictioneer_ajax_get_chapter_groups' );
add_action( 'wp_ajax_fictioneer_ajax_get_chapter_group_options', 'fictioneer_ajax_get_chapter_group_options' );
// =============================================================================
// AJAX: RESET THEME COLORS

2
js/admin.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -728,7 +728,7 @@ function fcn_setGroupDataList(source) {
// Request group options (if any)
fcn_ajaxGet({
'action': 'fictioneer_ajax_get_chapter_groups',
'action': 'fictioneer_ajax_get_chapter_group_options',
'story_id': storyId,
'nonce': fictioneer_ajax.fictioneer_nonce
})