updated plugin Menu Icons
version 0.13.7
This commit is contained in:
@ -173,11 +173,13 @@ class About_Us extends Abstract_Module {
|
||||
* @return array
|
||||
*/
|
||||
private function get_about_localization_data() {
|
||||
$links = isset( $this->about_data['page_menu'] ) ? $this->about_data['page_menu'] : [];
|
||||
$links = isset( $this->about_data['page_menu'] ) ? $this->about_data['page_menu'] : [];
|
||||
$product_pages = isset( $this->about_data['product_pages'] ) ? $this->about_data['product_pages'] : [];
|
||||
|
||||
return [
|
||||
'links' => $links,
|
||||
'logoUrl' => $this->about_data['logo'],
|
||||
'productPages' => $this->get_product_pages_data( $product_pages ),
|
||||
'products' => $this->get_other_products_data(),
|
||||
'homeUrl' => esc_url( home_url() ),
|
||||
'pageSlug' => $this->get_about_page_slug(),
|
||||
@ -205,6 +207,92 @@ class About_Us extends Abstract_Module {
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get product pages data.
|
||||
*
|
||||
* @param array $product_pages Product pages.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function get_product_pages_data( $product_pages ) {
|
||||
|
||||
$otter_slug = 'otter-blocks';
|
||||
$otter_plugin = [
|
||||
'status' => 'not-installed',
|
||||
];
|
||||
$otter_plugin['status'] = $this->is_plugin_installed( $otter_slug ) ? 'installed' : 'not-installed';
|
||||
$otter_plugin['status'] = $this->is_plugin_active( $otter_slug ) ? 'active' : $otter_plugin['status'];
|
||||
$otter_plugin['activationLink'] = $this->get_plugin_activation_link( $otter_slug );
|
||||
|
||||
$pages = [
|
||||
'otter-page' => [
|
||||
'name' => 'Otter Blocks',
|
||||
'hash' => '#otter-page',
|
||||
'product' => $otter_slug,
|
||||
'plugin' => $otter_plugin,
|
||||
'strings' => [
|
||||
'heading' => __( 'Build innovative layouts with Otter Blocks and Gutenberg', 'textdomain' ),
|
||||
'text' => __( 'Otter is a lightweight, dynamic collection of page building blocks and templates for the WordPress block editor.', 'textdomain' ),
|
||||
'buttons' => [
|
||||
'install_otter_free' => __( "Install Otter - It's free!", 'textdomain' ),
|
||||
'install_now' => __( 'Install Now', 'textdomain' ),
|
||||
'learn_more' => __( 'Learn More', 'textdomain' ),
|
||||
'learn_more_link' => tsdk_utmify( 'https://themeisle.com/plugins/otter-blocks/', 'otter-page', 'about-us' ),
|
||||
],
|
||||
'features' => [
|
||||
'advancedTitle' => __( 'Advanced Features', 'textdomain' ),
|
||||
'advancedDesc' => __( 'Add features such as Custom CSS, Animations & Visibility Conditions to all blocks.', 'textdomain' ),
|
||||
'fastTitle' => __( 'Lightweight and Fast', 'textdomain' ),
|
||||
'fastDesc' => __( 'Otter enhances WordPress site building experience without impacting site speed.', 'textdomain' ),
|
||||
'mobileTitle' => __( 'Mobile-Friendly', 'textdomain' ),
|
||||
'mobileDesc' => __( 'Each block can be tweaked to provide a consistent experience across all devices.', 'textdomain' ),
|
||||
],
|
||||
'details' => [
|
||||
's1Image' => $this->get_sdk_uri() . 'assets/images/otter/otter-builder.png',
|
||||
's1Title' => __( 'A Better Page Building Experience', 'textdomain' ),
|
||||
's1Text' => __( 'Otter can be used to build everything from a personal blog to an e-commerce site without losing the personal touch. Otter’s ease of use transforms basic blocks into expressive layouts in seconds.', 'textdomain' ),
|
||||
's2Image' => $this->get_sdk_uri() . 'assets/images/otter/otter-patterns.png',
|
||||
's2Title' => __( 'A New Collection of Patterns', 'textdomain' ),
|
||||
's2Text' => __( 'A New Patterns Library, containing a range of different elements in a variety of styles to help you build great pages. All of your website’s most important areas are covered: headers, testimonials, pricing tables, sections and more.', 'textdomain' ),
|
||||
's3Image' => $this->get_sdk_uri() . 'assets/images/otter/otter-library.png',
|
||||
's3Title' => __( 'Advanced Blocks', 'textdomain' ),
|
||||
's3Text' => __( 'Enhance your website’s design with powerful blocks, like the Add to Cart, Business Hours, Review Comparison, and dozens of WooCommerce blocks.', 'textdomain' ),
|
||||
],
|
||||
'testimonials' => [
|
||||
'heading' => __( 'Trusted by more than 300K website owners', 'textdomain' ),
|
||||
'users' => [
|
||||
[
|
||||
'avatar' => 'https://mllj2j8xvfl0.i.optimole.com/cb:3970~373ad/w:80/h:80/q:mauto/https://themeisle.com/wp-content/uploads/2021/05/avatar-03.png',
|
||||
'name' => 'Michael Burry',
|
||||
'text' => 'Loved the collection of blocks. If you want to create nice Gutenberg Pages, this plugin will be very handy and useful.',
|
||||
],
|
||||
[
|
||||
'avatar' => 'https://mllj2j8xvfl0.i.optimole.com/cb:3970~373ad/w:80/h:80/q:mauto/https://themeisle.com/wp-content/uploads/2022/04/avatar-04.png',
|
||||
'name' => 'Maria Gonzales',
|
||||
'text' => 'I am very satisfied with Otter – a fantastic collection of blocks. And the plugin is perfectly integrated with Gutenberg and complete enough for my needs. ',
|
||||
],
|
||||
[
|
||||
'avatar' => 'https://mllj2j8xvfl0.i.optimole.com/cb:3970~373ad/w:80/h:80/q:mauto/https://themeisle.com/wp-content/uploads/2022/04/avatar-05.png',
|
||||
'name' => 'Florian Henckel',
|
||||
'text' => 'Otter Blocks work really well and I like the customization options. Easy to use and format to fit in with my site theme – and I’ve not encountered any compatibility or speed issues.',
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
return array_filter(
|
||||
$pages,
|
||||
function ( $page_data, $page_key ) use ( $product_pages ) {
|
||||
return in_array( $page_key, $product_pages, true ) &&
|
||||
isset( $page_data['plugin']['status'] ) &&
|
||||
$page_data['plugin']['status'] === 'not-installed';
|
||||
},
|
||||
ARRAY_FILTER_USE_BOTH
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get products data.
|
||||
*
|
||||
|
Reference in New Issue
Block a user