PluginProbe
CryptX / 3.4
CryptX v3.4
4.2.0 4.1.1 trunk 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.9 2.0 2.1 2.2 2.3 2.3.1 2.3.2 2.3.3 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 All 92 releases
cryptx / cryptx.php

cryptx.php in CryptX 3.4, at cryptx.php

46 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 * Plugin Name: CryptX
4 * Plugin URI: http://weber-nrw.de/wordpress/cryptx/
5 * Description: No more SPAM by spiders scanning you site for email adresses. With CryptX you can hide all your email adresses, with and without a mailto-link, by converting them using javascript or UNICODE. Although you can choose to add a mailto-link to all unlinked email adresses with only one klick at the settings. That's great, isn't it?
6 * Version: 3.4
7 * Requires at least: 6.0
8 * Author: Ralf Weber
9 * Author URI: http://weber-nrw.de/
10 * License: GPL v2 or later
11 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
12 * Text Domain: cryptx
13 */
14
15 //avoid direct calls to this file, because now WP core and framework has been used
16 if ( ! function_exists( 'add_action' ) ) {
17 header( 'Status: 403 Forbidden' );
18 header( 'HTTP/1.1 403 Forbidden' );
19 exit();
20 }
21
22 /** @const CryptX version */
23 define( 'CRYPTX_VERSION', "3.4" );
24 define( 'CRYPTX_BASENAME', plugin_basename( __FILE__ ) );
25 define( 'CRYPTX_BASEFOLDER', plugin_basename( dirname( __FILE__ ) ) );
26 define( 'CRYPTX_DIR_URL', rtrim( plugin_dir_url( __FILE__ ), "/" ) . "/" );
27 define( 'CRYPTX_DIR_PATH', plugin_dir_path( __FILE__ ) );
28 define( 'CRYPTX_FILENAME', str_replace( CRYPTX_BASEFOLDER . '/', '', plugin_basename( __FILE__ ) ) );
29
30 require_once( CRYPTX_DIR_PATH . 'classes/CryptX.php' );
31 require_once( CRYPTX_DIR_PATH . 'include/admin_option_page.php' );
32
33 $CryptX_instance = Cryptx\CryptX::getInstance();
34 $CryptX_instance->startCryptX();
35
36 /**
37 * Encrypts the given content using the Cryptx shortcode.
38 *
39 * @param string $content The content to be encrypted.
40 * @param string $args (optional) Additional arguments is deprecated and are not used anymore.
41 *
42 * @return string The encrypted content wrapped in the Cryptx shortcode.
43 */
44 function encryptx( string $content, string $args = "" ): string {
45 return do_shortcode( '[cryptx]' . $content . '[/cryptx]' );
46 }