-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathpage-whitelabel.html
269 lines (172 loc) · 7.72 KB
/
page-whitelabel.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
---
layout: default
title: Whitelabel
permalink: /whitelabel/
is_searchable: true
---
<section>
<div class="sui-row-with-sidenav">
<!-- Navigation -->
<div class="sui-sidenav">
<ul class="sui-vertical-tabs sui-sidenav-hide-md">
<li class="sui-vertical-tab current">
<a href="#" data-tab="about">About Whitelabel</a>
</li>
<li class="sui-vertical-tab">
<a href="#" data-tab="wpmudev-branding">WPMU DEV Branding</a>
</li>
<li class="sui-vertical-tab">
<a href="#" data-tab="footer-text">Footer Text</a>
</li>
<li class="sui-vertical-tab">
<a href="#" data-tab="documentation-links">Documentation Links</a>
</li>
</ul>
</div>
<!-- SECTION: Tabs -->
<div class="sui-box" data-tab="about">
<div class="sui-box-header">
<h3 class="sui-box-title">About Whitelabel</h3>
</div>
<div class="sui-box-body">
<p>We let our users remove the WPMU DEV branding from all our plugins and replace it with their own branding for their clients. This is done via the Whitelabel tool in the WPMU DEV Dashboard plugin. Find it under Tools -> Whitelabel.</p>
<p>We must adjust some elements in our plugins for those settings to work as expected. Each element to adjust is explained in the tabs at the left.</p>
<p>Here you can find <a href="https://bitbucket.org/hendrawankuncoro/workspace/snippets/oebRx9" target="_blank">the original instructions</a> on how to implement the whitelabel in your plugin, as well as the instructions for SUI below 2.3.18 which we don't cover in these docs (because you're not using that version anyway, right?).</p>
</div>
</div>
<div data-tab="wpmudev-branding" style="display: none;">
<div class="sui-box">
<div class="sui-box-header">
<h3 class="sui-box-title">WPMU DEV Branding</h3>
</div>
<div class="sui-box-body">
<p>This refers to all the the images that are part of our branding, like the cool super heroes you see around. These images can be hidden by this setting, and a custom image can be set for the dashboard section of each plugin.</p>
<div class="sui-box-settings-row">
<div class="sui-box-settings-col-1">
<h3 class="sui-settings-label">Hidding The Branding</h3>
</div>
<div class="sui-box-settings-col-2">
<p>Retrieve whether the branding should be hidden by applying the filter <code>wpmudev_branding_hide_branding</code>. It returns a <code>boolean</code>.<br/>If true, hide the branding. If false, display the branding.</p>
<div class="demo-code-block">
<pre class="sui-code-snippet php">
<?php
$hide_branding = apply_filters( 'wpmudev_branding_hide_branding', false );
if ( ! $hide_branding) {
echo "DISPLAY WPMUDEV DEFAULT HERO IMAGES";
}
</pre>
</div>
<p>You should do this check in every place a super hero or a WPMU DEV branding is shown, except for the footer and documentation elements which have a hook of their own.</p>
</div>
</div>
<div class="sui-box-settings-row">
<div class="sui-box-settings-col-1">
<h3 class="sui-settings-label">Replacing The Hero Image</h3>
</div>
<div class="sui-box-settings-col-2">
<p>Retrieve the custom image defined by the user by applying the filter <code>wpmudev_branding_hero_image</code>. It returns a <code>string</code>.</br>This is an optional field so the value can be empty. This custom image is used within the <a href="{{ site.baseurl }}/shared-ui/summary/" target="_blank">Summary element</a>.</p>
<div class="demo-code-block">
<pre class="sui-code-snippet php">
<?php
$custom_hero_image = apply_filters( 'wpmudev_branding_hero_image', '' );
if ( ! empty( $custom_hero_image ) ) {
echo "CHANGE WPMUDEV DEFAULT HERO IMAGE TO : " . $custom_hero_image;
}
</pre>
</div>
<p><i>Okay, I got the string. Now what?</i></p>
<p>
<label class="sui-settings-label">Rebranded!</label>
The image string <u>is not empty</u> and 'hide branding' <u>is true</u>:<br/>
1. Use the custom image you just retrieved as the background for the <code>.sui-summary-image-space</code> div. Yes, inline style is fine<br/>
2. Add <code>sui-rebranded</code> class to the <code>.sui-summary</code> div
</p>
<p>
<label class="sui-settings-label">Unbranded</label>
The image string <u>is empty</u> and 'hide branding' <u>is true</u>:<br/>
1. Add <code>sui-unbranded</code> class to the <code>.sui-summary</code> div
</p>
</div>
</div>
</div>
</div>
<h4>Rebranded example</h4>
<div class="sui-box sui-summary sui-summary-sm sui-rebranded">
<div class="sui-summary-image-space" aria-hidden="true" style="background-image: url('{{ site.baseurl }}/assets/images/guarantee-stamp.png');"></div>
<div class="sui-summary-segment">
<div class="sui-summary-details">
<span class="sui-summary-large">1</span>
<span class="sui-summary-sub">Active Form</span>
</div>
</div>
<div class="sui-summary-segment">
<ul class="sui-list">
<li>
<span class="sui-list-label">Last Submission</span>
<span class="sui-list-detail">5 minutes ago</span>
</li>
<li>
<span class="sui-list-label">Submissions in the last 30 days</span>
<span class="sui-list-detail">1000</span>
</li>
</ul>
</div>
</div>
<h4>Unbranded example</h4>
<div class="sui-box sui-summary sui-summary-sm sui-unbranded">
<div class="sui-summary-image-space" aria-hidden="true"></div>
<div class="sui-summary-segment">
<div class="sui-summary-details">
<span class="sui-summary-large">1</span>
<span class="sui-summary-sub">Active Form</span>
</div>
</div>
<div class="sui-summary-segment">
<ul class="sui-list">
<li>
<span class="sui-list-label">Last Submission</span>
<span class="sui-list-detail">5 minutes ago</span>
</li>
<li>
<span class="sui-list-label">Submissions in the last 30 days</span>
<span class="sui-list-detail">1000</span>
</li>
</ul>
</div>
</div>
</div>
<div class="sui-box" data-tab="footer-text" style="display: none;">
<div class="sui-box-header">
<h3 class="sui-box-title">Footer Text</h3>
</div>
<div class="sui-box-body">
<p>This setting modifies the text to be displayed in the <a href="{{ site.baseurl }}/shared-ui/footer/" target="_blank">Footer element.</a></p>
<p>Retrieve the text defined by the user by applying the filter <code>wpmudev_branding_hide_doc_link</code>. It returns a <code>string</code>. This is an optional field, the value can be empty.</p>
<div class="demo-code-block">
<pre class="sui-code-snippet php">
<?php
$footer_text = apply_filters( 'wpmudev_branding_footer_text', 'Made with <i>love</i> by WPMUDEV' );
echo "<footer>$footer_text</footer>";
</pre>
</div>
</div>
</div>
<div class="sui-box" data-tab="documentation-links" style="display: none;">
<div class="sui-box-header">
<h3 class="sui-box-title">Documentation Links</h3>
</div>
<div class="sui-box-body">
<p>This setting defines whether to hide the elements that link to documentation. For example, the "View documentation" button at the top right corner of every page in Forminator.</p>
<p>Retrieve whether to hide the documentation links by applying the filter <code>wpmudev_branding_hide_doc_link</code>. It returns a <code>boolean</code>. If true, hide the documentation. If false, display the documentation.</p>
<div class="demo-code-block">
<pre class="sui-code-snippet php">
<?php
$hide_doc_link = apply_filters( 'wpmudev_branding_hide_doc_link', false );
if ( ! $hide_doc_link) {
echo "HIDE WPMUDEV DOCUMENTATION LINK";
}
</pre>
</div>
</div>
</div>
</section>