Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Fix admin footer script hook to support WP 4.5 #94

Merged
merged 1 commit into from
Oct 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion php/class-post-type.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function register() {
add_filter( 'bulk_actions-edit-' . self::SLUG, array( $this, 'add_snapshot_bulk_actions' ) );
add_filter( 'handle_bulk_actions-edit-' . self::SLUG, array( $this, 'handle_snapshot_bulk_actions' ), 10, 3 );
} else {
add_action( 'admin_print_footer_scripts-edit.php', array( $this, 'snapshot_merge_print_script' ) );
add_action( 'admin_footer-edit.php', array( $this, 'snapshot_merge_print_script' ) );
add_action( 'load-edit.php', array( $this, 'handle_snapshot_bulk_actions_workaround' ) );
}
add_action( 'admin_notices', array( $this, 'admin_show_merge_error' ) );
Expand Down
2 changes: 1 addition & 1 deletion tests/php/test-class-post-type.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function test_register() {
$this->assertEquals( 10, has_filter( 'bulk_actions-edit-' . Post_Type::SLUG, array( $post_type, 'add_snapshot_bulk_actions' ) ) );
$this->assertEquals( 10, has_filter( 'handle_bulk_actions-edit-' . Post_Type::SLUG, array( $post_type, 'handle_snapshot_bulk_actions' ) ) );
} else {
$this->assertEquals( 10, has_action( 'admin_print_footer_scripts-edit.php', array( $post_type, 'snapshot_merge_print_script' ) ) );
$this->assertEquals( 10, has_action( 'admin_footer-edit.php', array( $post_type, 'snapshot_merge_print_script' ) ) );
$this->assertEquals( 10, has_action( 'load-edit.php', array( $post_type, 'handle_snapshot_bulk_actions_workaround' ) ) );
}
$this->assertEquals( 10, has_action( 'admin_notices', array( $post_type, 'admin_show_merge_error' ) ) );
Expand Down