AR Model Viewer for WooCommerce

Ar_Model_Viewer_For_Woocommerce_Admin

The admin-specific functionality of the plugin.

Defines the plugin name, version, and two hooks to enqueue the admin-facing stylesheet and JavaScript. As you add hooks and methods, update this description.

Tags
subpackage

Ar_Model_Viewer_For_Woocommerce/admin

author

Manuel Ramirez Coronel ra_cm@outlook.com

Table of Contents

Properties

$plugin_name  : string
The ID of this plugin.
$plugin_prefix  : string
The unique prefix of this plugin.
$version  : string
The version of this plugin.

Methods

__construct()  : mixed
Initialize the class and set its properties.
ar_model_viewer_for_woocommerce_blocksy_fix()  : mixed
ar_model_viewer_for_woocommerce_file_and_ext()  : mixed
Sets the extension and mime type for Android - .gbl and IOS - .usdz files.
ar_model_viewer_for_woocommerce_mime_types()  : array<string|int, mixed>
Adds Android - .gbl and IOS - .usdz filetype to allowed mimes
enqueue_scripts()  : mixed
Register the JavaScript for the admin area.
enqueue_styles()  : mixed
Register the stylesheets for the admin area.

Properties

$plugin_prefix

The unique prefix of this plugin.

private string $plugin_prefix

The string used to uniquely prefix technical functions of this plugin.

Tags
since
1.0.0
access

private

Methods

__construct()

Initialize the class and set its properties.

public __construct(string $plugin_name, string $plugin_prefix, string $version) : mixed
Parameters
$plugin_name : string

The name of this plugin.

$plugin_prefix : string

The unique prefix of this plugin.

$version : string

The version of this plugin.

Tags
since
1.0.0

ar_model_viewer_for_woocommerce_file_and_ext()

Sets the extension and mime type for Android - .gbl and IOS - .usdz files.

public ar_model_viewer_for_woocommerce_file_and_ext(mixed $types, string $file, string $filename, array<string|int, mixed> $mimes) : mixed
Parameters
$types : mixed
$file : string

Full path to the file.

$filename : string

The name of the file (may differ from $file due to $file being in a tmp directory).

$mimes : array<string|int, mixed>

Key is the file extension with value as the mime type.

ar_model_viewer_for_woocommerce_mime_types()

Adds Android - .gbl and IOS - .usdz filetype to allowed mimes

public ar_model_viewer_for_woocommerce_mime_types(array<string|int, mixed> $mimes) : array<string|int, mixed>
Parameters
$mimes : array<string|int, mixed>

Mime types keyed by the file extension regex corresponding tothose types. 'swf' and 'exe' removed from full list. 'htm|html' also removed depending on '$user' capabilities.

Tags
see
https://codex.wordpress.org/Plugin_API/Filter_Reference/upload_mimes
Return values
array<string|int, mixed>

enqueue_scripts()

Register the JavaScript for the admin area.

public enqueue_scripts(string $hook_suffix) : mixed
Parameters
$hook_suffix : string

The current admin page.

Tags
since
1.0.0

enqueue_styles()

Register the stylesheets for the admin area.

public enqueue_styles(string $hook_suffix) : mixed
Parameters
$hook_suffix : string

The current admin page.

Tags
since
1.0.0

        
On this page

Search results