Metabox
2 weeks ago
views
2 weeks ago
FSIE.php
2 weeks ago
FSPro.php
2 weeks ago
FSWalkthrough.php
2 weeks ago
FSWalkthroughPL.php
2 weeks ago
Metabox.php
2 weeks ago
Video.php
2 weeks ago
WooCommerceABC.php
2 weeks ago
WooCommerceABCPL.php
2 weeks ago
FSIE.php
44 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Class FSIE. |
| 4 | * |
| 5 | * @package WPDesk\FS\Info |
| 6 | */ |
| 7 | |
| 8 | namespace WPDesk\FS\Info; |
| 9 | |
| 10 | /** |
| 11 | * FSIE metabox. |
| 12 | */ |
| 13 | class FSIE extends Metabox { |
| 14 | /** |
| 15 | * WooCommerceABC constructor. |
| 16 | */ |
| 17 | public function __construct() { |
| 18 | $title = __( 'Extend the Flexible Shipping capabilities with functional add-ons', 'flexible-shipping' ); |
| 19 | |
| 20 | parent::__construct( 'fsie', $title, $this->get_body_content(), $this->get_footer_content() ); |
| 21 | } |
| 22 | |
| 23 | /** |
| 24 | * @return string |
| 25 | */ |
| 26 | private function get_body_content() { |
| 27 | ob_start(); |
| 28 | |
| 29 | include 'views/fsie.php'; |
| 30 | |
| 31 | return ob_get_clean(); |
| 32 | } |
| 33 | |
| 34 | /** |
| 35 | * @return string |
| 36 | */ |
| 37 | private function get_footer_content() { |
| 38 | $url = get_locale() === 'pl_PL' ? 'https://octol.io/fs-info-addons-pl' : 'https://octol.io/fs-info-addons'; |
| 39 | |
| 40 | return '<a class="oct-metabox-btn" href="' . esc_url( $url ) . '" target="_blank">' . __( 'Buy Add-ons', 'flexible-shipping' ) . '</a>'; |
| 41 | } |
| 42 | |
| 43 | } |
| 44 |