Skip to content

Commit cf53b79

Browse files
committed
Remove activation hooks
1 parent 100e0b8 commit cf53b79

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

ajax-load-more-for-searchwp.php

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,34 +18,6 @@
1818
exit;
1919
}
2020

21-
/**
22-
* Installation hook.
23-
*/
24-
function alm_searchwp_install() {
25-
if ( ! is_plugin_active( 'ajax-load-more/ajax-load-more.php' ) ) {
26-
set_transient( 'alm_searchwp_admin_notice', true, 5 );
27-
}
28-
}
29-
register_activation_hook( __FILE__, 'alm_searchwp_install' );
30-
31-
/**
32-
* Display admin notice if plugin does not meet the requirements.
33-
*/
34-
function alm_searchwp_admin_notice() {
35-
$slug = 'ajax-load-more';
36-
// Ajax Load More Notice.
37-
if ( get_transient( 'alm_searchwp_admin_notice' ) ) {
38-
$install_url = get_admin_url() . '/update.php?action=install-plugin&plugin=' . $slug . '&_wpnonce=' . wp_create_nonce( 'install-plugin_' . $slug );
39-
$message = '<div class="error">';
40-
$message .= '<p>You must install and activate the core Ajax Load More plugin before using the Ajax Load More SearchWP extension.</p>';
41-
$message .= '<p>' . sprintf( '<a href="%s" class="button-primary">%s</a>', $install_url, 'Install Ajax Load More Now' ) . '</p>';
42-
$message .= '</div>';
43-
echo wp_kses_post( $message );
44-
delete_transient( 'alm_searchwp_admin_notice' );
45-
}
46-
}
47-
add_action( 'admin_notices', 'alm_searchwp_admin_notice' );
48-
4921
if ( ! class_exists( 'ALM_SearchWP' ) ) :
5022

5123
/**

0 commit comments

Comments
 (0)