Documentation

Documentation

Packages

Application
PuzzleAnywhere

Interfaces, Classes and Traits

PA_Attachment
The PuzzleAnywhere attachment class. It allows for attachment metadata info retrieval, general and puzzle url generation, and general and puzzle attachment retrieval.
PA_Calendar
Creates HTML monthly calendars with day-based events.
PA_Calendar_Event
A calendar event.
PA_NewsletterTypeSubscriber
The PuzzleAnywhere NewsletterTypeSubscriber class. It allows for retrieving newsletter type subscription data, as well as confirming and unsubscribing from newsletter types. This is not related to user subscription information, unless the newsletter type is paywalled to subscribers only.
PA_NewsletterType
The PuzzleAnywhere NewsletterType class. It allows for retrieving newsletter type data.
PA_Newsletter
The PuzzleAnywhere Newsletter class. It allows for an easier way to display a newsletter. Newsletters are traditionally embedded with the `PA_Puzzle` `get` method.
PA_Provider
The PuzzleAnywhere Provider class. The provider taxonomy is a bit of a misnomer, as it basically just means 'a subset of puzzle groups'.
PA_PurchasableItem
The PuzzleAnywhere PurchasableItem class. It allows for an easy way to display a purchasable item such as a puzzle, puzzle bundle, or subscription.
PA_Purchase
The PuzzleAnywhere Purchase class. It allows for an easy way to display created, pending, completed, and refunded purchases.
PA_Puzzle
The PuzzleAnywhere Puzzle class. It allows for an easy way to display puzzle data.
PA_Subscription
The PuzzleAnywhere Subscription class. It allows for an easy way to display a user's subscription data.
PA_User
The PuzzleAnywhere User class. It allows for an easy way to display a user's account data.
Puzzle_Anywhere
The base PuzzleAnywhere class. This handles shortcode interpolation, page re/generation and destruction, and has a variety of convenience functions.
PA_Author
The PuzzleAnywhere Author class. It allows for an easy way to display an author's profile data.

Table of Contents

buy_puzzles()  : string
Get the rendered 'Buy Puzzles' view.
buy_puzzle_bundles()  : string
Get the rendered 'Buy Puzzle Bundles' view.
puzzle()  : string
Get the rendered 'Individual Puzzle' view.
download_puzzle_attachment()  : null
Downloads a puzzle attachment, if the stored user can do so.
download_puzzle()  : string
Get the rendered 'Download Puzzle' view.
sample_puzzles()  : string
Get the rendered 'Sample Puzzle' view.
puzzles_by_year()  : string
Get the rendered 'Puzzles by Year' view.
staff()  : string
Get the rendered staff view.
featured_single_subscriptions()  : string
Get the rendered list of one-time subscriptions view.
featured_recurring_subscriptions()  : string
Get the rendered list of recurring subscriptions view.
providers()  : string
Get the rendered providers/teams view.
provider()  : string
Get the rendered provider/team view.
free_trial()  : string
Get the rendered 'Free Trial Subscription' view.
validate_free_trial()  : string
Get the rendered 'Free Trial Subscription Validation' view.
execute_purchase()  : string
Executes a purchase via rendering a `purchase-execute` view, or a 'Login' view if the purchase has been properly executed.
download_purchase()  : string
Get the rendered 'Download Purchase' view.
purchase_renewal()  : string
Get the rendered 'Purchase Renewal' view.
about_us()  : string
Get the rendered 'About' view.
subscribe()  : string
Get the rendered 'Subscribe' view.
newsletter_confirmation()  : string
Get the rendered 'Newsletter Confirmation' view.
unsubscribe_newsletter()  : string
Get the rendered 'Unsubscribe Newsletter' view.
manage_newsletters()  : string
Get the rendered 'Manage Newsletters' view.
tip_jar()  : string
Get the rendered 'Tip Jar' view.
buy_individual_subscription()  : string
Get the rendered 'Buy Individual Subscription' view.
account()  : string
Get a rendered 'Account' view type.
enable_account()  : string
Get the rendered 'Enable Account' view.
log_in()  : string
Get the rendered 'Log In' view.
log_out()  : null
Logs the user out, then redirects to 'Your Account'.
faq()  : string
Get the rendered 'FAQ' view.
puzzle_picker()  : string
Get the rendered 'Puzzle Picker' view.
puzzle_request_form()  : string
Get the rendered 'Puzzle Request Form' view.
renew_subscription_request_form()  : string
Get the rendered 'Renew Subscription Request Form' view.
request_password_reset()  : string
Get the rendered 'Request Password Reset' view.
reset_user_password()  : string
Get the rendered 'Reset User Password' view.
reset_password_form()  : string
Get the rendered 'Reset Password' view.
authors()  : array<string|int, mixed>
Gets all author profiles
authors_summary()  : PA_User
Gets an author's summary.
featured_providers()  : PA_Provider
Gets featured providers.
pluralize()  : string
-Very- basic pluralization.

Functions

buy_puzzles()

Get the rendered 'Buy Puzzles' view.

buy_puzzles(array<string|int, mixed> $attrs) : string
Parameters
$attrs : array<string|int, mixed>

(Optional)

Return values
string

The rendered HTML 'Buy Puzzles' view.

buy_puzzle_bundles()

Get the rendered 'Buy Puzzle Bundles' view.

buy_puzzle_bundles() : string
Return values
string

The rendered HTML 'Buy Puzzle Bundles' view.

puzzle()

Get the rendered 'Individual Puzzle' view.

puzzle(array<string|int, mixed> $attrs) : string
Parameters
$attrs : array<string|int, mixed>

Allows for retrieving individual puzzles with additional attributes, including: - string $attrs[ 'date' ] Retrieves a puzzle by date instead of PA_Puzzle ID.

Return values
string

The rendered HTML 'Individual Puzzle' view.

download_puzzle_attachment()

Downloads a puzzle attachment, if the stored user can do so.

download_puzzle_attachment() : null
Return values
null

download_puzzle()

Get the rendered 'Download Puzzle' view.

download_puzzle(array<string|int, mixed> $attrs) : string
Parameters
$attrs : array<string|int, mixed>

(Optional)

Return values
string

The rendered HTML 'Download Puzzle' view.

sample_puzzles()

Get the rendered 'Sample Puzzle' view.

sample_puzzles() : string
Return values
string

The rendered HTML 'Sample Puzzle' view.

puzzles_by_year()

Get the rendered 'Puzzles by Year' view.

puzzles_by_year() : string
Return values
string

The rendered HTML 'Puzzles by Year' view.

staff()

Get the rendered staff view.

staff() : string
Return values
string

The rendered HTML staff view.

Get the rendered list of one-time subscriptions view.

featured_single_subscriptions() : string
Return values
string

The rendered subscriptions view.

Get the rendered list of recurring subscriptions view.

featured_recurring_subscriptions() : string
Return values
string

The rendered subscriptions view.

providers()

Get the rendered providers/teams view.

providers() : string
Return values
string

The rendered HTML 'providers/teams' view.

provider()

Get the rendered provider/team view.

provider([mixed $attrs = [] ]) : string
Parameters
$attrs : mixed = []
Return values
string

The rendered HTML 'provider/team' view.

free_trial()

Get the rendered 'Free Trial Subscription' view.

free_trial() : string
Return values
string

The rendered HTML 'Free Trial Subscription' view.

validate_free_trial()

Get the rendered 'Free Trial Subscription Validation' view.

validate_free_trial() : string
Return values
string

The rendered HTML 'Free Trial Subscription Validation' view.

execute_purchase()

Executes a purchase via rendering a `purchase-execute` view, or a 'Login' view if the purchase has been properly executed.

execute_purchase() : string
Return values
string

The rendered HTML 'Purchase Execute' or 'Login' view.

download_purchase()

Get the rendered 'Download Purchase' view.

download_purchase() : string
Return values
string

The rendered HTML 'Download Purchase' view.

purchase_renewal()

Get the rendered 'Purchase Renewal' view.

purchase_renewal() : string
Return values
string

The rendered HTML 'Purchase Renewal' view.

about_us()

Get the rendered 'About' view.

about_us([mixed $attrs = [] ]) : string
Parameters
$attrs : mixed = []
Return values
string

The rendered HTML 'About' view.

subscribe()

Get the rendered 'Subscribe' view.

subscribe([mixed $attrs = [] ]) : string
Parameters
$attrs : mixed = []
Return values
string

The rendered HTML 'Subscribe' view.

newsletter_confirmation()

Get the rendered 'Newsletter Confirmation' view.

newsletter_confirmation(array<string|int, mixed> $attrs) : string
Parameters
$attrs : array<string|int, mixed>
Return values
string

The rendered HTML 'Newsletter Confirmation' view.

unsubscribe_newsletter()

Get the rendered 'Unsubscribe Newsletter' view.

unsubscribe_newsletter(array<string|int, mixed> $attrs) : string
Parameters
$attrs : array<string|int, mixed>
Return values
string

The rendered HTML 'Unsubscribe Newsletter' view.

manage_newsletters()

Get the rendered 'Manage Newsletters' view.

manage_newsletters(array<string|int, mixed> $attrs) : string
Parameters
$attrs : array<string|int, mixed>
Return values
string

The rendered HTML 'Manage Newsletters' view.

tip_jar()

Get the rendered 'Tip Jar' view.

tip_jar(mixed $attrs) : string
Parameters
$attrs : mixed
Return values
string

The rendered HTML 'Tip Jar' view.

buy_individual_subscription()

Get the rendered 'Buy Individual Subscription' view.

buy_individual_subscription(array<string|int, mixed> $attrs) : string
Parameters
$attrs : array<string|int, mixed>
Return values
string

The rendered HTML 'Buy Individual Subscription' view.

account()

Get a rendered 'Account' view type.

account() : string

Account view types are defined by $_REQUEST[ 'v' ]:

  • account-summary is the default view. It displays the subscription status and general account information.
  • purchases displays the account user's purchases.
  • purchase displays a purchase receipt.
  • puzzles displays a puzzle calendar, defaulting to the current year. To control the year, use $_REQUEST[ 'puzzles_by_year' ].

If a user isn't logged in, they'll be redirected to login.

Return values
string

The rendered HTML 'Buy Individual Subscription' view.

enable_account()

Get the rendered 'Enable Account' view.

enable_account(mixed $attrs) : string
Parameters
$attrs : mixed
Return values
string

The rendered HTML 'Enable Account' view.

log_in()

Get the rendered 'Log In' view.

log_in(mixed $attrs) : string
Parameters
$attrs : mixed
Return values
string

The rendered HTML 'Log In' view.

log_out()

Logs the user out, then redirects to 'Your Account'.

log_out(array<string|int, mixed> $attrs) : null
Parameters
$attrs : array<string|int, mixed>

(Optional)

Return values
null

faq()

Get the rendered 'FAQ' view.

faq(mixed $attrs) : string
Parameters
$attrs : mixed
Return values
string

The rendered HTML 'FAQ' view.

puzzle_picker()

Get the rendered 'Puzzle Picker' view.

puzzle_picker() : string
Return values
string

The rendered HTML 'Puzzle Picker' view.

puzzle_request_form()

Get the rendered 'Puzzle Request Form' view.

puzzle_request_form() : string
Return values
string

The rendered HTML 'Puzzle Request Form' view.

renew_subscription_request_form()

Get the rendered 'Renew Subscription Request Form' view.

renew_subscription_request_form() : string
Return values
string

The rendered HTML 'Renew Subscription Request Form' view.

request_password_reset()

Get the rendered 'Request Password Reset' view.

request_password_reset() : string
Return values
string

The rendered HTML 'Request Password Reset' view.

reset_user_password()

Get the rendered 'Reset User Password' view.

reset_user_password() : string
Return values
string

The rendered HTML 'Reset User Password' view.

reset_password_form()

Get the rendered 'Reset Password' view.

reset_password_form() : string
Return values
string

The rendered HTML 'Reset Password' view.

authors()

Gets all author profiles

authors() : array<string|int, mixed>
Return values
array<string|int, mixed>

The PA_User profiles.

pluralize()

-Very- basic pluralization.

pluralize(string $str) : string
Parameters
$str : string

The string to pluralize.

Return values
string

The pluralized string.

Search results