. --------------------------------------------------------------------- */ // Global VAriables global $plugin_dir_path; $plugin_dir_path = plugin_dir_url(__FILE__); /*Call 'aws_install' function at the time of plug-in install.*/ register_activation_hook( __FILE__, 'aws_install' ); /** * Function Name: aws_install * Description: Save data to database at the time of plugin install. * */ function aws_install() { $container_id = (get_option('container-id') != '') ? get_option('container-id') : 'main' ; $mcdc = (get_option('mcdc') != '') ? get_option('mcdc') : 'menu' ; $search_form = (get_option('search-form') != '') ? get_option('search-form') : 'searchform' ; $transition = (get_option('transition') != '') ? get_option('transition') : '' ; $scrollTop = (get_option('scrollTop') != '') ? get_option('scrollTop') : '' ; $loader = (get_option('loader') != '') ? get_option('loader') : '' ; update_option('container-id', $container_id); update_option('mcdc', $mcdc); update_option('search-form', $search_form); update_option('transition', $transition); update_option('scrollTop', $scrollTop); update_option('loader', $loader); } /*Call 'aws_option_link' function to Add a submenu link under Profile tab.*/ add_action( 'admin_menu', 'aws_option_link' ); /** * Function Name: aws_option_link * Description: Add a submenu link under Settings tab. * */ function aws_option_link() { $aws_page_hook = add_options_page( 'AWS Options Page', 'AWS Options Page', 'manage_options', 'aws-options', 'aws_option_form' ); add_action( "admin_print_scripts-$aws_page_hook", 'aws_admin_css' ); } function aws_admin_css() { global $plugin_dir_path; wp_enqueue_style('aws-style-css', $plugin_dir_path . '/css/aws-style.css'); } /** * Function name: aws_option_form * Description: Show aws option form to admin, save data to wp_option table. */ function aws_option_form() { echo '

AWS Options

'; /** * Check whether the form submitted or not. */ if( isset($_POST['option-save']) ) { //Get the form value $ids = trim($_POST['no-ajax-ids']); $container_id = trim($_POST['container-id']); $mcdc = trim($_POST['mcdc']); $search_form = trim($_POST['search_form']); $transition = $_POST['transition']; $scrollTop = $_POST['scrollTop']; $loader = $_POST['loader']; if( $container_id == '' || $mcdc == '' ) echo '

Data for * marked fields are mendatory.

'; else { //Explode the value by comma(,). $ids_arr = explode(',', $ids); //Remove spaces if any. foreach( $ids_arr as $key => $id ) { $ids_arr[$key] = trim($id); } $ids = implode(',', $ids_arr); ////Update the database update_option('no-ajax-ids', $ids); update_option('container-id', $container_id); update_option('mcdc', $mcdc); update_option('search-form', $search_form); update_option('transition', $transition); update_option('scrollTop', $scrollTop); update_option('loader', $loader); echo '

Settings updated.

'; } } ?>
No ajax container IDs:
Provide the ids of the parent tag whose child anchor(a) tags you dont want to handled by AWS plugin.
NOTE: ids should be separated by comma(,) without any spaces. eg: id1,id2,id3
Ajax container ID:*
ID of the container div whose data needs to be ajaxify. eg: main/page any one.
Menu container class:*
Class of the div in which menu's ul, li present. eg: menu
Search form TAG ID/CLASS:*
To make your search ajaxify provide the search form ID/CLASS.
Example: if form tag class is search-form then provide .#search-form if ID is search-form the provide #search-form
Enable Transition Effect: " />
Enable scroll to top Effect: " />
Loader Image:
Amount $
If you are using this plugin on your website and it has saved you time/money or you are using this plugin in a commercial project, think about the time and effort put into this plugin for free so that life is easier for you, give a donation!

Ajaxify Wordpress Site Pro Details Here

$id ) { if ( trim($id) == '' ) unset($ids_arr[$key]); else $ids_arr[$key] = '#' . trim($id) . ' a'; } $ids = implode(',', $ids_arr); include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); $bp_status = is_plugin_active( 'buddypress/bp-loader.php' ); $aws_data = array( 'rootUrl' => site_url() . '/', 'ids' => $ids, 'container_id' => get_option('container-id'), 'mcdc' => get_option('mcdc'), 'searchID' => get_option('search-form'), 'transition' => get_option('transition'), 'scrollTop' => get_option('scrollTop'), 'loader' => get_option('loader'), 'bp_status' => $bp_status ); wp_localize_script('ajaxify-js', 'aws_data', $aws_data); } // End of aws_load_scripts function