PluginProbe
Hostinger Tools / 2.1.6
Hostinger Tools v2.1.6
3.0.77 3.0.76 3.0.75 3.0.74 3.0.73 3.0.72 3.0.71 3.0.70 3.0.69 3.0.68 3.0.67 3.0.66 1.8.1 1.8.2 1.8.3 1.9.1 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.1 2.0.4 All 108 releases
hostinger / includes / Admin / Onboarding / Steps / AddPage.php

AddPage.php in Hostinger Tools 2.1.6, at includes/Admin/Onboarding/Steps/AddPage.php

91 lines 4.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Hostinger\Admin\Onboarding\Steps;
4
5 use Hostinger\Settings;
6
7 defined( 'ABSPATH' ) || exit;
8
9 class AddPage extends OnboardingStep {
10 public function get_title(): string {
11 $website_type = Settings::get_setting( 'survey.website.type' );
12
13 switch ( $website_type ) {
14 case Settings::WEBSITE_TYPE_BUSINESS:
15 return __( 'Create a page describing your services', 'hostinger' );
16 case Settings::WEBSITE_TYPE_PORTFOLIO:
17 return __( 'Upload your portfolio projects', 'hostinger' );
18 default:
19 return __( 'Add a new page', 'hostinger' );
20 }
21 }
22
23 public function get_body(): array {
24 $website_type = Settings::get_setting( 'survey.website.type' );
25
26 switch ( $website_type ) {
27 case Settings::WEBSITE_TYPE_BUSINESS:
28 return array(
29 array(
30 'title' => __( 'Give a page a short title such as “Our Services”', 'hostinger' ),
31 'description' => __( 'Come up with a clear and concise name for the page that accurately reflects the services you provide.', 'hostinger' ),
32 ),
33 array(
34 'title' => __( 'Add the content and images that represent your services', 'hostinger' ),
35 'description' => __( 'Write a brief introduction to your business, provide an overview of your services with descriptions and benefits, and use relevant images to support your content. Keep it simple and straightforward.', 'hostinger' ),
36 ),
37 array(
38 'title' => __( 'Finalize the page', 'hostinger' ),
39 'description' => __( 'Make the page easy to read and navigate by using headings and bullet points. Include a clear call-to-action (CTA) to encourage visitors to take the next step for example, to contact you via email or contact form.', 'hostinger' ),
40 ),
41 );
42 case Settings::WEBSITE_TYPE_PORTFOLIO:
43 return array(
44 array(
45 'title' => __( 'Create a new page called “My projects”', 'hostinger' ),
46 'description' => __( 'Give your page a name (e.g. "My Portfolio"), then click the "+" button in the editor to add a new block.', 'hostinger' ),
47 ),
48 array(
49 'title' => __( 'Add a gallery block', 'hostinger' ),
50 'description' => __( 'In the block menu, search for "Gallery" and select the Gallery block. Upload the images you want to showcase in your portfolio, then adjust the layout and add captions if needed.', 'hostinger' ),
51 ),
52 array(
53 'title' => __( 'Publish your page', 'hostinger' ),
54 'description' => __( 'Once you\'re happy with your portfolio post, click the "Publish" button to make it live on your website. You can add a link to your main navigation menu or other relevant posts to make it easy for visitors to find.', 'hostinger' ),
55 ),
56 );
57 default:
58 return array(
59 array(
60 'title' => __( 'Add a new page', 'hostinger' ),
61 'description' => __( 'In the left sidebar, find the Pages menu and click on Add New button. You will see the WordPress page editor. Each paragraph, image, or video in the WordPress editor is presented as a “block” of content.', 'hostinger' ),
62 ),
63 array(
64 'title' => __( 'Add a title', 'hostinger' ),
65 'description' => __( 'Add the title of the page, for example, About. Click the Add Title text to open the text box where you will add your title. The title of your page should be descriptive of the information the page will have.', 'hostinger' ),
66 ),
67 array(
68 'title' => __( 'Add content', 'hostinger' ),
69 'description' => __( 'Content can be anything you wish, for example, text, images, videos, tables, and lots more. Click on a plus sign and choose any block you want to add to the page.', 'hostinger' ),
70 ),
71 array(
72 'title' => __( 'Publish the page', 'hostinger' ),
73 'description' => __( 'Before publishing, you can preview your created page by clicking on the Preview button. If you are happy with the result, click the Publish button.', 'hostinger' ),
74 ),
75 );
76 }
77 }
78
79 public function step_identifier(): string {
80 return 'add_page';
81 }
82
83 public function get_redirect_link(): string {
84 return admin_url( 'post-new.php?post_type=page' );
85 }
86
87 public function button_text(): string {
88 return __( 'Take me there', 'hostinger' );
89 }
90 }
91