| @@ -7,8 +7,9 @@ | ||
| 7 | 7 | |
| 8 | 8 | namespace SRFM\Admin; |
| 9 | 9 | |
| 10 | 10 | use SRFM\Inc\Traits\Get_Instance; |
| 11 | +use SRFM\Inc\Helper; | |
| 11 | 12 | |
| 12 | 13 | if ( ! defined( 'ABSPATH' ) ) { |
| 13 | 14 | exit; // Exit if accessed directly. |
| 14 | 15 | } |
| @@ -312,8 +313,10 @@ | ||
| 312 | 313 | 'plugin_version' => SRFM_VER, |
| 313 | 314 | 'global_settings_nonce' => current_user_can( 'manage_options' ) ? wp_create_nonce( 'wp_rest' ) : '', |
| 314 | 315 | 'is_pro_active' => defined( 'SRFM_PRO_VER' ), |
| 315 | 316 | 'pro_plugin_version' => defined( 'SRFM_PRO_VER' ) ? SRFM_PRO_VER : '', |
| 317 | + 'sureforms_pricing_page' => $this->get_sureforms_website_url( 'pricing' ), | |
| 318 | + 'field_spacing_vars' => Helper::get_css_vars(), | |
| 316 | 319 | ]; |
| 317 | 320 | |
| 318 | 321 | if ( class_exists( 'SRFM_PRO\Admin\Licensing' ) ) { |
| 319 | 322 | $license_active = \SRFM_PRO\Admin\Licensing::is_license_active(); |
| @@ -520,6 +523,22 @@ | ||
| 520 | 523 | $status = 'disabled'; |
| 521 | 524 | } |
| 522 | 525 | |
| 523 | 526 | return $status; |
| 527 | + } | |
| 528 | + | |
| 529 | + /** | |
| 530 | + * Get SureForms Website URL. | |
| 531 | + * | |
| 532 | + * @param string $trail The URL trail to append to SureForms website URL. The parameter should not include a leading slash as the base URL already ends with a trailing slash. | |
| 533 | + * @since 0.0.7 | |
| 534 | + * @return string | |
| 535 | + */ | |
| 536 | + public static function get_sureforms_website_url( $trail ) { | |
| 537 | + $url = SRFM_WEBSITE; | |
| 538 | + if ( ! empty( $trail ) && is_string( $trail ) ) { | |
| 539 | + $url = SRFM_WEBSITE . $trail; | |
| 540 | + } | |
| 541 | + | |
| 542 | + return esc_url( $url ); | |
| 524 | 543 | } |
| 525 | 544 | } |