Επικοινωνία

$value ) ); update_option( ‘wpcf7’, $option ); } } add_action( ‘plugins_loaded’, ‘wpcf7’ ); function wpcf7() { wpcf7_load_textdomain(); WPCF7::load_modules(); /* Shortcodes */ add_shortcode( ‘contact-form-7’, ‘wpcf7_contact_form_tag_func’ ); add_shortcode( ‘contact-form’, ‘wpcf7_contact_form_tag_func’ ); } add_action( ‘init’, ‘wpcf7_init’ ); function wpcf7_init() { wpcf7_get_request_uri(); wpcf7_register_post_types(); do_action( ‘wpcf7_init’ ); } add_action( ‘admin_init’, ‘wpcf7_upgrade’ ); function wpcf7_upgrade() { $old_ver = WPCF7::get_option( ‘version’, ‘0’ ); $new_ver = WPCF7_VERSION; if ( $old_ver == $new_ver ) { return; } do_action( ‘wpcf7_upgrade’, $new_ver, $old_ver ); WPCF7::update_option( ‘version’, $new_ver ); } /* Install and default settings */ add_action( ‘activate_’ . WPCF7_PLUGIN_BASENAME, ‘wpcf7_install’ ); function wpcf7_install() { if ( $opt = get_option( ‘wpcf7’ ) ) return; wpcf7_load_textdomain(); wpcf7_register_post_types(); wpcf7_upgrade(); if ( get_posts( array( ‘post_type’ => ‘wpcf7_contact_form’ ) ) ) return; $contact_form = WPCF7_ContactForm::get_template( array( ‘title’ => sprintf( __( ‘Contact form %d’, ‘contact-form-7’ ), 1 ) ) ); $contact_form->save(); }

Advertisements

Δημιουργήστε ένα δωρεάν ιστότοπο ή ιστολόγιο στο WordPress.com.

Αρέσει σε %d bloggers: