Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'affwp_affiliate_dashboard_urls' filter to the URL dashboard tab #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
12 changes: 11 additions & 1 deletion templates/dashboard-tab-urls.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,17 @@
<p><?php printf( __( 'Your affiliate username is: <strong>%s</strong>', 'affiliate-wp' ), affwp_get_affiliate_username() ); ?></p>
<?php endif; ?>

<p><?php printf( __( 'Your referral URL is: <strong>%s</strong>', 'affiliate-wp' ), esc_url( urldecode( affwp_get_affiliate_referral_url() ) ) ); ?></p>
<?php
$affiliate_urls = apply_filters('affwp_affiliate_dashboard_urls', array( 'Your referral URL is:' => affwp_get_affiliate_referral_url() ));
if ( !empty($affiliate_urls) ) :
foreach ($affiliate_urls as $label => $url) :
echo '<p>';
printf(__($label . ' <strong>%s</strong>', 'affiliate-wp'), esc_url(urldecode($url)));
echo '</p>';
endforeach;
endif;
?>

<p><?php _e( 'Enter any URL from this website in the form below to generate a referral link!', 'affiliate-wp' ); ?></p>

<form id="affwp-generate-ref-url" class="affwp-form" method="get" action="#affwp-generate-ref-url">
Expand Down