| @@ -10,9 +10,9 @@ | ||
| 10 | 10 | <div class="metabox-holder"> |
| 11 | 11 | <div id="debug-log" class="postbox"> |
| 12 | 12 | <h2><?php esc_html_e( 'Debug Log', 'convertkit' ); ?></h2> |
| 13 | 13 | <p class="description"> |
| 14 | - <?php esc_html_e( 'Use this tool to help debug ConvertKit plugin functionality.', 'convertkit' ); ?><br /> | |
| 14 | + <?php esc_html_e( 'Use this tool to help debug Kit plugin functionality.', 'convertkit' ); ?><br /> | |
| 15 | 15 | <?php esc_html_e( 'For performance, the last 500 lines of the log are displayed. Use the Download Log option to review the full log.', 'convertkit' ); ?><br /> |
| 16 | 16 | </p> |
| 17 | 17 | |
| 18 | 18 | <textarea readonly="readonly" id="debug-log-textarea" class="large-text convertkit-monospace" rows="15"><?php echo esc_textarea( $log->read() ); ?></textarea> |
| @@ -27,16 +27,10 @@ | ||
| 27 | 27 | 'primary', |
| 28 | 28 | 'convertkit-download-debug-log', |
| 29 | 29 | false |
| 30 | 30 | ); |
| 31 | - | |
| 32 | - submit_button( | |
| 33 | - __( 'Clear log', 'convertkit' ), | |
| 34 | - 'secondary', | |
| 35 | - 'convertkit-clear-debug-log', | |
| 36 | - false | |
| 37 | - ); | |
| 38 | 31 | ?> |
| 32 | + <input type="submit" name="convertkit-clear-debug-log" id="convertkit-clear-debug-log" class="button button-secondary" value="<?php esc_attr_e( 'Clear log', 'convertkit' ); ?>" /> | |
| 39 | 33 | </p> |
| 40 | 34 | <p><?php esc_html_e( 'Log file', 'convertkit' ); ?>: <code><?php echo esc_attr( $log->get_filename() ); ?></code></p> |
| 41 | 35 | <?php |
| 42 | 36 | } |
| @@ -107,7 +101,62 @@ | ||
| 107 | 101 | </p> |
| 108 | 102 | </div><!-- .postbox --> |
| 109 | 103 | |
| 110 | 104 | <?php |
| 105 | + // Mailchimp for WordPress (MC4WP). | |
| 106 | + if ( $mc4wp->has_forms_in_posts() && $mc4wp->has_forms() && $forms->exist() ) { | |
| 107 | + ?> | |
| 108 | + <div id="import-mc4wp" class="postbox"> | |
| 109 | + <h2><?php esc_html_e( 'MC4WP: Migrate Configuration', 'convertkit' ); ?></h2> | |
| 110 | + | |
| 111 | + <p class="description"> | |
| 112 | + <?php esc_html_e( 'Automatically replace MC4WP form shortcodes with Kit forms.', 'convertkit' ); ?><br /> | |
| 113 | + </p> | |
| 114 | + | |
| 115 | + <table class="widefat striped"> | |
| 116 | + <thead> | |
| 117 | + <tr> | |
| 118 | + <th><?php esc_html_e( 'MC4WP Form', 'convertkit' ); ?></th> | |
| 119 | + <th><?php esc_html_e( 'Kit Form', 'convertkit' ); ?></th> | |
| 120 | + </tr> | |
| 121 | + </thead> | |
| 122 | + <tbody> | |
| 123 | + <?php | |
| 124 | + foreach ( $mc4wp->get_forms() as $mc4wp_form_id => $mc4wp_form_title ) { | |
| 125 | + ?> | |
| 126 | + <tr> | |
| 127 | + <td><?php echo esc_html( $mc4wp_form_title ); ?></td> | |
| 128 | + <td> | |
| 129 | + <select name="_wp_convertkit_integration_mc4wp_settings[<?php echo esc_attr( $mc4wp_form_id ); ?>]"> | |
| 130 | + <?php | |
| 131 | + foreach ( $forms->get() as $form ) { | |
| 132 | + ?> | |
| 133 | + <option value="<?php echo esc_attr( $form['id'] ); ?>"><?php echo esc_html( $form['name'] ); ?></option> | |
| 134 | + <?php | |
| 135 | + } | |
| 136 | + ?> | |
| 137 | + </select> | |
| 138 | + </td> | |
| 139 | + </tr> | |
| 140 | + <?php | |
| 141 | + } | |
| 142 | + ?> | |
| 143 | + </tbody> | |
| 144 | + </table> | |
| 145 | + | |
| 146 | + <p> | |
| 147 | + <?php | |
| 148 | + submit_button( | |
| 149 | + __( 'Migrate', 'convertkit' ), | |
| 150 | + 'primary', | |
| 151 | + 'convertkit-import-mc4wp', | |
| 152 | + false | |
| 153 | + ); | |
| 154 | + ?> | |
| 155 | + </p> | |
| 156 | + </div><!-- .postbox --> | |
| 157 | + <?php | |
| 158 | + } | |
| 159 | + | |
| 111 | 160 | wp_nonce_field( 'convertkit-settings-tools', '_convertkit_settings_tools_nonce' ); |
| 112 | 161 | ?> |
| 113 | 162 | </div><!-- .metabox-holder --> |