INVP::settings()
settings
Description
Get this plugin's option mingled with default values.
Return
(array) An associative array containing this plugin's settings
Source
File: includes/class-invp.php
public static function settings() { $defaults = array( 'skip_trash' => true, 'sort_vehicles_by' => 'make', 'sort_vehicles_order' => 'ASC', 'use_arranger_gallery' => true, 'use_carfax' => false, 'use_carfax_provided_buttons' => true, ); return wp_parse_args( get_option( self::OPTION_NAME ), $defaults ); }
Expand full source code Collapse full source code View on Github
Related
Used By
Used By | Description |
---|---|
includes/class-rest.php: Inventory_Presser_REST::response_settings() |
Creates the response data for the /settings/ route. |
includes/class-badges.php: Inventory_Presser_Badges::add_hooks() |
Adds hooks that power the feature. |
includes/class-taxonomies.php: Inventory_Presser_Taxonomies::change_taxonomy_show_ui_attributes() |
When the user flips the “Show All Taxonomies” setting switch, this method changes the taxonomy registration so they are shown. |
includes/template-tags.php: invp_get_the_inventory_sentence() |
Creates an HTML sentence like “Browse Car, SUV, Truck, or all 10 vehicles for sale.” containing links to those inventory flavors. Designed for empty search results pages. |
includes/template-tags.php: invp_get_the_price() |
Template tag. Returns the vehicle’s price. |
includes/template-tags.php: invp_get_the_carfax_url_svg() |
Returns a URL to an SVG image button that users click to view Carfax reports or empty string. Sometimes the URL points to an SVG hosted on carfax.com, sometimes it’s an SVG bundled with this plugin. |
includes/admin/class-admin-photo-arranger.php: Inventory_Presser_Admin_Photo_Arranger::is_enabled() |
Is the photo arranger via a Gallery Block feature enabled? |
includes/admin/class-admin-options.php: Inventory_Presser_Admin_Options::callback_use_arranger_gallery() |
Outputs a checkbox and label to enable the photo arranger Gallery Block feature. |
includes/shortcode/class-shortcode-sort-by.php: Inventory_Presser_Shortcode_Sort_By::change_sorter_based_on_price_display() |
change_sorter_based_on_price_display |
includes/shortcode/class-shortcode-sort-by.php: Inventory_Presser_Shortcode_Sort_By::content() |
Creates the HTML output that replaces the shortcode. |
includes/shortcode/class-shortcode-sort-by.php: Inventory_Presser_Shortcode_Sort_By::change_price_field_when_sorting() |
If a user wants to order vehicles by price, and the site is showing MSRP instead of price, sort by that. |
includes/shortcode/class-shortcode-attribute-table.php: Inventory_Presser_Shortcode_Attribute_Table::content() | |
includes/admin/class-admin-options.php: Inventory_Presser_Admin_Options::options_page_content() |
Outputs the settings page HTML content |
inventory-presser.php: Inventory_Presser_Plugin::maybe_force_delete() |
Action hook callback. Prevents vehicles from lingering in the Trash after they’ve been deleted if a plugin setting dictates such behavior. |
includes/widget/class-widget-map.php: Inventory_Presser_Map_Widget::widget() |
widget |
includes/widget/class-widget-map.php: Inventory_Presser_Map_Widget::form() |
form |
includes/class-invp.php: INVP::delete_attachment_orphans() | |
includes/class-invp.php: INVP::delete_all_inventory_on_blog() | |
inventory-presser.php: Inventory_Presser_Plugin::add_orderby_to_query() |
Filter callback that adds an ORDER BY clause to the main query when a user requests a list of vehicles. |
includes/class-blocks.php: Inventory_Presser_Blocks::register_block_types() |
register_block_types |
includes/widget/class-widget-inventory-grid.php: Inventory_Presser_Grid::content() |
Creates HTML that renders the widget front-end. |
includes/class-taxonomies.php: Inventory_Presser_Taxonomies::maybe_exclude_sold_vehicles() |
Filter callback. Implements the “include sold vehicles” checkbox feature in vehicle archives and search results. |
includes/class-additional-listings-pages.php: Inventory_Presser_Additional_Listings_Pages::additional_listings_pages_array() |
Makes it easy to get the additional listings pages saved settings. |