- public static $current_user_logged_into_patreon = -1;
-
- function __construct() {
-
- add_action( 'login_enqueue_scripts', array( $this,'patreonEnqueueCss' ), 10 );
- add_action( 'wp_enqueue_scripts', array( $this,'patreonEnqueueCss' ) );
- add_action( 'wp_head', array( $this, 'patreonPrintCss' ) );
- add_action( 'wp_enqueue_scripts', array( $this, 'patreonEnqueueJs' ) );
- add_action( 'admin_enqueue_scripts', array( $this, 'patreonEnqueueAdminCss' ) );
- add_action( 'login_form', array( $this, 'showPatreonMessages' ) );
- add_action( 'login_form', array( $this, 'displayPatreonLoginButtonInLoginForm' ) );
- add_action( 'register_form', array( $this, 'showPatreonMessages' ) );
- add_action( 'register_form', array( $this, 'displayPatreonLoginButtonInLoginForm' ) );
- add_filter( 'the_content', array( $this, 'protectContentFromUsers'), PHP_INT_MAX - 5 );
- // This filter will inject currency sign into label over button until proper internationalization is done
- add_filter( 'ptrn/label_text_over_universal_button', array( $this, 'replace_in_currency_sign'), PHP_INT_MAX - 5 );
- add_filter( 'ptrn/valid_patron_final_footer', array( $this, 'replace_in_currency_sign'), PHP_INT_MAX - 5 );
- add_shortcode( 'patreon_login_button', array( $this,'LoginButtonShortcode' ) );
- add_filter('get_avatar', array( $this, 'show_patreon_avatar' ), 10, 5);
-
- self::$messages_map = array(