'https://...' ); * * @return string */ public static function url() { $raw = defined( 'AKSMB_PRO_MARKETPLACE_URL' ) ? (string) AKSMB_PRO_MARKETPLACE_URL : ''; /** * Filter the Woo Marketplace URL for MarginBeacon Pro. * * @param string $url Absolute HTTPS product URL, or empty if not listed yet. */ $url = apply_filters( 'aksmb_pro_marketplace_url', $raw ); return self::sanitize( $url ); } /** * Sanitize a raw URL through the same gate that CTA rendering relies on. * * @param mixed $url Raw URL. * @return string Sanitized HTTPS URL, or empty when not renderable. */ public static function sanitize( $url ) { $url = trim( (string) $url ); if ( '' === $url || self::is_placeholder( $url ) ) { return ''; } $escaped = esc_url( $url, array( 'https' ) ); return is_string( $escaped ) && '' !== $escaped ? $escaped : ''; } /** * @return bool */ public static function has_url() { return '' !== self::url(); } /** * Documentation URL placeholder - not a live endpoint, just for internal linking. * * @return string */ public static function placeholders_documentation_url() { return 'https://kayvandra.com/products/marginbeacon/docs'; } }