Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/otter page #184

Merged
merged 6 commits into from
Aug 2, 2023
Merged

Feat/otter page #184

merged 6 commits into from
Aug 2, 2023

Conversation

preda-bogdan
Copy link
Contributor

@preda-bogdan preda-bogdan commented Jul 4, 2023

Summary

Added a new product page for Otter.
This can be added to any product by using the same filter for the About page:

add_filter( 'sample_plugin_about_us_metadata', function () {
	return [
                 // Top-level page in the dashboard sidebar
		'location'         => 'themes.php',
                 // Logo to display on the page
		'logo'             => 'https://placehold.co/200x50.jpg',
                 // Menu displayed at the top of the page - optional
		'page_menu'        => [
			[ 'text' => 'SDK GitHub Issues', 'url' => esc_url( 'https://github.com/codeinwp/themeisle-sdk/issues' ) ],
			[ 'text' => 'Themeisle', 'url' => esc_url( 'https://themeisle.com' ) ]
		],
		// Condition to show or hide the upgrade menu in the sidebar
		'has_upgrade_menu' => defined( 'SOME_CONST' ),
               // Add predefined product pages to the about page.
		'product_pages'    => [ 'otter-page' ],
		// Upgrade menu item link & text
		'upgrade_link'     => esc_url( 'https://themeisle.com/themes/neve/pricing/' ),
		'upgrade_text'     => 'Upgrade to Pro',
	];
} );

See the product_pages attribute, which can be conditionally populated with values.
Changed the filter to support the new attribute product_pages

The page will be displayed as a tab of the About us page, allowing the user to install Otter.

Screenshots

New. tab menu when filter is used (Pic 1)

image

Otter Page (Pic 2)

image

Test instructions

  1. Use the build of Neve from here: chore: register otter product page  neve#4031 to test
  2. Make sure that you don't have Otter installed
  3. Go to the About page from Neve
  4. Check that the new Product page for Otter is added as a tab. (see Pic 1)
  5. Check the Otter Product page (see Pic 2)
  6. Check that it will install the plugin when clicking on the CTA buttons from the product page
  7. Check that the Product page is not displayed anymore if Otter is Installed (and/or not active)

Closes Codeinwp/neve-pro-addon#2519.

@preda-bogdan preda-bogdan marked this pull request as ready for review July 12, 2023 14:41
@github-actions
Copy link

github-actions bot commented Jul 12, 2023

Plugin build for e45753d is ready 🛎️!

@cristian-ungureanu cristian-ungureanu merged commit b501b3b into development Aug 2, 2023
4 checks passed
@cristian-ungureanu cristian-ungureanu deleted the feat/otter_page branch August 2, 2023 11:23
@pirate-bot
Copy link
Contributor

🎉 This PR is included in version 3.3.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Indicate that an issue has been resolved and released in a particular version of the product.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants