Table of Contents
Visual Portfolio has several WP hooks that let you extend functionality.
All Filters
Filter Name | Attributes | Description |
vpf_include_template | $template, $template_name, $args | include php template |
vpf_include_template_args | $args, $template_name | filter arguments added to the template |
vpf_include_template_style | $template, $template_name, $deps, $ver, $media | include css template |
vpf_control_value | $value, $name, $post_id | get option for Layout |
vpf_registered_control_args | $args | called for each control printed in the Layouts editor. Helpful when you need to change controls default values |
vpf_registered_controls | $controls | called for all available controls printed in the Layouts editor. Helpful when you need to change controls default values |
vpf_extend_portfolio_data_attributes | $attrs, $options | portfolio data attributes array |
vpf_extend_portfolio_class | $class, $options | portfolio class string |
vpf_extend_query_args | $items, $options | arguments for items query |
vpf_extend_image_controls | $controls, $name | single image options in content source image |
vpf_each_item_tag_name | $tag_name, $args | change each item tag name (article or div by default used) |
vpf_each_item_tag_attrs | $attrs, $args | customize each item tag attributes |
vpf_each_item_args | $args | extend data of each item |
vpf_post_item_args | $args | extend data of each post-based item |
vpf_image_item_args | $args | extend data of each image item |
vpf_popup_image_data | $args | extend data of each popup image |
vpf_get_pagenum_link | $current_url, $query_arg | filter pagenum URLs used in filters and pagination |
Extend Layouts
Filter Name | Attributes | Description |
vpf_extend_layouts | $layouts | custom layouts |
vpf_extend_layout_NAME_controls | $controls | extend specific layout controls by NAME |
Note: On the portfolio will be added data attribute [data-vp-layout=”new_layout”], so you can play with it and use jQuery events to initialize the new layout.
Extend Tiles
Filter Name | Attributes | Description |
vpf_extend_tiles | $tiles | custom tiles |
Example: 3|1,0.5|2,0.25|
- 3 columns in row
- First item 100% width and 50% height
- Second item 200% width and 25% height
Extend Items Styles
Filter Name | Attributes | Description |
vpf_extend_items_styles | $items_styles | custom items styles |
vpf_extend_item_style_NAME_controls | $controls | extend specific items styles by NAME |
Note: Make sure that you added template in your_theme/visual-portfolio/items-list/items-style/new_items_style. See the structure of default templates to getting started.
Extend Filters
Filter Name | Attributes | Description |
vpf_extend_filters | $filters | custom filters |
vpf_extend_filter_items | $items, $options | array with filter items |
vpf_extend_filter_NAME_controls | $controls | extend specific filters by NAME |
Note: Make sure that you added template in your_theme/visual-portfolio/items-list/filter/new_filter. See the structure of default templates to getting started.
Extend Sorts
Filter Name | Attributes | Description |
vpf_extend_sort | $sort | custom sorts |
vpf_extend_sort_items | $items, $options | array with sort items |
vpf_extend_sort_NAME_controls | $controls | extend specific sorts by NAME |
Note: Make sure that you added template in your_theme/visual-portfolio/items-list/sort/new_sort. See the structure of default templates to getting started.
Extend Paginations
Filter Name | Attributes | Description |
vpf_extend_pagination | $pagination | custom pagination |
vpf_extend_pagination_NAME_controls | $controls | extend specific paginations by NAME |
Note: Make sure that you added template in your_theme/visual-portfolio/items-list/pagination/new_pagination. See the structure of default templates to getting started.