Diff: STRATO-apps/wordpress_03/app/wp-content/plugins/paid-memberships-pro/adminpages/wizard/done.php
Keine Baseline-Datei – Diff nur gegen leer.
1
-
1
+
<?php
2
+
$site_type = get_option( 'pmpro_site_type' );
3
+
4
+
$addon_manager = PMPro_AddOns::instance();
5
+
6
+
if ( empty( $site_type ) ) {
7
+
$site_type = 'general';
8
+
}
9
+
// Get Add On recommendations based on site type.
10
+
$addon_cats = $addon_manager->get_addon_categories();
11
+
if ( ! empty( $addon_cats[$site_type] ) && $addon_cats[$site_type] ) {
12
+
$addon_slug_list = $addon_cats[$site_type];
13
+
shuffle( $addon_slug_list );
14
+
$addon_slug_list = array_slice( $addon_slug_list, 0, 6 );
15
+
} else {
16
+
$addon_slug_list = $addon_cats['popular'];
17
+
shuffle( $addon_slug_list );
18
+
$addon_slug_list = array_slice( $addon_slug_list, 0, 6 );
19
+
}
20
+
21
+
$addon_list = array();
22
+
foreach ( $addon_slug_list as $addon_slug ) {
23
+
$addon = $addon_manager->get_addon_by_slug( $addon_slug );
24
+
if ( ! is_array( $addon ) ) {
25
+
continue;
26
+
}
27
+
$addon_list[] = $addon;
28
+
}
29
+
30
+
// Did they choose collect payments? If so, show a nudge to complete the gateway setup.
31
+
$configure_payment = get_option( 'pmpro_wizard_collect_payment' );
32
+
33
+
$site_types = pmpro_get_site_types();
34
+
$site_type_hubs = pmpro_get_site_type_hubs();
35
+
?>
36
+
<div class="pmpro-wizard__step pmpro-wizard__step-4">
37
+
<div class="pmpro-wizard__step-header">
38
+
<h2><?php esc_html_e( 'Setup Complete', 'paid-memberships-pro' ); ?></h2>
39
+
<p><strong><?php esc_html_e( 'Congratulations!', 'paid-memberships-pro' ); ?></strong> <a href="<?php echo esc_url( admin_url( '/admin.php?page=pmpro-membershiplevels' ) ); ?>"><?php esc_html_e( 'Your membership site is ready.', 'paid-memberships-pro' ); ?></a></p>
40
+
</div>
41
+
<div class="pmpro-wizard__field"> <!-- Recommended icons -->
42
+
<h3 class="pmpro-wizard__section-title"><?php esc_html_e( "What's next?", 'paid-memberships-pro' ); ?></h3>
43
+
<p>
44
+
<?php
45
+
if ( isset( $site_types[ $site_type ] ) && isset( $site_type_hubs[ $site_type ] ) ) {
46
+
// Add UTM parameters to the site type hub link.
47
+
$site_type_hubs[ $site_type ] = add_query_arg(
48
+
array(
49
+
'utm_source' => 'plugin',
50
+
'utm_medium' => 'setup-wizard',
51
+
'utm_campaign' => 'wizard-done',
52
+
'utm_content' => 'use-case-hub',
53
+
),
54
+
$site_type_hubs[ $site_type ]
55
+
);
56
+
57
+
// Add a redirect to the login page with the hub link.
58
+
$site_type_hub_link = add_query_arg(
59
+
array(
60
+
'redirect_to' => urlencode( $site_type_hubs[ $site_type ] )
61
+
),
62
+
'https://www.paidmembershipspro.com/login/'
63
+
);
64
+
65
+
echo sprintf( esc_html__( "In step 1, you chose the %s site type.", 'paid-memberships-pro' ), '<strong>' . esc_html( $site_types[ $site_type ] ) . '</strong>' ) . ' ';
66
+
echo sprintf(
67
+
/* translators: %s: URL to the PMPro use case hub for the chosen site type */
68
+
esc_html__( 'Check out the %s, which guides you through next steps for your unique project.', 'paid-memberships-pro' ),
69
+
'<a href="' . esc_url( $site_type_hub_link ) . '" target="_blank"><strong>' . esc_html( $site_types[ $site_type ] ) . ' ' . esc_html__( 'hub', 'paid-memberships-pro' ) . '</strong></a>'
70
+
);
71
+
}
72
+
?>
73
+
</p>
74
+
<?php
75
+
if ( ! empty( $addon_list ) ) {
76
+
?>
77
+
<p>
78
+
<?php
79
+
esc_html_e( 'Here are some recommended Add Ons for your business.', 'paid-memberships-pro' );
80
+
?>
81
+
</p>
82
+
<div class="pmpro-wizard__addons">
83
+
<?php
84
+
// Get the Add On recommendations.
85
+
foreach( $addon_list as $addon ) {
86
+
// Get the shortened name otherwise set to name.
87
+
if ( ! empty( $addon['ShortName'] ) ) {
88
+
$title = $addon['ShortName'];
89
+
} else {
90
+
$title = str_replace( 'Paid Memberships Pro - ', '', $addon['Title'] );
91
+
}
92
+
$link = $addon['PluginURI'];
93
+
$icon = $addon_manager->get_addon_icon( $addon['Slug'] );
94
+
if ( $addon['License'] == 'free' ) {
95
+
$license_label = __( 'Free Add On', 'paid-memberships-pro' );
96
+
} elseif( $addon['License'] == 'standard' ) {
97
+
$license_label = __( 'Standard Add On', 'paid-memberships-pro' );
98
+
} elseif( $addon['License'] == 'plus' ) {
99
+
$license_label = __( 'Plus Add On', 'paid-memberships-pro' );
100
+
} elseif( $addon['License'] == 'builder' ) {
101
+
$license_label = __( 'Builder Add On', 'paid-memberships-pro' );
102
+
} elseif( $addon['License'] == 'wordpress.org' ) {
103
+
$license_label = __( 'Free Plugin', 'paid-memberships-pro' );
104
+
} else {
105
+
$license_label = false;
106
+
}
107
+
?>
108
+
<div class="pmpro-wizard__addon">
109
+
<a href="<?php echo esc_url( $link ); ?>" target='_blank' rel='nofollow'>
110
+
<img src="<?php echo esc_url( $icon ); ?>" />
111
+
<div>
112
+
<span><?php echo esc_html( $title ); ?></span>
113
+
<small><?php echo esc_html( $license_label ); ?></small>
114
+
</div>
115
+
</a>
116
+
</div>
117
+
<?php
118
+
}
119
+
?>
120
+
</div> <!-- end .pmpro-wizard__addons -->
121
+
<p class="pmpro-wizard__textbreak"><?php esc_html_e( 'OR', 'paid-memberships-pro' ); ?></p>
122
+
<?php
123
+
}
124
+
?>
125
+
<div class="pmpro-wizard__col">
126
+
<p><span class="pmpro-wizard__subtitle"><?php esc_html_e( 'More functionality', 'paid-memberships-pro' ); ?></span><br>
127
+
<?php esc_html_e( 'Add more features to your membership site.', 'paid-memberships-pro' ); ?></p>
128
+
</div>
129
+
<div class="pmpro-wizard__col">
130
+
<a href="<?php echo esc_url( admin_url( 'admin.php?page=pmpro-addons' ) ); ?>" class="button button-primary button-hero"><?php esc_html_e( 'View available Add Ons', 'paid-memberships-pro' ); ?></a>
131
+
</div>
132
+
133
+
<?php if ( $configure_payment ) { ?>
134
+
<div class="pmpro-wizard__col">
135
+
<p><span class="pmpro-wizard__subtitle"><?php esc_html_e( 'Payments', 'paid-memberships-pro' ); ?></span><br>
136
+
<?php esc_html_e( 'Finish configuring your payment gateway.', 'paid-memberships-pro' ); ?></p>
137
+
</div>
138
+
<div class="pmpro-wizard__col">
139
+
<a href="<?php echo esc_url( admin_url( 'admin.php?page=pmpro-paymentsettings' ) ); ?>" class="button button-hero"><?php esc_html_e( 'View payment settings', 'paid-memberships-pro' ); ?></a>
140
+
</div>
141
+
<?php } ?>
142
+
143
+
<div class="pmpro-wizard__col">
144
+
<p>
145
+
<span class="pmpro-wizard__subtitle"><?php esc_html_e( 'Documentation', 'paid-memberships-pro' ); ?></span><br>
146
+
<?php esc_html_e( 'Not sure where to start? Take a look at our documentation.', 'paid-memberships-pro' ); ?><br />
147
+
<small><?php esc_html_e( 'Free membership account required.', 'paid-memberships-pro' ); ?></small>
148
+
</p>
149
+
</div>
150
+
<div class="pmpro-wizard__col">
151
+
<a aria-label="<?php esc_attr_e( 'View Paid Memberships Pro documentation in a new tab', 'paid-memberships-pro' ); ?>" href="https://www.paidmembershipspro.com/documentation/?utm_source=plugin&utm_medium=setup-wizard&utm_campaign=wizard-done&utm_content=view-docs" target="_blank" class="button button-hero"><?php esc_html_e( 'View docs', 'paid-memberships-pro' ); ?></a>
152
+
</div>
153
+
</div>
154
+
<script>
155
+
jQuery(document).ready(function(){
156
+
const run_confetti = () => {
157
+
setTimeout(function() {
158
+
confetti.start()
159
+
}, 1000); //start after 1 second.
160
+
setTimeout(function() {
161
+
confetti.stop()
162
+
}, 4000); //Stop after 4 seconds.
163
+
};
164
+
run_confetti();
165
+
});
166
+
</script>
167
+
</div> <!-- end pmpro-wizard__step-5 -->