' . __('Settings', 'captcha') . ''; array_unshift( $links, $settings_link ); return $links; } /** * Registers the settings, support, and feedback meta links * * @link http://thematosoup.com/development/add-action-meta-links-wordpress-plugins/ */ function ayah_register_plugin_meta_links($links, $file) { if ($file == PLUGIN_BASENAME) { $links[] = '' . __('Settings','captcha') . ''; $links[] = '' . __('Support','captcha') . ''; $links[] = '' . __('Feedback','captcha') . ''; } return $links; } /** * Reloads the iframe for situations where the page isn't submitted, like in cf7 */ function ajax_json_echo_filter( $items ) { if ( ! is_array( $items['onSubmit'] ) ) $items['onSubmit'] = array(); $div_id = "AYAH" . $_REQUEST["session_secret"]; $items['onSubmit'][] = ' var div_id = document.getElementById("' . $div_id . '"); var iframe_id = div_id.getElementsByTagName("iframe")[0].id; document.getElementById(iframe_id).src = document.getElementById(iframe_id).src; '; return $items; } /** * Registers the stylesheet */ function ayah_register_style() { wp_register_style('AYAHStylesheet', plugins_url('css/ayah_styles.css', __FILE__)); } function ayah_login_styles() { $action = ( isset( $_GET['action'] ) ) ? $_GET['action'] : ''; $options = ayah_get_options(); if ( ( $action == 'lostpassword' && $options['enable_lost_password_form'] ) || ( $action == 'register' && $options['enable_register_form'] ) ) { ?>