PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.7.0.6
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.7.0.6
1.8.13.1 1.8.13 1.8.12.3 1.8.12.2 1.8.12.1 1.8.12 1.8.11.3 1.8.11.2 1.8.11.1 1.8.11 1.6.6 1.6.60 1.6.7 1.6.8 1.6.9 1.7.0 1.7.0.1 1.7.0.11 1.7.0.12 1.7.0.14 1.7.0.2 1.7.0.3 1.7.0.5 1.7.0.6 1.7.0.7 All 212 releases
charitable / includes / admin / views / welcome-page / page.php

page.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.7.0.6, at includes/admin/views/welcome-page/page.php

210 lines 10.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Display the Welcome page.
4 *
5 * @author WP Charitable LLC
6 * @package Charitable/Admin View/Welcome Page
7 * @since 1.0.0
8 * @version 1.6.55
9 */
10
11 wp_enqueue_style( 'charitable-admin-pages' );
12
13 require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );
14
15 $gateways = Charitable_Gateways::get_instance()->get_active_gateways_names();
16 $campaigns = wp_count_posts( 'campaign' );
17 $campaigns_count = $campaigns->publish + $campaigns->draft + $campaigns->future + $campaigns->pending + $campaigns->private;
18 $emails = charitable_get_helper( 'emails' )->get_enabled_emails_names();
19 $install = isset( $_GET['install'] ) && $_GET['install'];
20 $languages = wp_get_available_translations();
21 $locale = get_locale();
22 $language = isset( $languages[ $locale ]['native_name'] ) ? $languages[ $locale ]['native_name'] : $locale;
23 $currency = charitable_get_default_currency();
24 $currencies = charitable_get_currency_helper()->get_all_currencies();
25 $all_extensions = array(
26 'payfast' => __( 'Accept donations in South African Rand', 'charitable' ),
27 'payu-money' => __( 'Accept donations in Indian Rupees with PayUmoney', 'charitable' ),
28 'easy-digital-downloads-connect' => __( 'Collect donations with Easy Digital Downloads', 'charitable' ),
29 'recurring-donations' => __( 'Accept recurring donations', 'charitable' ),
30 'fee-relief' => __( 'Let donors cover the gateway fees', 'charitable' ),
31 'stripe' => __( 'Accept credit card donations with Stripe', 'charitable' ),
32 'authorize-net' => __( 'Collect donations with Authorize.Net', 'charitable' ),
33 'ambassadors' => __( 'Peer to peer fundraising or crowdfunding', 'charitable' ),
34 'windcave' => sprintf(
35 /* translators: %s: currency code */
36 __( 'Collect donations in %s', 'charitable' ),
37 $currencies[ $currency ]
38 ),
39 'anonymous-donations' => __( 'Let donors give anonymously', 'charitable' ),
40 'user-avatar' => __( 'Let your donors upload their own profile photo', 'charitable' ),
41 );
42
43 if ( 'en_ZA' == $locale || 'ZAR' == $currency ) {
44 $extensions = array_intersect_key( $all_extensions, array( 'payfast' => '', 'recurring-donations' => '', 'ambassadors' => '', 'fee-relief' => '' ) );
45 } elseif ( 'hi_IN' == $locale || 'INR' == $currency ) {
46 $extensions = array_intersect_key( $all_extensions, array( 'payu-money' => '', 'ambassadors' => '', 'fee-relief' => '', 'windcave' => '' ) );
47 } elseif ( in_array( $locale, array( 'en_NZ', 'ms_MY', 'ja', 'zh_HK' ) ) || in_array( $currency, array( 'NZD', 'MYR', 'JPY', 'HKD' ) ) ) {
48 $extensions = array_intersect_key( $all_extensions, array( 'recurring-donations' => '', 'stripe' => '', 'windcave' => '', 'fee-relief' => '' ) );
49 } elseif( in_array( $locale, array( 'th' ) ) || in_array( $currency, array( 'BND', 'FJD', 'KWD', 'PGK', 'SBD', 'THB', 'TOP', 'VUV', 'WST' ) ) ) {
50 $extensions = array_intersect_key( $all_extensions, array( 'windcave' => '', 'fee-relief' => '', 'ambassadors' => '', 'anonymous-donations' => '' ) );
51 } elseif ( class_exists( 'EDD' ) ) {
52 $extensions = array_intersect_key( $all_extensions, array( 'ambassadors' => '', 'easy-digital-downloads-connect' => '', 'anonymous-donations' => '', 'user-avatar' => '' ) );
53 } else {
54 $extensions = array_intersect_key( $all_extensions, array( 'recurring-donations' => '', 'stripe' => '', 'authorize-net' => '', 'fee-relief' => '' ) );
55 }
56
57
58
59
60 ?>
61 <div class="wrap about-wrap charitable-wrap">
62 <h1>
63 <strong>Charitable</strong>
64 <sup class="version"><?php echo charitable()->get_version(); ?></sup>
65 </h1>
66 <div class="badge">
67 <a href="<?php echo charitable_ga_url(
68 'https://www.wpcharitable.com',
69 urlencode( 'Welcome Page Icon'),
70 urlencode( 'Icon' ) ) ?>" target="_blank"><i class="charitable-icon charitable-icon-charitable"></i></a>
71 </div>
72 <div class="intro">
73 <?php
74
75 _e( 'Thank you for installing Charitable!', 'charitable' );
76
77 $view_pricing_url = charitable_ga_url(
78 'https://wpcharitable.com/pricing/',
79 urlencode( 'Welcome Page Sidebar Link'),
80 urlencode( 'View Pricing' )
81 );
82
83 do_action( 'charitable_maybe_show_notification' );
84
85 ?>
86 </div>
87 <hr />
88 <div class="column-left">
89 <div class="column-inside">
90 <h2><?php _e( 'The WordPress Fundraising Toolkit', 'charitable' ); ?></h2>
91 <p><?php _e( 'Charitable is everything you need to start accepting donations today. Stripe, PayPal and offline donations work right out of the box, and when your organization is ready to grow, our extensions give you the tools you need to move forward.', 'charitable' ); ?></p>
92 <?php if ( current_user_can( 'manage_charitable_settings' ) ) : ?>
93 <hr />
94 <h3><?php _e( 'Getting Started', 'charitable' ); ?></h3>
95 <ul class="checklist">
96 <?php if ( count( $gateways ) > 0 ) : ?>
97 <li class="done"><?php
98 printf(
99 _x( 'You have activated %s. <a href="%s">Change settings</a>', 'You have activated x and y. Change gateway settings.', 'charitable' ),
100 charitable_list_to_sentence_part( $gateways ),
101 admin_url( 'admin.php?page=charitable-settings&tab=gateways' )
102 ); ?>
103 </li>
104 <?php else : ?>
105 <li class="not-done"><a href="<?php echo admin_url( 'admin.php?page=charitable-settings&tab=gateways' ); ?>"><?php _e( 'You need to enable a payment gateway', 'charitable' ); ?></a></li>
106 <?php endif ?>
107 <?php if ( $campaigns_count > 0 ) : ?>
108 <li class="done"><?php
109 printf(
110 __( 'You have created your first campaign. <a href="%s">Create another one.</a>', 'charitable' ),
111 admin_url( 'post-new.php?post_type=campaign' )
112 ); ?>
113 </li>
114 <?php else : ?>
115 <li class="not-done"><a href="<?php echo admin_url( 'post-new.php?post_type=campaign' ); ?>"><?php _e( 'Create your first campaign', 'charitable' ); ?></a></li>
116 <?php endif ?>
117 <?php if ( count( $emails ) > 0 ) : ?>
118 <li class="done"><?php
119 printf(
120 _x( 'You have turned on the %s. <a href="%s">Change settings</a>', 'You have activated x and y. Change email settings.', 'charitable' ),
121 charitable_list_to_sentence_part( $emails ),
122 admin_url( 'admin.php?page=charitable-settings&tab=emails' )
123 ); ?>
124 </li>
125 <?php else : ?>
126 <li class="not-done"><a href="<?php echo admin_url( 'admin.php?page=charitable-settings&tab=emails' ); ?>"><?php _e( 'Turn on email notifications', 'charitable' ); ?></a></li>
127 <?php endif ?>
128 </ul>
129 <?php
130
131 $doc_url = charitable_ga_url(
132 'https://www.wpcharitable.com/documentation/',
133 urlencode( 'Dashboard Intro Copy Doc'),
134 urlencode( 'our documentation' )
135 );
136
137 $support_url = charitable_ga_url(
138 'https://www.wpcharitable.com/support/',
139 urlencode( 'Dashboard Intro Copy Support'),
140 urlencode( 'our support' )
141 );
142
143 ?>
144 <p style="margin-bottom: 0;"><?php
145 printf(
146 __( 'Need a hand with anything? You might find the answer in <a target="_blank" href="%s">our documentation</a>, or you can always get in touch with us via <a target="_blank" href="%s">our support page</a>.', 'charitable' ),
147 $doc_url,
148 $support_url
149 ); ?>
150 </p>
151 <?php endif ?>
152 <hr />
153 <?php if ( strpos( $locale, 'en' ) !== 0 ) : ?>
154 <h3><?php printf( _x( 'Translate Charitable into %s', 'translate Charitable into language', 'charitable' ), $language ); ?></h3>
155 <p><?php printf( __( 'You can help us translate Charitable into %s by <a target="_blank" href="https://translate.wordpress.org/projects/wp-plugins/charitable">contributing to the translation project</a>.', 'charitable' ),
156 $language
157 ); ?></p>
158 <hr />
159 <?php endif ?>
160 <h3><?php _e( 'Try Reach, a free theme designed for fundraising', 'charitable' ); ?></h3>
161 <img src="<?php echo charitable()->get_path( 'assets', false ); ?>images/reach-mockup.png" alt="<?php _e( 'Screenshot of Reach, a WordPress fundraising theme designed to complement Charitable', 'charitable' ); ?>" style="margin-bottom: 21px; float: right; margin-left: 20px;" width="336" height="166" />
162 <p><?php _e( 'We built Reach to help non-profits &amp; social entrepreneurs run beautiful online fundraising campaigns. Whether you’re creating a website for your organization’s peer-to-peer fundraising event or building an online crowdfunding platform, Reach is the perfect starting point.', 'charitable' ); ?></p>
163 <?php
164
165 $download_url = charitable_ga_url(
166 'https://www.wpcharitable.com/download-reach/',
167 urlencode( 'Dashboard Reach Download Button'),
168 urlencode('Download It Free')
169 );
170
171 $view_demo = charitable_ga_url(
172 'https://demo.wpcharitable.com/reach/',
173 urlencode( 'Dashboard Demo Reach Button'),
174 urlencode( 'View Demo')
175 );
176
177 ?>
178 <p><a href="<?php echo $download_url; ?>" class="button-primary" style="margin-right: 8px;" target="_blank"><?php _e( 'Download it free', 'charitable' ); ?></a><a href="<?php echo $view_demo; ?>" class="button-secondary" target="_blank"><?php _e( 'View demo', 'charitable' ); ?></a></p>
179 </div>
180 </div>
181 <div class="column-right">
182 <div class="bundle-promo">
183 <h2><?php _e( 'Get Charitable Pro', 'charitable' ); ?></h2>
184 <p><?php _e( 'Upgrade to Charitable Pro today and unlock access to powerful features like Fee Relief, Recurring Donations, Crowdfunding, Peer-to-Peer Fundraising Campaigns and more.', 'charitable' ); ?></p>
185
186 <p style="text-align: center;"><a href="<?php echo $view_pricing_url; ?>" class="button-primary" target="_blank" rel="noopener"><?php _e( 'Get Started with Charitable Pro', 'charitable' ); ?></a></p>
187
188 <small><em><?php _e( 'Bonus: Charitable Lite users save $100 or more off the regular price, automatically applied at checkout!', 'charitable' ); ?></em></small>
189 </div>
190 <div class="column-inside">
191 <h3><?php _e( 'Recommended Extensions', 'charitable' ); ?></h3>
192 <ul class="extensions">
193 <?php foreach ( $extensions as $extension => $description ) :
194
195 $extension_url = charitable_ga_url(
196 'https://wpcharitable.com/extensions/charitable-' . $extension,
197 urlencode( 'Recommended Extensions'),
198 $extension
199 );
200
201 ?>
202 <li class="<?php echo $extension; ?>">
203 <a href="<?php echo $extension_url; ?>" target="_blank" rel="noopener"><img src="<?php echo charitable()->get_path( 'assets', false ); ?>images/extensions/<?php echo $extension ?>.png" width="640" height="300" alt="<?php echo esc_attr( sprintf( _x( '%s banner', 'extension banner', 'charitable' ), $extension ) ); ?>" /><?php echo $description; ?></a>
204 </li>
205 <?php endforeach ?>
206 </ul>
207 </div>
208 </div>
209 </div>
210