@@ 327-332 (lines=6) @@ | ||
324 | require( plugin_dir_path( __FILE__ ) . '/../templates/admin/error.php' ); |
|
325 | } |
|
326 | ||
327 | if ( 0 === count( $this->mappings->get_fieldmaps() ) ) { |
|
328 | $url = esc_url( get_admin_url( null, 'options-general.php?page=object-sync-salesforce-admin&tab=fieldmaps' ) ); |
|
329 | $anchor = esc_html__( 'Fieldmaps tab', 'object-sync-for-salesforce' ); |
|
330 | $message = sprintf( 'No fieldmaps exist yet. Use the <a href="%s">%s</a> to map WordPress and Salesforce objects to each other.', $url, $anchor ); |
|
331 | require( plugin_dir_path( __FILE__ ) . '/../templates/admin/error.php' ); |
|
332 | } |
|
333 | ||
334 | try { |
|
335 | switch ( $tab ) { |
|
@@ 351-357 (lines=7) @@ | ||
348 | ?> |
|
349 | <p><a class="button button-primary" href="<?php echo esc_url( $this->salesforce['sfapi']->get_authorization_code() ); ?>"><?php echo esc_html__( 'Connect to Salesforce', 'object-sync-for-salesforce' ); ?></a></p> |
|
350 | <?php |
|
351 | } else { |
|
352 | $url = esc_url( get_admin_url( null, 'options-general.php?page=object-sync-salesforce-admin&tab=settings' ) ); |
|
353 | $anchor = esc_html__( 'Settings', 'object-sync-for-salesforce' ); |
|
354 | // translators: placeholders are for the settings tab link: 1) the url, and 2) the anchor text |
|
355 | $message = sprintf( esc_html__( 'Salesforce needs to be authorized to connect to this website but the credentials are missing. Use the <a href="%1$s">%2$s</a> tab to add them.', 'object-sync-salesforce' ), $url, $anchor ); |
|
356 | require_once( plugin_dir_path( __FILE__ ) . '/../templates/admin/error.php' ); |
|
357 | } |
|
358 | break; |
|
359 | case 'fieldmaps': |
|
360 | if ( isset( $get_data['method'] ) ) { |