run(); if (current_user_can('manage_options')) { if($searcher->getResultCount() > 0) { $msg = '
'; $msg .= __('You use the deprecated CryptX function cryptx() in your template. You should use the new function encryptx() described at the plugin', 'cryptx'); $msg .= sprintf( ' %s', plugin_basename( __FILE__ ), __('Settings') ); $msg .= '.
'; $msg .= ''.__('Your theme is OK! You have nothing to do.','cryptx').'
'); } } } /** * add links to plugin site */ function rw_cryptx_init_row_meta($links, $file) { if (CRYPTX_BASENAME == $file) { return array_merge( $links, array( sprintf( '%s', plugin_basename( __FILE__ ), __('Settings') ) ), array( sprintf( '%s', __('Donate', 'cryptx') ) ) ); } return $links; } /** * add CryptX to Option menu */ function rw_cryptx_menu() { add_options_page( 'CryptX', 'CryptX', 'manage_options', __FILE__, 'rw_cryptx_submenu' ); } /** * print CryptX Option Page */ function rw_cryptx_submenu() { global $cryptX_var, $data; if (isset($_POST) && !empty($_POST)) { if (function_exists('current_user_can') === true && current_user_can('manage_options') === false) { wp_die("You don't have permission to access!"); } $saveOptions = $_POST['cryptX_var']; check_admin_referer('cryptX'); if(isset($_POST['cryptX_var_reset'])) { delete_option('cryptX'); $saveOptions = rw_loadDefaults(); } if(isset($_POST['cryptX_rescan_theme'])) { rw_cryptx_showAdminMessages(); } else { $checkboxes = array( 'the_content' => 0, 'the_meta_key' => 0, 'the_excerpt' => 0, 'comment_text' => 0, 'widget_text' => 0, 'autolink' => 0, 'metaBox' => 0, ); $saveOptions = wp_parse_args( $saveOptions, $checkboxes ); update_option( 'cryptX', $saveOptions); $cryptX_var = rw_loadDefaults(); ?>