function wpcf7_plugin_action_links($links, $file) { if ($file != WPCF7_PLUGIN_BASENAME) { return $links; } $url = wpcf7_admin_url(); $settings_link = '<a href="' . esc_attr($url) . '">' . esc_html(__('Settings', 'wpcf7')) . '</a>'; array_unshift($links, $settings_link); return $links; }
?> </a></li> <?php } ?> </ul> <br class="clear" /> <?php if ($cf) { $disabled = wpcf7_admin_has_edit_cap() ? '' : ' disabled="disabled"'; ?> <form method="post" action="<?php echo wpcf7_admin_url('admin.php', array('contactform' => $current)); ?> " id="wpcf7-admin-form-element"> <?php if (wpcf7_admin_has_edit_cap()) { wp_nonce_field('wpcf7-save_' . $current); } ?> <input type="hidden" id="wpcf7-id" name="wpcf7-id" value="<?php echo $current; ?> " /> <table class="widefat"> <tbody> <tr>
</div> <div id="wpcf7-lang-select-modal" class="hidden"> <?php $available_locales = wpcf7_l10n(); $default_locale = get_locale(); if (!isset($available_locales[$default_locale])) { $default_locale = 'en_US'; } ?> <h4><?php echo esc_html(sprintf(__('Use the default language (%s)', 'wpcf7'), $available_locales[$default_locale])); ?> </h4> <p><a href="<?php echo wpcf7_admin_url(array('contactform' => 'new')); ?> " class="button" /><?php echo esc_html(__('Add New', 'wpcf7')); ?> </a></p> <?php unset($available_locales[$default_locale]); ?> <h4><?php echo esc_html(__('Or', 'wpcf7')); ?> </h4> <form action="" method="get"> <input type="hidden" name="page" value="wpcf7" />
function wpcf7_upgrade() { $opt = get_option('wpcf7'); if (!is_array($opt)) { $opt = array(); } $old_ver = isset($opt['version']) ? (string) $opt['version'] : '0'; $new_ver = WPCF7_VERSION; if ($old_ver == $new_ver) { return; } do_action('wpcf7_upgrade', $new_ver, $old_ver); $opt['version'] = $new_ver; update_option('wpcf7', $opt); if (is_admin() && isset($_GET['page']) && 'wpcf7' == $_GET['page']) { wp_redirect(wpcf7_admin_url(array('page' => 'wpcf7'))); exit; } }