Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as PHP by Robert ( 9 years ago )
<?php
class WPEPAddOnMemberMouseContent extends WPEP_Content_Library_Integration {
public $sell_button_url = '';
public $sell_button_text = '';
public function __construct() {
$this->sell_button_text = get_option( 'wpep_addon_membermouse_sell_button_text', 'Upgrade Membership Plan' );
$this->sell_button_url = get_option( 'wpep_addon_membermouse_sell_button_url', '' );
}
public function has_access( $post_id ) {
if( !class_exists( 'MM_ProtectedContentEngine' ) )
return true;
$protectedContent = new MM_ProtectedContentEngine();
return ( $protectedContent->canAccessPost( $post_id, get_current_user_id() ) );
}
public function get_sell_text($post_id = 0) {
return $this->sell_button_text;
}
public function get_sell_link( $post_id = 0, $default_link = '' ) {
$individual_link = get_post_meta( $post_id, 'wpep_membermouse_upgrade_link', true );
if( $individual_link != '' && $individual_link != null )
return $individual_link;
if( $this->sell_button_url != '' && $this->sell_button_url != null )
return $this->sell_button_url;
return $default_link;
}
}
Revise this Paste