'.__('Settings', 'awl').''; } return $links; } public function admin_scripts($hook){ if($hook!='settings_page_'.awl_folder.'-settings'){ return; } wp_enqueue_script(awl_folder.'_script', awl_dir.'/assets/js/admin-page.min.js'); wp_enqueue_style(awl_folder.'_styles', awl_dir.'/assets/css/admin-styles.css', false, awl_version); } public function options_page(){ $display_add_options = $message = $error = $result = ''; if(isset($_POST['awl_options_submit']) && check_admin_referer(awl_folder,'awl_nonce_name')){ /* Update settings */ $awl_options['inline_link'] = isset($_POST['awl_inline_link'])?$_POST['awl_inline_link']:'enabled'; $awl_options['rel'] = isset($_POST['awl_rel'])?$_POST['awl_rel']:'disabled'; $awl_options['title'] = isset($_POST['awl_title'])?$_POST['awl_title']:'disabled'; $awl_options['wplink_styling'] = isset($_POST['awl_wplink_styling'])?$_POST['awl_wplink_styling']:'[]'; if(empty($error)) { update_option('nm-awl_options', $awl_options); $message .= __('Settings saved.', 'awl'); }else{ $error .= " " . __('Settings are not saved.','awl'); } } $options = get_option('nm-awl_options'); ?>