booted ) { return; } $this->booted = true; Settings::register(); Assets::register(); RestController::register(); Shortcodes::register(); add_filter( 'plugin_action_links_' . plugin_basename( SABLEPAY_PLUGIN_FILE ), array( $this, 'actionLinks' ) ); add_action( 'admin_init', array( $this, 'privacyPolicyContent' ) ); /** * Fires once the SablePay plugin has registered its hooks. */ do_action( 'sablepay_loaded' ); } /** * Suggested text for Settings → Privacy → Policy Guide. */ public function privacyPolicyContent() { if ( ! function_exists( 'wp_add_privacy_policy_content' ) ) { return; } $content = '
' . esc_html__( 'SablePay processes stablecoin payments made on this site. Suggested text:', 'sablepay' ) . '
' . '' . esc_html__( 'When you pay with SablePay, this site sends the payment amount, the items you are purchasing and an order reference to SablePay to create the payment. You complete the payment on SablePay\'s payment page with your own crypto wallet. Your wallet address and the blockchain transaction are processed by SablePay and recorded on the public blockchain.', 'sablepay' ) . '
' . '' . sprintf( /* translators: 1: SablePay privacy policy URL, 2: SablePay terms URL */ wp_kses( __( 'See the SablePay Privacy Policy and Terms of Service.', 'sablepay' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( 'https://www.sablepay.io/privacy-policy' ), esc_url( 'https://www.sablepay.io/terms-of-service' ) ) . '
'; wp_add_privacy_policy_content( 'SablePay', wp_kses_post( $content ) ); } /** * Add a "Settings" link on the Plugins screen. */ public function actionLinks( $links ) { array_unshift( $links, sprintf( '%s', esc_url( admin_url( 'options-general.php?page=sablepay' ) ), esc_html__( 'Settings', 'sablepay' ) ) ); return $links; } }