A new feature to track settings history.

Options

These are the option names we want to keep track of.

  • csl-slplus-options
  • csl-slplus-options_nojs
  • slp-experience
  • slp-power
  • slp-premier-options

Dev Notes

https://storelocatorplus.youtrack.cloud/issue/FEAT-1/Settings-History

Development

Store the options noted above in a custom post type.

Post types have revision history as an option so we can roll forward/backward through the history.

Instead of using separate post types of each setting, merge all of the settings into a single array object and store that in a single post type.

array(
  'csl-slplus-options' => *data obj*,
  'csl-slplus-options_nojs' => *data obj*,
  'slp-experience' => *data obj*,
  'slp-power' => *data obj*,
  'slp-premier-options' => *data obj*,
);

Implementation

\MySLP_Settings_History

Hooks the new slplus_update_wp_option action to catch option updates.

\MySLP_Settings_History::recordSettingsChange()
Records changes with an aggregate array of the options to MySLP_Settings_History::slpOptionsPostType (‘settings-history’)

Research

Tracking Option Change Triggers

2025.03.03 17:15 EST : Switch To User (schmiggitty) uid 270.270

Power activation of version 2502.25.01 fires due to update on installed version from 4.6.6 to 2502.25.01.

updating key: csl-slplus-options
updating key: csl-slplus-options_nojs

2025.03.04 08:45 EST : Switch To user (breast : 785.783)

Same SLP Power Activation add on version 2502.25.01 => installed version 2303.07.01

Settings Tracked

csl-slplus-options

a:55:{s:13:"ignore_radius";s:1:"0";s:10:"map_domain";s:15:"maps.google.com";s:11:"no_autozoom";s:1:"0";s:13:"distance_unit";s:5:"miles";s:14:"dropdown_style";s:4:"none";s:10:"map_center";s:33:"Via Frattina 34 Rome, 00187 Italy";s:14:"map_center_lat";s:11:"41.90420300";s:14:"map_center_lng";s:11:"12.48144400";s:10:"zoom_level";s:2:"12";s:10:"zoom_tweak";s:1:"0";s:8:"map_type";s:7:"roadmap";s:12:"bubblelayout";s:2036:"<div id="slp_info_bubble_[slp_location id]" class="slp_info_bubble [slp_location featured]">
    <span id="slp_bubble_name"><strong>[slp_location name  suffix  br]</strong></span>
    <span id="slp_bubble_address">[slp_location address       suffix  br]</span>
    <span id="slp_bubble_address2">[slp_location address2      suffix  br]</span>
    <span id="slp_bubble_city">[slp_location city          suffix  comma]</span>
    <span id="slp_bubble_state">[slp_location state suffix    space]</span>
    <span id="slp_bubble_zip">[slp_location zip suffix  br]</span>
    <span id="slp_bubble_country"><span id="slp_bubble_country">[slp_location country       suffix  br]</span></span>
    <span id="slp_bubble_directions">[html br ifset directions]
    [slp_option label_directions wrap directions]</span>
    <span id="slp_bubble_website">[html br ifset url][slp_location web_link][html br ifset url]</span>
    <span id="slp_bubble_email">[slp_location email         wrap    mailto ][slp_option label_email ifset email][html closing_anchor ifset email][html br ifset email]</span>
    <span id="slp_bubble_phone">[html br ifset phone]
    <span class="location_detail_label">[slp_option   label_phone   ifset   phone]</span>[slp_location phone         suffix    br]</span>
    <span id="slp_bubble_fax"><span class="location_detail_label">[slp_option   label_fax     ifset   fax  ]</span>[slp_location fax           suffix    br]<span>
    <span id="slp_bubble_description"><span id="slp_bubble_description">[html br ifset description]
    [slp_location description raw]</span>[html br ifset description]</span>
    <span id="slp_bubble_hours">[html br ifset hours]
    <span class="location_detail_label">[slp_option   label_hours   ifset   hours]</span>
    <span class="location_detail_hours">[slp_location hours         suffix    br]</span></span>
    <span id="slp_bubble_img">[html br ifset img]
    [slp_location image         wrap    img]</span>
    <span id="slp_tags">[slp_location tags]</span>
</div>";s:13:"map_home_icon";s:137:"https://local.storelocatorplus.com/rome_at_storelocatorplus_dot_com/wp-content/mu-plugins/store-locator-plus/images/icons/bulb_yellow.png";s:12:"map_end_icon";s:136:"https://local.storelocatorplus.com/rome_at_storelocatorplus_dot_com/wp-content/mu-plugins/store-locator-plus/images/icons/bulb_azure.png";s:26:"immediately_show_locations";s:1:"1";s:14:"initial_radius";s:2:"10";s:17:"loading_indicator";s:0:"";s:13:"resultslayout";s:2386:"<div id="slp_results_[slp_location id]" class="results_entry location_primary [slp_location featured]">
    <div class="results_row_left_column"   id="slp_left_cell_[slp_location id]"   >
        [slp_addon section=primary position=first]
        <span class="location_name">[slp_location name] [slp_location uml_buttons] [slp_location gfi_buttons]</span>
        <span class="location_distance">[slp_location distance_1] [slp_location distance_unit]</span>
        [slp_addon section=primary position=last]
    </div>
    <div class="results_row_center_column location_secondary" id="slp_center_cell_[slp_location id]" >
        [slp_addon section=secondary position=first]
        <span class="slp_result_address slp_result_street">[slp_location address]</span>
        <span class="slp_result_address slp_result_street2">[slp_location address2]</span>
        <span class="slp_result_address slp_result_citystatezip">[slp_location city_state_zip]</span>
        <span class="slp_result_address slp_result_country">[slp_location country]</span>
        <div class="contact_info">
            <span class="slp_result_address slp_result_phone">[slp_location phone_with_label]</span>
            <span class="slp_result_address slp_result_fax">[slp_location fax]</span>
        </div>
        [slp_addon section=secondary position=last]
    </div>
    <div class="results_row_right_column location_tertiary"  id="slp_right_cell_[slp_location id]"  >
        [slp_addon section=tertiary position=first]
        <div class="online_info">
        <span class="slp_result_contact slp_result_website">[slp_location web_link]</span>
        <span class="slp_result_contact slp_result_email">[slp_location email_link]</span>
        <span class="slp_result_contact slp_result_directions"><a href="https://[slp_option map_domain]/maps?saddr=[slp_location search_address]&daddr=[slp_location location_address]" target="_blank" class="storelocatorlink">[slp_location directions_text]</a></span>
        </div>
        <span class="slp_result_contact slp_result_hours textblock">[slp_location hours]</span>
        [slp_location pro_tags]
        [slp_location iconarray wrap="fullspan"]
        [slp_location eventiconarray wrap="fullspan"]
        [slp_location socialiconarray wrap="fullspan"]
        [slp_addon section=tertiary position=last]
    </div>
</div>";s:13:"label_website";s:7:"Website";s:16:"label_directions";s:10:"Directions";s:11:"label_email";s:5:"Email";s:11:"label_phone";s:6:"Phone ";s:9:"label_fax";s:3:"Fax";s:16:"google_map_style";s:612:"[{"featureType":"administrative","elementType":"labels.text.fill","stylers":[{"color":"#444444"}]},{"featureType":"landscape","elementType":"all","stylers":[{"color":"#f2f2f2"}]},{"featureType":"poi","elementType":"all","stylers":[{"visibility":"off"}]},
{"featureType":"road","elementType":"all","stylers":[{"saturation":-100},{"lightness":5}]},{"featureType":"road.highway","elementType":"all","stylers":[{"visibility":"simplified"}]},{"featureType":"transit","elementType":"all","stylers":[{"visibility":"on"}]},{"featureType":"water","elementType":"all","stylers":[{"color":"#46bcec"},{"visibility":"on"}]}]";s:20:"no_homeicon_at_start";s:1:"1";s:16:"append_to_search";s:0:"";s:10:"use_sensor";s:1:"0";s:10:"use_nonces";s:1:"0";s:25:"boundaries_influence_type";s:4:"none";s:18:"search_on_map_move";s:1:"0";s:26:"map_options_clickableIcons";s:1:"1";s:15:"bubble_footnote";s:0:"";s:22:"map_option_zoomControl";s:1:"1";s:28:"map_option_fullscreenControl";s:1:"1";s:26:"map_option_hide_streetview";s:1:"0";s:18:"map_marker_tooltip";s:1:"1";s:29:"map_appearance_cluster_header";s:0:"";s:16:"clusters_enabled";s:1:"0";s:16:"cluster_gridsize";s:2:"60";s:15:"cluster_minimum";s:1:"3";s:28:"results_click_animate_marker";s:4:"none";s:26:"results_click_label_marker";s:8:"no_label";s:26:"results_click_map_movement";s:10:"stationary";s:34:"results_click_marker_icon_behavior";s:5:"as_is";s:25:"results_click_marker_icon";s:0:"";s:14:"results_header";s:0:"";s:18:"results_no_wrapper";s:1:"0";s:18:"pagination_enabled";s:1:"0";s:26:"loading_indicator_location";s:3:"map";s:23:"loading_indicator_color";s:15:"blue_light_grey";s:16:"results_header_1";s:0:"";s:16:"results_header_2";s:0:"";s:16:"results_header_3";s:0:"";s:16:"results_header_4";s:0:"";s:19:"search_box_subtitle";s:0:"";}

csl-slplus-options_nojs

 a:105:{s:19:"broadcast_timestamp";s:1:"0";s:15:"default_country";s:2:"us";s:20:"extended_data_tested";s:1:"0";s:12:"map_language";s:2:"en";s:13:"next_field_id";i:1;s:17:"next_field_ported";s:1:"1";s:15:"premium_user_id";s:0:"";s:23:"premium_subscription_id";s:0:"";s:15:"radius_behavior";s:10:"always_use";s:16:"slplus_plugindir";s:55:"/var/www/html/wp-content/mu-plugins/store-locator-plus/";s:15:"slplus_basename";s:41:"store-locator-plus/store-locator-plus.php";s:19:"themes_last_updated";s:1:"0";s:16:"active_style_css";s:4610:"div#map img{background-color:transparent;box-shadow:none;border:0;max-width:none;opacity:1.0}div#map img[src='http://maps.gstatic.com/mapfiles/iws3.png']{display:none}div#map div{overflow:visible}div#map .gm-style-cc>div{word-wrap:normal}#slp_widget\[city\]{display:none}#map_box_map{display:none}#map_box_image{display:block}ul.ui-autocomplete.ui-front.ui-widget{color:gray;background-color:white;border:solid 1px silver;border-radius:3px;padding:.2em;display:inline-block;height:inherit}ul.ui-autocomplete.ui-front.ui-widget li{list-style:none}.slp_directory.landing_page .results_entry{margin-bottom:1.5em}.store_locator_plus .container.fluid{max-width:100%}.store_locator_plus .container .grid-list-lg{padding:16px}.store_locator_plus .card{display:block;border-radius:2px;min-width:0;position:relative;text-decoration:none;-webkit-box-shadow:0 1px 5px rgba(0,0,0,0.2),0 2px 2px rgba(0,0,0,0.14),0 3px 1px -2px rgba(0,0,0,0.12);box-shadow:0 1px 5px rgba(0,0,0,0.2),0 2px 2px rgba(0,0,0,0.14),0 3px 1px -2px rgba(0,0,0,0.12)}.store_locator_plus .card__title{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;padding:16px}.store_locator_plus .card__title--primary{padding-top:24px}.store_locator_plus .headline{font-size:24px !important;font-weight:400;line-height:32px !important;letter-spacing:normal !important}.slp_search_form .search_box{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-start;align-content:stretch}.slp_search_form .search_box .search_item{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-start;flex:1 0 auto;min-width:1em;margin-bottom:.25em;width:100%}.slp_search_form .search_box .search_item label{text-align:right;margin-right:.25em;flex-basis:20%}.slp_search_form .search_box .search_item input[type="text"]{min-width:1em;flex-basis:80%}.slp_search_form .search_box .search_item input[type="text"].label_empty{flex-basis:100%}.slp_search_form .search_box .search_item div{flex:1 0 50%;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-start}.slp_search_form .search_box .search_item #addy_in_radius label{flex-basis:40%}.slp_search_form .search_box .search_item #addy_in_radius select,.slp_search_form .search_box .search_item #addy_in_radius span.ui-widget{flex-basis:60%;display:flex;flex-direction:row;align-items:center;padding:.25em}.slp_search_form .search_box .search_item #addy_in_radius select span,.slp_search_form .search_box .search_item #addy_in_radius span.ui-widget span{display:inline-block}.slp_search_form .search_box .search_item #radius_in_submit{display:flex;flex-direction:row-reverse}.slp_search_form .search_box .search_item .slp_ui_button{margin:.25em 0;padding:.25em}.store_locator_plus.tagline{font-size:.75em;text-align:right}.slp_results_container .results_wrapper{margin:.5em 0;padding:.5em;border:solid 1px lightgrey;border-radius:.5em}.slp_results_container .results_wrapper:hover{background-color:lightgrey;border:solid 1px lightgrey;cursor:pointer}.slp_results_container .results_wrapper .location_name{font-size:1.15em}.slp_results_container .results_wrapper .location_distance{float:right;vertical-align:text-top;color:grey}.slp_results_container .results_wrapper .contact_info{display:flex}.slp_results_container .results_wrapper .online_info{display:flex}.slp_results_container .results_wrapper .slp_result_contact{margin-right:1em}.slp_results_container .results_wrapper .slp_result_contact.slp_result_hours{margin-top:1em;display:block}.slp_results_container .results_wrapper .textblock{display:block;white-space:pre-wrap}.slp_results_container .results_wrapper span.slp_result_street,.slp_results_container .results_wrapper span.slp_result_street2,.slp_results_container .results_wrapper span.slp_result_citystatezip,.slp_results_container .results_wrapper span.slp_result_country,.slp_results_container .results_wrapper span.slp_result_hours{display:block}.slp_results_container .results_wrapper span.slp_result_country{margin-bottom:1em}.slp_results_container .results_wrapper span.slp_result_email,.slp_results_container .results_wrapper span.slp_result_fax,.slp_results_container .results_wrapper span.slp_result_phone,.slp_results_container .results_wrapper span.slp_result_website{margin-right:2em}#wsite-content select,#wsite-content input[type="text"]{border:solid 1px lightgrey}#wsite-content .slp_ui_button{border:solid 1px #AAA;background-color:#e6e6e6;background-image:-webkit-linear-gradient(top,#f4f4f4,#e6e6e6);color:#AAA;padding:.25em;border-radius:3px}";s:22:"admin_notice_dismissed";s:1:"0";s:21:"invalid_query_message";s:42:"We did not receive a valid JSONP response.";s:5:"radii";s:9:" 1,5,(10)";s:12:"searchlayout";s:813:"<div id="address_search" class="slp search_box">
    [slp_addon location="very_top"]
    [slp_search_element input_with_label="name"]
    [slp_search_element input_with_label="address"]
    [slp_search_element dropdown_with_label="city"]
    [slp_search_element dropdown_with_label="state"]
    [slp_search_element dropdown_with_label="country"]
    [slp_search_element selector_with_label="tag"]
    [slp_search_element dropdown_with_label="category"]
    [slp_search_element dropdown_with_label="gfl_form_id"]
    [slp_addon location="before_radius_submit"]
    <div class="search_item">
        [slp_search_element dropdown_with_label="radius"]
        [slp_search_element button="submit"]
    </div>
    [slp_addon location="after_radius_submit"]
    [slp_addon location="very_bottom"]
</div>";s:18:"hide_address_entry";s:1:"0";s:20:"hide_radius_selector";s:1:"0";s:12:"label_radius";s:6:"Within";s:12:"label_search";s:13:"Address / Zip";s:10:"map_height";s:3:"480";s:16:"map_height_units";s:2:"px";s:9:"map_width";s:3:"100";s:15:"map_width_units";s:1:"%";s:14:"remove_credits";s:1:"0";s:9:"maplayout";s:32:"[slp_mapcontent][slp_maptagline]";s:24:"initial_results_returned";s:2:"25";s:20:"max_results_returned";s:2:"25";s:19:"message_bad_address";s:63:"Could not locate this address. Please try a different location.";s:18:"message_no_results";s:19:"No locations found.";s:12:"instructions";s:65:"Enter an address or zip code and click the find locations button.";s:11:"label_hours";s:5:"Hours";s:11:"label_image";s:5:"Image";s:5:"theme";s:15:"a_gallery_style";s:8:"style_id";s:3:"203";s:6:"layout";s:57:"<div id="sl_div">[slp_search][slp_map][slp_results]</div>";s:21:"log_schedule_messages";s:1:"0";s:18:"google_geocode_key";s:0:"";s:17:"google_server_key";s:0:"";s:23:"url_control_description";s:0:"";s:17:"url_allow_address";s:1:"0";s:8:"hide_map";s:1:"0";s:11:"hide_bubble";s:1:"0";s:14:"show_maptoggle";s:1:"0";s:20:"label_for_map_toggle";s:3:"Map";s:22:"map_controls_subheader";s:0:"";s:24:"map_options_scaleControl";s:1:"1";s:26:"map_options_mapTypeControl";s:1:"1";s:19:"map_initial_display";s:3:"map";s:14:"starting_image";s:0:"";s:16:"add_tel_to_phone";s:1:"0";s:13:"hide_distance";s:1:"0";s:12:"show_country";s:1:"0";s:10:"show_hours";s:1:"1";s:17:"email_link_format";s:10:"label_link";s:17:"results_box_title";s:0:"";s:16:"hide_search_form";s:1:"0";s:14:"search_by_name";s:1:"0";s:31:"first_entry_for_radius_selector";s:0:"";s:19:"address_placeholder";s:0:"";s:21:"label_for_find_button";s:14:"Find Locations";s:14:"label_for_name";s:10:"Store Name";s:16:"name_placeholder";s:0:"";s:16:"search_box_title";s:0:"";s:22:"last_geocoded_location";s:0:"";s:19:"log_import_messages";s:1:"0";s:9:"use_pages";s:1:"0";s:18:"use_contact_fields";s:1:"0";s:17:"reporting_enabled";s:1:"0";s:31:"delete_history_before_this_date";s:0:"";s:13:"default_icons";s:1:"0";s:15:"show_icon_array";s:1:"0";s:21:"tag_output_processing";s:10:"as_entered";s:21:"ajax_orderby_catcount";s:1:"0";s:33:"search_appearance_category_header";s:0:"";s:19:"show_cats_on_search";s:4:"none";s:14:"label_category";s:8:"Category";s:15:"show_option_all";s:3:"Any";s:10:"hide_empty";s:1:"0";s:28:"search_appearance_tag_header";s:0:"";s:14:"tag_selections";s:0:"";s:24:"tag_dropdown_first_entry";s:0:"";s:12:"tag_selector";s:4:"none";s:14:"tag_autosubmit";s:1:"0";s:9:"tag_label";s:0:"";s:16:"show_legend_text";s:1:"1";s:33:"pages_directory_wrapper_css_class";s:14:"slp_pages_list";s:31:"pages_directory_entry_css_class";s:25:"slp_page location_details";s:22:"permalink_flush_needed";s:1:"0";s:25:"phone_extension_delimiter";s:0:"";s:20:"no_results_interface";s:15:"display_message";s:12:"zip_selector";s:6:"hidden";s:22:"label_for_zip_selector";s:3:"Zip";s:28:"first_entry_for_zip_selector";s:6:"All...";s:22:"schedule_for_geocoding";s:5:"never";s:29:"schedule_for_initial_distance";s:5:"never";s:20:"use_territory_bounds";s:1:"0";s:14:"block_ip_limit";s:0:"";s:15:"block_ip_period";s:0:"";s:22:"block_ip_release_after";s:0:"";s:12:"ip_whitelist";s:0:"";s:18:"allow_limit_in_url";s:1:"0";s:21:"allow_location_in_url";s:1:"0";s:16:"allow_tag_in_url";s:1:"0";}

slp-experience

 a:34:{
s:20:"address_autocomplete";s:4:"none";
s:24:"address_autocomplete_min";s:1:"3";
s:4:"city";s:0:"";
s:13:"city_selector";s:6:"hidden";
s:7:"country";s:0:"";
s:16:"country_selector";s:6:"hidden";
s:10:"custom_css";s:0:"";
s:25:"disable_initial_directory";s:1:"0";
s:30:"featured_location_display_type";s:18:"show_within_radius";
s:29:"first_entry_for_city_selector";s:13:"All Cities...";
s:32:"first_entry_for_country_selector";s:16:"All Countries...";
s:31:"first_entry_for_radius_selector";s:0:"";
s:30:"first_entry_for_state_selector";s:13:"All States...";
s:13:"ignore_radius";s:1:"0";
s:17:"installed_version";s:10:"2502.24.01";
s:23:"label_for_city_selector";s:4:"City";
:26:"label_for_country_selector";s:7:"Country";
s:14:"label_for_name";s:4:"Name";
s:24:"label_for_state_selector";s:5:"State";
s:24:"map_options_scaleControl";s:1:"0";
s:23:"map_options_scrollwheel";s:1:"0";
s:26:"map_options_mapTypeControl";s:1:"0";
s:10:"map_region";s:0:"";
s:16:"name_placeholder";s:0:"";
s:7:"orderby";s:15:"sl_distance ASC";
s:17:"popup_email_title";s:13:"Send An Email";
s:28:"popup_email_from_placeholder";s:19:"Your email address.";
s:31:"popup_email_subject_placeholder";s:19:"Email subject line.";
s:31:"popup_email_message_placeholder";s:24:"What do you want to say?";
s:16:"search_box_title";s:18:"Find Our Locations";
s:10:"searchnear";s:5:"world";
s:17:"selector_behavior";s:8:"use_both";
s:5:"state";s:0:"";
s:14:"state_selector";s:6:"hidden";
}

slp-power

 a:25:{
s:4:"city";s:0:"";
s:13:"city_selector";s:0:"";
s:7:"country";s:0:"";
s:16:"country_selector";s:0:"";
s:21:"cron_import_timestamp";s:0:"";
s:22:"cron_import_recurrence";s:4:"none";
s:28:"csv_clear_messages_on_import";s:1:"1";
s:12:"csv_file_url";s:0:"";
s:18:"csv_skip_geocoding";s:1:"0";
s:23:"csv_duplicates_handling";s:6:"update";
s:16:"default_comments";s:1:"0";
s:19:"default_page_status";s:7:"publish";
s:18:"default_trackbacks";s:1:"0";
s:9:"load_data";s:1:"0";
s:17:"installed_version";s:10:"2502.18.01";
s:20:"pages_read_more_text";s:0:"";
s:22:"pages_replace_websites";s:1:"1";
s:13:"page_template";s:0:"";
s:21:"permalink_starts_with";s:10:"store-page";
s:18:"prevent_new_window";s:1:"1";
s:22:"prepend_permalink_blog";s:1:"1";
s:5:"state";s:0:"";
s:14:"state_selector";s:0:"";
s:9:"territory";s:0:"";
s:18:"territory_selector";s:0:"";
}

slp-premier-options

a:11:{
s:23:"category_name_separator";s:2:", ";
s:28:"boundaries_influence_min_lat";N;
s:28:"boundaries_influence_min_lng";N;
s:28:"boundaries_influence_max_lat";N;
s:28:"boundaries_influence_max_lng";N;
s:19:"dropdown_autosubmit";s:1:"0";
s:17:"installed_version";s:10:"2502.17.01";
s:16:"pagination_label";s:16:"More Locations: ";
s:18:"show_address_guess";s:1:"0";
s:28:"show_location_on_order_email";s:1:"1";
s:16:"woo_data_version";s:1:"0";
}