| 1 |
<?php |
| 2 |
require_once plugin_dir_path( __FILE__ ) . 'admin/cf7-post-admin-table.php'; |
| 3 |
|
| 4 |
//reset the cf7 admin table |
| 5 |
$cf7_admin = Cf7_WP_Post_Table::set_table(); |
| 6 |
if(!$cf7_admin->hooks()){ |
| 7 |
add_action( 'admin_enqueue_scripts', array($cf7_admin , 'enqueue_styles')); |
| 8 |
add_action( 'admin_enqueue_scripts', array($cf7_admin , 'enqueue_script')); |
| 9 |
//add_action( 'admin_enqueue_scripts', array($this, 'enqueue_scripts') )); |
| 10 |
//modify the CF7 post type |
| 11 |
// add_action('init', array( $cf7_admin, 'modify_cf7_post_type' ) , 20 ); |
| 12 |
//cf7 sub-menu |
| 13 |
add_action('admin_menu', array( $cf7_admin, 'add_cf7_sub_menu' )); |
| 14 |
add_filter( 'custom_menu_order', array( $cf7_admin, 'change_cf7_submenu_order' ),1000); |
| 15 |
//modify the cf7 list table columns |
| 16 |
add_filter('manage_wpcf7_contact_form_posts_columns' , array( $cf7_admin, 'modify_cf7_list_columns' )); |
| 17 |
add_action('manage_wpcf7_contact_form_posts_custom_column', array( $cf7_admin, 'populate_custom_column') ,10,2 ); |
| 18 |
add_filter('post_row_actions', array( $cf7_admin, 'modify_cf7_list_row_actions') , 10, 2 ); |
| 19 |
//change the 'Add New' button link. |
| 20 |
//contact form 7 taxonomy type |
| 21 |
add_action('init', array( $cf7_admin, 'register_cf7_taxonomy' ) , 20 ); |
| 22 |
|
| 23 |
add_action( 'quick_edit_custom_box', array( $cf7_admin, 'quick_edit_box'), 100, 2 ); |
| 24 |
//cf7-form shortcode |
| 25 |
add_shortcode( 'cf7-form', array( $cf7_admin, 'shortcode') ); |
| 26 |
add_shortcode( 'cf7form', array( $cf7_admin, 'shortcode') ); |
| 27 |
/** @since 2.6.0 */ |
| 28 |
add_action('admin_footer', array($cf7_admin, 'update_form_highlight')); |
| 29 |
} |
| 30 |
|