Skip to content

Commit aa2ab61

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 24f7038 + 62b0657 commit aa2ab61

25 files changed

Lines changed: 2304 additions & 233 deletions

README.txt

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ Contributors: xecdev, klakurka
33
Donate link: https://donate.paybutton.org/
44
Tags: paywall, monetization, donation, crypto, ecash
55
Requires at least: 5.0
6-
Tested up to: 6.7
6+
Tested up to: 6.8
77
Requires PHP: 7.0
8-
Stable tag: 2.2.0
8+
Stable tag: 3.2.0
9+
PayButton Client: 4.1.0
10+
PayButton Client URI: https://github.com/PayButton/paybutton
911
License: MIT
1012
License URI: https://github.com/PayButton/wordpress-plugin/blob/master/LICENSE
1113

@@ -48,15 +50,54 @@ No – PayButton’s no-signup approach uses session tracking and database entri
4850
=03. Can I customize the appearance of the paywall?=
4951
Absolutely, the admin dashboard allows you to modify button texts, pricing, color schemes, and more to match your theme.
5052

53+
=04. Will PayButton’s cookies break page caching?=
54+
No. PayButton sets two HMAC-signed paybutton_user_wallet_address and paybutton_paid_content to track user wallet address and unlocked content. Cookies only get updated (and send a Set-Cookie header) when their value actually changes, so full-page caches (e.g. WP Super Cache, W3 Total Cache) and server caches (Nginx, Varnish) remain valid.
55+
5156
== Screenshots ==
5257
1. Admin Dashboard Overview
5358
2. Frontend PayButton Paywall in Action
5459
3. Customizable PayButton Paywall Settings
5560
4. PayButton Paywall Shortcode
5661
5. Transaction Tracking and Analytics
62+
6. PayButton Generator
63+
64+
== External services ==
65+
66+
- PayButton websocket
67+
This plugin connects to the PayButton WebSocket, a service that monitors blockchain transactions. It is used to detect payments made to the PayButton/Widget address in real time. The plugin uses the provided address to establish a connection and begins listening for events emitted when new transactions are detected. This service is provided by PayButton: [terms of use](https://github.com/PayButton/paybutton-server/blob/master/TERMS.md), [privacy policy](https://github.com/PayButton/paybutton-server/blob/master/PRIVACY.md).
68+
69+
- PayButton API
70+
This plugin communicates with the PayButton API to fetch information about the address and its transactions. It provides data such as the transaction price and the address balance, which are used by the widget and the button. This service is also provided by PayButton: [terms of use](https://github.com/PayButton/paybutton-server/blob/master/TERMS.md), [privacy policy](https://github.com/PayButton/paybutton-server/blob/master/PRIVACY.md).
71+
72+
- SideShift.AI API
73+
The integration uses the SideShift API to enable the button or widget to accept payments in a different currency than the one being received. This service is provided by SideShift.AI: [terms of use](https://sideshift.ai/legal).
5774

5875
== Changelog ==
5976

77+
= 3.2.0 (2025/05/21) =
78+
* Sanitized and validated cookies and data.
79+
* Fixed nonce logic in Content & Customers page.
80+
81+
= 3.1.0 (2025/05/10) =
82+
* Added nonce verification and user capability checks for enhanced security.
83+
* Added paybutton_ prefix to all generic option names to avoid naming conflicts.
84+
* Escaped variables properly when echoed to prevent XSS vulnerabilities.
85+
* Replaced session usage with cookies for improved caching compatibility and plugin support.
86+
* Updated the plugin's README file with latest plugin details and usage instructions.
87+
88+
= 3.0.0 (2025/03/21) =
89+
* Enhanced admin wallet address configuration flow.
90+
* Implemented wallet address validation feature using the ecashaddrjs library.
91+
* Refactored all eCash related identifiers (variables, CSS classes, DB fields) to generic terms.
92+
* Improved the styling of the Unlocked Content Indicator with added customization support.
93+
* Added native support for a streamlined PayButton generator that lets WordPress admins easily create and embed custom XEC/BCH donation buttons (e.g., "donate," "buy me a coffee") via shortcode.
94+
* Improved admin dashboard UI/UX.
95+
96+
= 2.3.0 (2025/03/04) =
97+
* Created a new paybutton-admin.css file to centralize admin styles.
98+
* Updated table to auto-size columns.
99+
* Refactored dashboard.php and other admin templates to remove inline CSS, replacing them with appropriate CSS classes.
100+
60101
= 2.2.0 (2025/02/28) =
61102
* The PayButton core JavaScript file is now bundled with the plugin.
62103
* The wp-admin?payment_trigger AJAX endpoint is now dynamically generated.
@@ -81,6 +122,6 @@ Absolutely, the admin dashboard allows you to modify button texts, pricing, colo
81122

82123
== Upgrade Notice ==
83124

84-
= 2.2.0 =
85-
Upgrade to version 2.2.0 for improved compatibility and reliability.
125+
= 3.2.0 =
126+
Upgrade to version 3.2.0 for improved compatibility and reliability.
86127
=======

assets/css/paybutton-admin.css

Lines changed: 298 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,298 @@
1+
/* paybutton-admin.css */
2+
3+
/* ------------------------------
4+
Dashboard page styles
5+
------------------------------ */
6+
7+
/* Adds a blue top-border below the admin-bar*/
8+
.pb-header {
9+
margin-top: 0 !important;
10+
box-sizing: border-box;
11+
}
12+
13+
.pb-header::before {
14+
content: "";
15+
position: absolute;
16+
top: 0 !important;
17+
left: -20px !important;
18+
right: -0px !important;
19+
height: 5px !important;
20+
background: #0074C2;
21+
}
22+
23+
.paybutton-logo {
24+
max-width: 250px;
25+
height: 40px;
26+
margin-top: 0.8rem;
27+
padding-bottom: 0px;
28+
}
29+
30+
/* Container for the dashboard buttons */
31+
.paybutton-dashboard-buttons {
32+
display: flex;
33+
gap: 2rem !important;
34+
margin-top: 2rem !important;
35+
flex-wrap: wrap;
36+
}
37+
38+
/* Each dashboard button box */
39+
.paybutton-dashboard-button {
40+
flex: 1;
41+
min-width: 250px !important;
42+
border: 1px solid #ddd;
43+
padding: 2rem !important;
44+
text-align: center;
45+
}
46+
47+
/* Disabled button style (e.g., for "Coming soon") */
48+
.paybutton-dashboard-button.disabled {
49+
opacity: 0.5;
50+
}
51+
52+
/* The link inside a button */
53+
.paybutton-dashboard-link {
54+
font-size: 1.2em !important;
55+
padding: 2rem !important;
56+
display: inline-block;
57+
width: 100%;
58+
}
59+
60+
/* For text inside a button */
61+
.paybutton-dashboard-text {
62+
font-size: 1.2em;
63+
padding: 2rem;
64+
margin: 0;
65+
}
66+
67+
/* Container for the icons block */
68+
.paybutton-dashboard-icons {
69+
margin-top: 2rem;
70+
text-align: left;
71+
}
72+
73+
/* Each icon link */
74+
.paybutton-dashboard-icon-link {
75+
margin-right: 1rem;
76+
text-decoration: none;
77+
outline: none;
78+
}
79+
80+
/* Icon images */
81+
.paybutton-dashboard-icon {
82+
border: none;
83+
}
84+
85+
/* ------------------------------
86+
Button Generator Page Styles
87+
------------------------------ */
88+
.pb-menu-new{
89+
color: #FF21D0;
90+
vertical-align: super;
91+
font-size: 9px;
92+
font-weight: 600;
93+
padding-left: 2px;
94+
}
95+
96+
.pb-generator-container {
97+
display: flex;
98+
gap: 2rem;
99+
}
100+
101+
.pb-generator-form {
102+
flex: 1;
103+
max-width: 400px;
104+
}
105+
106+
.pb-generator-form label {
107+
font-weight: bold;
108+
display: block;
109+
margin-bottom: 0.5rem;
110+
}
111+
112+
.pb-generator-input {
113+
width: 100%;
114+
box-sizing: border-box;
115+
padding: 0.5rem;
116+
margin-bottom: 1rem;
117+
}
118+
119+
.pb-generator-preview {
120+
flex: 1;
121+
}
122+
123+
.pb-generator-preview #pbGenPreview {
124+
background-color: #fff;
125+
border: 1px solid #ddd;
126+
border-radius: 4px;
127+
padding: 1rem;
128+
min-height: 80px;
129+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
130+
display: flex;
131+
justify-content: center;
132+
align-items: center;
133+
font-size: 1rem;
134+
color: #333;
135+
transition: box-shadow 0.3s ease, border-color 0.3s ease;
136+
}
137+
138+
.pb-generator-preview #pbGenPreview:hover {
139+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
140+
border-color: #0074C2;
141+
}
142+
143+
#pbGenShortcode {
144+
font-family: monospace;
145+
font-size: 0.8rem;
146+
line-height: 1.5;
147+
color: #333;
148+
background-color: #f9f9f9;
149+
border: 1px solid #ddd;
150+
border-radius: 4px;
151+
padding: 1rem;
152+
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
153+
width: 100%;
154+
resize: vertical;
155+
word-break: break-all;
156+
}
157+
158+
#pbGenToValidationResult{
159+
margin-top: 0px;
160+
}
161+
162+
/* Grouped Colors */
163+
.pb-generator-colors {
164+
display: flex;
165+
gap: 1rem;
166+
align-items: center;
167+
margin-top: 1rem;
168+
}
169+
170+
.pb-generator-colors .pb-generator-color {
171+
display: flex;
172+
flex-direction: column;
173+
align-items: center;
174+
}
175+
176+
.pb-generator-widget {
177+
display: inline-flex;
178+
align-items: center;
179+
gap: 0.5rem;
180+
margin-top: 1rem;
181+
}
182+
183+
.pb-generator-widget input[type="checkbox"] {
184+
margin-left: 0.7rem;
185+
}
186+
187+
/* Simple custom tooltip styling */
188+
.pbTooltip {
189+
position: absolute;
190+
cursor: help;
191+
margin-left: 0.3rem;
192+
}
193+
194+
.pbTooltip::before {
195+
padding: 5px 3px;
196+
}
197+
198+
.pbTooltip::after {
199+
content: '';
200+
left: 100%;
201+
top: 50%;
202+
transform: translateY(-50%);
203+
opacity: 0;
204+
transition: opacity 0.2s ease-in-out;
205+
pointer-events: none;
206+
z-index: 999999; /* ensure it stays above WP admin menu */
207+
max-width: 300px;
208+
background: #0074C2;
209+
color: #fff;
210+
padding: 5px 2px;
211+
border-radius: 3px;
212+
white-space: normal;
213+
overflow-wrap: break-word;
214+
text-align: center;
215+
}
216+
217+
.pbTooltip:hover::after {
218+
content: attr(data-tooltip);
219+
opacity: 1;
220+
padding: 5px 10px;
221+
}
222+
223+
.shortcode-note {
224+
font-size: 0.9em;
225+
color: #555;
226+
margin-top: 0.5rem;
227+
font-style: italic;
228+
}
229+
/* ------------------------------
230+
Paywall Settings page styles
231+
------------------------------ */
232+
#adminAddressValidationResult {
233+
margin-left: 10px;
234+
}
235+
236+
/* ------------------------------
237+
Customers and Content tables
238+
------------------------------ */
239+
table.widefat.fixed.striped {
240+
table-layout: auto !important;
241+
width: 100% !important;
242+
}
243+
244+
table.widefat.fixed.striped th,
245+
table.widefat.fixed.striped td {
246+
white-space: nowrap;
247+
overflow: visible;
248+
}
249+
250+
/* ------------------------------
251+
Utility class for paragrah margin-top
252+
------------------------------ */
253+
.pb-paragraph-margin-top {
254+
margin-top: 1rem;
255+
}
256+
257+
/* ------------------------------
258+
Utility - Clipboard
259+
------------------------------ */
260+
.shortcode-container {
261+
position: relative;
262+
margin-bottom: 1rem;
263+
}
264+
265+
.shortcode-container textarea {
266+
width: 100%;
267+
box-sizing: border-box;
268+
}
269+
270+
/* The overlay covers the textarea but is hidden by default */
271+
.copy-overlay {
272+
position: absolute;
273+
top: 0;
274+
left: 0;
275+
right: 0;
276+
bottom: 0;
277+
background: rgba(66, 123, 236, 0.7);
278+
display: flex;
279+
align-items: center;
280+
justify-content: center;
281+
font-size: 1rem;
282+
color: #f6f7f7;
283+
cursor: pointer;
284+
transition: opacity 0.3s ease;
285+
opacity: 0;
286+
pointer-events: none;
287+
}
288+
289+
/* Show the overlay when hovering over the container */
290+
.shortcode-container:hover .copy-overlay {
291+
opacity: 1;
292+
pointer-events: auto;
293+
}
294+
295+
.copy-overlay .overlay-text {
296+
text-align: center;
297+
font-weight:bold;
298+
}

0 commit comments

Comments
 (0)