5 if ( ! defined(
'GRAVITYVIEW_DIR' ) ) {
17 const url =
'https://www.gravitykit.com/powered-by/';
23 add_action(
'gravityview/template/after', array( $this,
'maybe_add_link' ) );
33 $powered_by =
gravityview()->plugin->settings->get_gravitykit_setting(
'powered_by', 0 );
35 if( empty( $powered_by ) ) {
42 if ( empty(
$url ) ) {
50 $anchor_text = apply_filters(
'gravityview/powered_by/text', __(
'Powered by GravityView',
'gk-gravityview' ) );
52 printf(
'<span class="gv-powered-by"><a href="%s">%s</a></span>', esc_url(
$url ), esc_html( $anchor_text ) );
62 $url = sprintf( self::url, get_bloginfo(
'name' ) );
64 $affiliate_id =
gravityview()->plugin->settings->get_gravitykit_setting(
'affiliate_id',
'' );
66 if( $affiliate_id && is_numeric( $affiliate_id ) ) {
67 $url = add_query_arg( array(
'ref' => $affiliate_id ),
$url );
70 $url = add_query_arg( array(
71 'utm_source' =>
'powered_by',
72 'utm_term' => get_bloginfo(
'name' ),
79 $url = apply_filters(
'gravityview/powered_by/url',
$url );
get_url()
Returns the URL to GravityView.
__construct()
GravityView_Powered_By constructor.
If this file is called directly, abort.
gravityview()
The main GravityView wrapper function.
maybe_add_link()
Prints a HTML link to GravityView's site if "Powered By" GravityView setting is enabled.