Core Classes
Visual_Portfolio
The main plugin class that bootstraps the Visual Portfolio plugin. Location:class-visual-portfolio.php
Properties
$plugin_name(string) - Name of the plugin$plugin_basename(string) - Basename of plugin main file$plugin_path(string) - Path to the plugin directory$plugin_url(string) - URL to the plugin directory$pro_plugin_path(string) - Path to the pro plugin directory (if installed)$pro_plugin_url(string) - URL to the pro plugin directory (if installed)
Methods
instance()
Visual_Portfolio_Get
Handles portfolio data retrieval and output configuration. Location:classes/class-get-portfolio.php
Methods
get_all_layouts()
vpf_extend_layouts filter.
Returns: Array of registered layouts with their controls
Example:
get_all_items_styles()
vpf_extend_items_styles filter.
Returns: Array of registered items styles with their controls
get_options()
$atts(array) - Portfolio attributes including ‘id’ or ‘block_id’
is_preview()
allow_taxonomies_for_filter()
$taxonomy(string) - Taxonomy name
get_output_config()
$atts(array) - Portfolio attributes
Visual_Portfolio_Assets
Manages static and dynamic asset loading. Location:classes/class-assets.php
Methods
register_script()
$name(string) - Script handle name$path(string) - File path relative to plugin root$dependencies(array) - Array of script dependencies$version(string|null) - Script version$args(array|bool) - Loading strategies (in_footer, strategy)
enqueue_script()
register_script()
register_style()
$name(string) - Style handle name$path(string) - File path relative to plugin root$dependencies(array) - Array of style dependencies$version(string|null) - Style version
enqueue_style()
register_style()
get_asset_file()
$filepath(string) - Asset file path$filetype(string) - Asset file type (‘style’ or ‘script’)
Visual_Portfolio_Images
Handles image processing, lazy loading, and image size management. Location:classes/class-images.php
Properties
$image_processing(bool) - True when image is being processed$allow_vp_lazyload(bool) - Whether VP images use lazyload$allow_wp_lazyload(bool) - Whether WordPress images use lazyload$lazyload_user_exclusions(array) - List of lazyload exclusions
Methods
add_image_sizes()
vp_sm- Smallvp_md- Mediumvp_lg- Largevp_xl- Extra Largevp_sm_popup- Small popupvp_md_popup- Medium popupvp_xl_popup- Extra Large popup
wp_get_attachment_image_url()
$attachment_id(int) - Image attachment ID$size(string|array) - Image size to retrieve$icon(bool) - Whether to treat as icon
get_image_blocked_attributes()
Visual_Portfolio_Controls
Manages control registration and rendering for the portfolio builder. Location:classes/class-controls.php
Methods
register_categories()
$categories(array) - Array of category definitions
register()
$controls(array) - Array of control definitions
get_registered_array()
get_registered_value()
$name(string) - Control name$id(int|false) - Post ID to get value from
Visual_Portfolio_Settings
Manages plugin settings and options. Location:classes/class-settings.php
Methods
get_option()
$option(string) - Option name$section(string) - Section name$deprecated_default(string) - Deprecated default value parameter
update_option()
$option(string) - Option name$section(string) - Section name$value(string) - New option value
Visual_Portfolio_Templates
Handles template loading and rendering. Location:classes/class-templates.php
Methods
include_template()
$template_name(string) - Template file name (without .php)$args(array) - Variables to extract into template scope
- Theme:
/visual-portfolio/{$template_name}.php - Pro Plugin:
templates/{$template_name}.php - Free Plugin:
templates/{$template_name}.php
find_template_styles()
$template_name(string) - Template name
include_template_style()
$handle(string) - Style handle name$template_name(string) - Template name$deps(array) - Dependencies$ver(string|bool|null) - Version$media(string) - Media type
is_allowed_template_path()
$real_path(string) - The resolved file path