| @@ 97-118 (lines=22) @@ | ||
| 94 | * |
|
| 95 | * @return void |
|
| 96 | */ |
|
| 97 | private function setup_hooks() { |
|
| 98 | if ( ! $this->is_donations_import_page() ) { |
|
| 99 | return; |
|
| 100 | } |
|
| 101 | ||
| 102 | // Do not render main import tools page. |
|
| 103 | remove_action( 'give_admin_field_tools_import', array( 'Give_Settings_Import', 'render_import_field', ) ); |
|
| 104 | ||
| 105 | // Render donation import page |
|
| 106 | add_action( 'give_admin_field_tools_import', array( $this, 'render_page' ) ); |
|
| 107 | ||
| 108 | // Print the HTML. |
|
| 109 | add_action( 'give_tools_import_core_settings_form_start', array( $this, 'html' ), 10 ); |
|
| 110 | ||
| 111 | // Run when form submit. |
|
| 112 | add_action( 'give-tools_save_import', array( $this, 'save' ) ); |
|
| 113 | ||
| 114 | add_action( 'give-tools_update_notices', array( $this, 'update_notices' ), 11, 1 ); |
|
| 115 | ||
| 116 | // Used to add submit button. |
|
| 117 | add_action( 'give_tools_import_core_settings_form_end', array( $this, 'submit' ), 10 ); |
|
| 118 | } |
|
| 119 | ||
| 120 | /** |
|
| 121 | * Update notice |
|
| @@ 98-120 (lines=23) @@ | ||
| 95 | * |
|
| 96 | * @return void |
|
| 97 | */ |
|
| 98 | private function setup_hooks() { |
|
| 99 | if ( ! $this->is_donations_import_page() ) { |
|
| 100 | return; |
|
| 101 | } |
|
| 102 | ||
| 103 | // Do not render main import tools page. |
|
| 104 | remove_action( 'give_admin_field_tools_import', array( 'Give_Settings_Import', 'render_import_field', ) ); |
|
| 105 | ||
| 106 | ||
| 107 | // Render donation import page |
|
| 108 | add_action( 'give_admin_field_tools_import', array( $this, 'render_page' ) ); |
|
| 109 | ||
| 110 | // Print the HTML. |
|
| 111 | add_action( 'give_tools_import_donations_form_start', array( $this, 'html' ), 10 ); |
|
| 112 | ||
| 113 | // Run when form submit. |
|
| 114 | add_action( 'give-tools_save_import', array( $this, 'save' ) ); |
|
| 115 | ||
| 116 | add_action( 'give-tools_update_notices', array( $this, 'update_notices' ), 11, 1 ); |
|
| 117 | ||
| 118 | // Used to add submit button. |
|
| 119 | add_action( 'give_tools_import_donations_form_end', array( $this, 'submit' ), 10 ); |
|
| 120 | } |
|
| 121 | ||
| 122 | /** |
|
| 123 | * Update notice |
|