admin_url( 'admin-ajax.php' ),
'add_admin_note_nonce' => wp_create_nonce( 'adminoma_add_admin_note_action' ),
'delete_admin_note_nonce' => wp_create_nonce( 'adminoma_delete_admin_note_action' ),
] );
}
public function adminoma_admin_page_content() {
?>
= 0 && isset( $notes[ $index ] ) ) {
unset( $notes[ $index ] );
update_option( 'adminoma_admin_notes', array_values( $notes ) );
}
wp_die();
}
public function adminoma_initialize_default_notes() {
$notes = get_option( 'adminoma_admin_notes', [] );
if ( empty( $notes ) ) {
$notes[] = esc_html__( 'Welcome to Admin Notes Manager!', 'admin-notes-manager' );
$notes[] = esc_html__( 'This is a sample note. New notes will appear automatically.', 'admin-notes-manager' );
update_option( 'adminoma_admin_notes', $notes );
}
}
}
Adminoma_Notes_Manager::get_instance();