I am using Filter Custom Fields & Taxonomies Light. I found out it is using admin-ajax.php
in the frontend for the AJAX search even not logged in.
See:
add_action( 'wp_head', 'sf_head', 1 );
function sf_head(){
$settings = get_option( 'search-filter-settings' );
if( !isset( $settings['style'] ) || $settings['style'] == '' )
wp_register_style( 'sf-style', SF_URL . 'res/style.css' );
else
wp_register_style( 'sf-style', SF_URL . 'res/' . $settings['style'] . '.css');
wp_enqueue_style( 'sf-style' );
wp_enqueue_script('jquery');
wp_enqueue_script('jquery-ui-slider');
wp_register_script( 'sf-script', SF_URL . 'res/sf.js' );
wp_enqueue_script( 'sf-script' );
?>
<script>var sf_ajax_root = '<?php echo admin_url('admin-ajax.php'); ?>'</script>
<?php
}
Is that a common way of doing AJAX in Wordpress or a security hole?