cf7-conditional-fields
Last commit date
js
1 year ago
jsdoc-out
1 year ago
Wpcf7cfMailParser.php
4 years ago
admin-style.css
2 years ago
admin-style.css.map
2 years ago
admin-style.scss
4 years ago
admin.php
2 years ago
cf7cf.php
1 year ago
conditional-fields.php
1 year ago
init.php
1 year ago
readme.txt
1 year ago
style.css
3 years ago
tg_pane_group.php
1 year ago
wpcf7cf-options.php
1 year ago
init.php
55 lines
| 1 | <?php |
| 2 | |
| 3 | if (!defined('WPCF7CF_VERSION')) define( 'WPCF7CF_VERSION', '2.5.7' ); |
| 4 | if (!defined('WPCF7CF_CF7_MAX_VERSION')) define( 'WPCF7CF_CF7_MAX_VERSION', '6.0.3' ); |
| 5 | if (!defined('WPCF7CF_PLUGIN')) define( 'WPCF7CF_PLUGIN', __FILE__ ); |
| 6 | if (!defined('WPCF7CF_PLUGIN_BASENAME')) define( 'WPCF7CF_PLUGIN_BASENAME', plugin_basename( WPCF7CF_PLUGIN ) ); |
| 7 | if (!defined('WPCF7CF_PLUGIN_NAME')) define( 'WPCF7CF_PLUGIN_NAME', trim( dirname( WPCF7CF_PLUGIN_BASENAME ), '/' ) ); |
| 8 | if (!defined('WPCF7CF_PLUGIN_DIR')) define( 'WPCF7CF_PLUGIN_DIR', untrailingslashit( dirname( WPCF7CF_PLUGIN ) ) ); |
| 9 | |
| 10 | if (!defined('WPCF7CF_LOAD_JS')) define('WPCF7CF_LOAD_JS', true); |
| 11 | if (!defined('WPCF7CF_LOAD_CSS')) define('WPCF7CF_LOAD_CSS', true); |
| 12 | |
| 13 | if (!defined('WPCF7CF_REGEX_MAIL_GROUP')) define( 'WPCF7CF_REGEX_MAIL_GROUP', '@\[[\s]*([a-zA-Z_][0-9a-zA-Z:._-]*)[\s]*\](.*?)\[[\s]*/[\s]*\1[\s]*\]@s'); |
| 14 | if (!defined('WPCF7CF_REGEX_MAIL_GROUP_INVERTED')) define( 'WPCF7CF_REGEX_MAIL_GROUP_INVERTED', '@\[![\s]*([a-zA-Z_][0-9a-zA-Z:._-]*)[\s]*\](.*?)\[![\s]*/[\s]*\1[\s]*\]@s'); |
| 15 | if (!defined('WPCF7CF_REGEX_MAIL_UNWANTED_WHITESPACE')) define('WPCF7CF_REGEX_MAIL_UNWANTED_WHITESPACE', '@(\[/[^\]]*\])\s+?(\[)@s'); |
| 16 | if (!defined('WPCF7CF_REGEX_CONDITIONS')) define( 'WPCF7CF_REGEX_CONDITIONS', '/(?:show \[([^\]]*?)\]|and) if \[([^\]]*?)\] (?:(equals \(regex\)|not equals \(regex\)|equals|not equals|greater than or equals|greater than|less than or equals|less than|is empty|not empty|function)(?: \"(.*)\")?)/m'); |
| 17 | |
| 18 | if (!defined('WPCF7CF_MAX_RECOMMENDED_CONDITIONS')) define( 'WPCF7CF_MAX_RECOMMENDED_CONDITIONS', 50 ); |
| 19 | |
| 20 | if(file_exists(WPCF7CF_PLUGIN_DIR.'/pro/pro-functions.php')) { |
| 21 | if (!defined('WPCF7CF_IS_PRO')) define( 'WPCF7CF_IS_PRO', true ); |
| 22 | } else { |
| 23 | if (!defined('WPCF7CF_IS_PRO')) define( 'WPCF7CF_IS_PRO', false ); |
| 24 | } |
| 25 | |
| 26 | if(file_exists(WPCF7CF_PLUGIN_DIR.'/tests/init.php')) { |
| 27 | require_once WPCF7CF_PLUGIN_DIR.'/tests/init.php'; |
| 28 | if (!defined('WPCF7CF_TESTMODE')) define( 'WPCF7CF_TESTMODE', true ); |
| 29 | } |
| 30 | |
| 31 | function wpcf7cf_plugin_path( $path = '' ) { |
| 32 | return path_join( WPCF7CF_PLUGIN_DIR, trim( $path, '/' ) ); |
| 33 | } |
| 34 | |
| 35 | function wpcf7cf_plugin_url( $path = '' ) { |
| 36 | $url = plugins_url( $path, WPCF7CF_PLUGIN ); |
| 37 | if ( is_ssl() && 'http:' == substr( $url, 0, 5 ) ) { |
| 38 | $url = 'https:' . substr( $url, 5 ); |
| 39 | } |
| 40 | return $url; |
| 41 | } |
| 42 | |
| 43 | require_once WPCF7CF_PLUGIN_DIR.'/Wpcf7cfMailParser.php'; |
| 44 | |
| 45 | if (WPCF7CF_IS_PRO) { |
| 46 | require_once WPCF7CF_PLUGIN_DIR.'/pro/pro-functions.php'; |
| 47 | } |
| 48 | |
| 49 | require_once WPCF7CF_PLUGIN_DIR.'/tg_pane_group.php'; |
| 50 | require_once WPCF7CF_PLUGIN_DIR.'/cf7cf.php'; |
| 51 | require_once WPCF7CF_PLUGIN_DIR.'/wpcf7cf-options.php'; |
| 52 | |
| 53 | if (WPCF7CF_IS_PRO) { |
| 54 | require_once WPCF7CF_PLUGIN_DIR.'/pro/update.php'; |
| 55 | } |