Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions includes/class-paybutton-public.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class PayButton_Public {
public function __construct() {
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_public_assets' ) );
add_action( 'wp_body_open', array( $this, 'output_sticky_header' ) );
add_shortcode( 'paywalled_content', array( $this, 'paywalled_content_shortcode' ) );
add_shortcode( 'paywalled_content', array( $this, 'paybutton_paywall_shortcode' ) );
add_shortcode( 'paybutton_profile', array( $this, 'profile_shortcode' ) );
add_filter( 'comments_open', array( $this, 'filter_comments_open' ), 999, 2 );
add_action( 'pre_get_comments', array( $this, 'filter_comments_query' ), 999 );
Expand Down Expand Up @@ -137,7 +137,7 @@ public function output_sticky_header() {
* Outputs a `div` with encoded PayButton config for front-end handling.
*/

public function paywalled_content_shortcode( $atts, $content = null ) {
public function paybutton_paywall_shortcode( $atts, $content = null ) {
if ( ! is_singular() || ! in_the_loop() ) {
return '';
}
Expand Down
8 changes: 4 additions & 4 deletions templates/admin/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<p><strong>Total Content Unlocks: </strong><?php echo esc_html( intval( $total_unlocks ) ); ?></p>
<p><strong>Total Earned (XEC):</strong> <?php echo esc_html( number_format( $grand_total_earned, 2 ) ); ?></p>
<?php
function sort_link_content( $col, $label, $orderby, $order, $base_url ) {
function paybutton_sort_content_table( $col, $label, $orderby, $order, $base_url ) {
$arrow = '';
$next_order = 'ASC';
if ( $orderby === $col ) {
Expand All @@ -22,9 +22,9 @@ function sort_link_content( $col, $label, $orderby, $order, $base_url ) {
<table class="widefat fixed striped">
<thead>
<tr>
<th><?php echo wp_kses_post( sort_link_content( 'title', 'Content Title', $orderby, $order, $base_url ) ); ?></th>
<th><?php echo wp_kses_post( sort_link_content( 'unlock_count', 'Unlocks', $orderby, $order, $base_url ) ); ?></th>
<th><?php echo wp_kses_post( sort_link_content( 'total_earned', 'Total Earned (XEC)', $orderby, $order, $base_url ) ); ?></th>
<th><?php echo wp_kses_post( paybutton_sort_content_table( 'title', 'Content Title', $orderby, $order, $base_url ) ); ?></th>
<th><?php echo wp_kses_post( paybutton_sort_content_table( 'unlock_count', 'Unlocks', $orderby, $order, $base_url ) ); ?></th>
<th><?php echo wp_kses_post( paybutton_sort_content_table( 'total_earned', 'Total Earned (XEC)', $orderby, $order, $base_url ) ); ?></th>
</tr>
</thead>
<tbody>
Expand Down
10 changes: 5 additions & 5 deletions templates/admin/customers.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<p><strong>Total Customers:</strong> <?php echo intval( $total_customers ); ?></p>
<p><strong>Total Earned (XEC):</strong> <?php echo number_format( $grand_total_xec, 2 ); ?> XEC</p>
<?php
function sort_link( $col, $label, $orderby, $order, $base_url ) {
function paybutton_sort_customers_table( $col, $label, $orderby, $order, $base_url ) {
$next_order = 'ASC';
$arrow = '';
if ( $orderby === $col ) {
Expand All @@ -79,10 +79,10 @@ function sort_link( $col, $label, $orderby, $order, $base_url ) {
<table class="widefat fixed striped">
<thead>
<tr>
<th><?php echo wp_kses_post( sort_link( 'ecash_address', 'Customer', $orderby, $order, $base_url ) ); ?></th>
<th><?php echo wp_kses_post( sort_link( 'unlocked_count', 'Unlocked Content', $orderby, $order, $base_url ) ); ?></th>
<th><?php echo wp_kses_post( sort_link( 'total_paid', 'Total Paid (XEC)', $orderby, $order, $base_url ) ); ?></th>
<th><?php echo wp_kses_post( sort_link( 'last_unlock_ts', 'Last Unlock', $orderby, $order, $base_url ) ); ?></th>
<th><?php echo wp_kses_post( paybutton_sort_customers_table( 'ecash_address', 'Customer', $orderby, $order, $base_url ) ); ?></th>
<th><?php echo wp_kses_post( paybutton_sort_customers_table( 'unlocked_count', 'Unlocked Content', $orderby, $order, $base_url ) ); ?></th>
<th><?php echo wp_kses_post( paybutton_sort_customers_table( 'total_paid', 'Total Paid (XEC)', $orderby, $order, $base_url ) ); ?></th>
<th><?php echo wp_kses_post( paybutton_sort_customers_table( 'last_unlock_ts', 'Last Unlock', $orderby, $order, $base_url ) ); ?></th>
</tr>
</thead>
<tbody>
Expand Down