= 4.7 ) { $get_locale = get_user_locale(); } // Traditional WordPress plugin locale filter $locale = apply_filters( 'plugin_locale', $get_locale, 'accept-authorize-net-payments-using-contact-form-7' ); $mofile = sprintf( '%1$s-%2$s.mo', 'accept-authorize-net-payments-using-contact-form-7', $locale ); // Setup paths to current locale file $mofile_global = WP_LANG_DIR . '/plugins/' . basename( CF7ADN_DIR ) . '/' . $mofile; if ( file_exists( $mofile_global ) ) { // Look in global /wp-content/languages/plugin-name folder load_textdomain( 'accept-authorize-net-payments-using-contact-form-7', $mofile_global ); } else { // Load the default language files load_plugin_textdomain( 'accept-authorize-net-payments-using-contact-form-7', false, $cf7adn_lang_dir ); } } function action__setup_theme() { if ( is_admin() ) { CF7ADN()->admin = new CF7ADN_Admin; CF7ADN()->admin->action = new CF7ADN_Admin_Action; CF7ADN()->admin->filter = new CF7ADN_Admin_Filter; } else { CF7ADN()->front = new CF7ADN_Front; CF7ADN()->front->action = new CF7ADN_Front_Action; CF7ADN()->front->filter = new CF7ADN_Front_Filter; } CF7ADN()->lib = new CF7ADN_Lib; } function action__wpcf7_admin_init() { $tag_generator = WPCF7_TagGenerator::get_instance(); $tag_generator->add( 'authorize', __( 'Authorize.Net', 'accept-authorize-net-payments-using-contact-form-7' ), array( $this, 'wpcf7_tag_generator_authorize_net' ) ); } /** * Load Text Domain * This gets the plugin ready for translation */ function action__init() { /* Initialize backend tags */ add_action( 'wpcf7_admin_init', array( $this, 'action__wpcf7_admin_init' ), 15, 0 ); add_action('wp_ajax_cf7_cf7adn_validation', array( $this, 'ajax__cf7_cf7adn_validation' ) ); add_action('wp_ajax_nopriv_cf7_cf7adn_validation', array( $this, 'ajax__cf7_cf7adn_validation' ) ); flush_rewrite_rules(); //phpcs:ignore /** * Post Type: Authorize.Net Add-on. */ $labels = array( 'name' => __( 'Authorize.Net Add-on', 'accept-authorize-net-payments-using-contact-form-7' ), 'singular_name' => __( 'Authorize.Net Add-on', 'accept-authorize-net-payments-using-contact-form-7' ), ); $args = array( 'label' => __( 'Authorize.Net Add-on', 'accept-authorize-net-payments-using-contact-form-7' ), 'labels' => $labels, 'description' => '', 'public' => false, 'publicly_queryable' => false, 'show_ui' => true, 'delete_with_user' => false, 'show_in_rest' => false, 'rest_base' => '', 'has_archive' => false, 'show_in_menu' => 'wpcf7', 'show_in_nav_menus' => false, 'exclude_from_search' => true, 'capability_type' => 'post', 'capabilities' => array( 'read' => true, 'create_posts' => false, 'publish_posts' => false, ), 'map_meta_cap' => true, 'hierarchical' => false, 'rewrite' => false, 'query_var' => false, 'supports' => array( 'title' ), ); register_post_type( 'cf7adn_data', $args ); } function action__admin_notices_deactive() { echo '
' . sprintf( /* translators: Contact Form 7 - Authorize.NET Add-on */ __( '
Contact Form 7 is required to use %s.
', 'contact-form-7-paypal-extension' ), //phpcs:ignore 'Contact Form 7 - Authorize.NET Add-on' ) . '' . '