• Why are you saving the whole admin page including text and help links in the wp_options table and not only the values for all settings?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author malihu

    (@malihu)

    Hi,

    I’m not saving the whole admin page or help links. I’m saving the setting fields info (label, type, value etc.) and their description.
    I’m saving all the info as a single object in a single row in wp_options.

    I’m doing this because it allows me to add/update/remove plugin options extremely fast.

    Thread Starter M3

    (@emmtre)

    I’m sorry but there is no need to save all the text, comments, links, etc in a table that autoload. And the update of the plugin doesn’t work unless you re-save the settings or reset to default.

    
    a: 1: {
        s: 17: "mPS2id_instance_0";a: 31: {
            s: 8: "selector";a: 10: {
                s: 5: "value";s: 24: "a[rel='m_PageScroll2id']";s: 6: "values";N;s: 2: "id";s: 28: "page_scroll_to_id_0_selector";s: 10: "field_type";s: 4: "text";s: 5: "label";s: 11: "Selector(s)";s: 14: "checkbox_label";N;s: 12: "radio_labels";N;s: 10: "field_info";N;s: 11: "description";s: 397: "Set the links (in the form of <a href="http: //www.w3.org/TR/css3-selectors/" target="_blank">CSS selectors</a>) that will scroll the page when clicked (default value: any link with a non-empty hash (<code>#</code>) value in its URL) <br /><small>In addition to selectors above, the plugin is enabled automatically on links (or links contained within elements) with class <code>ps2id</code></small>";s: 7: "wrapper";N;
            }s: 21: "autoSelectorMenuLinks";a: 10: {
                s: 5: "value";s: 5: "false";s: 6: "values";N;s: 2: "id";s: 41: "page_scroll_to_id_0_autoSelectorMenuLinks";s: 10: "field_type";s: 8: "checkbox";s: 5: "label";s: 0: "";s: 14: "checkbox_label";s: 30: "Enable on WordPress Menu links";s: 12: "radio_labels";N;s: 10: "field_info";N;s: 11: "description";s: 185: "Automatically enable the plugin on custom links (containing <code>#</code> in their URL) created in Appearance &rarr; Menus <br /><small>Requires WordPress version 3.6 or higher</small>";s: 7: "wrapper";s: 8: "fieldset";
            }s: 15: "excludeSelector";a: 10: {
                s: 5: "value";s: 35: "a[href^='#tab-'], a[href^='#tabs-']";s: 6: "values";N;s: 2: "id";s: 35: "page_scroll_to_id_0_excludeSelector";s: 10: "field_type";s: 4: "text";s: 5: "label";s: 0: "";s: 14: "checkbox_label";N;s: 12: "radio_labels";N;s: 10: "field_info";s: 22: "selectors are excluded";s: 11: "description";s: 203: "Set the links (in the form of <a href="http: //www.w3.org/TR/css3-selectors/" target="_blank">CSS selectors</a>) that will be excluded from plugin&apos;s selectors (the plugin will not handle these links)";s: 7: "wrapper";N;
            }s: 11: "scrollSpeed";a: 10: {
                s: 5: "value";i: 800;s: 6: "values";N;s: 2: "id";s: 31: "page_scroll_to_id_0_scrollSpeed";s: 10: "field_type";s: 12: "text-integer";s: 5: "label";s: 15: "Scroll duration";s: 14: "checkbox_label";N;s: 12: "radio_labels";N;s: 10: "field_info";s: 12: "milliseconds";s: 11: "description";s: 99: "Scroll animation duration (i.e. scrolling speed) in milliseconds (1000 milliseconds equal 1 second)";s: 7: "wrapper";N;
            }s: 15: "autoScrollSpeed";a: 10: {
                s: 5: "value";s: 4: "true";s: 6: "values";N;s: 2: "id";s: 35: "page_scroll_to_id_0_autoScrollSpeed";s: 10: "field_type";s: 8: "checkbox";s: 5: "label";s: 0: "";s: 14: "checkbox_label";s: 30: "Auto-adjust scrolling duration";s: 12: "radio_labels";N;s: 10: "field_info";N;s: 11: "description";s: 104: "Enable to let the plugin fine-tune scrolling duration/speed according to target and page scroll position";s: 7: "wrapper";s: 8: "fieldset";
            }s: 12: "scrollEasing";a: 10: {
                s: 5: "value";s: 14: "easeInOutCubic";s: 6: "values";s: 406: "linear,swing,easeInQuad,easeOutQuad,easeInOutQuad,easeInCubic,easeOutCubic,easeInOutCubic,easeInQuart,easeOutQuart,easeInOutQuart,easeInQuint,easeOutQuint,easeInOutQuint,easeInExpo,easeOutExpo,easeInOutExpo,easeInSine,easeOutSine,easeInOutSine,easeInCirc,easeOutCirc,easeInOutCirc,easeInElastic,easeOutElastic,easeInOutElastic,easeInBack,easeOutBack,easeInOutBack,easeInBounce,easeOutBounce,easeInOutBounce";s: 2: "id";s: 32: "page_scroll_to_id_0_scrollEasing";s: 10: "field_type";s: 6: "select";s: 5: "label";s: 18: "Scroll type/easing";s: 14: "checkbox_label";N;s: 12: "radio_labels";N;s: 10: "field_info";N;s: 11: "description";s: 192: "Scroll animation easing (<a href="http: //manos.malihu.gr/page-scroll-to-id-for-wordpress/#ps2id-duration-easings-demo" target="_blank">visual representation & demo of all easing types</a>)";s: 7: "wrapper";N;
            }s: 15: "scrollingEasing";a: 10: {
                s: 5: "value";s: 12: "easeOutCubic";s: 6: "values";s: 406: "linear,swing,easeInQuad,easeOutQuad,easeInOutQuad,easeInCubic,easeOutCubic,easeInOutCubic,easeInQuart,easeOutQuart,easeInOutQuart,easeInQuint,easeOutQuint,easeInOutQuint,easeInExpo,easeOutExpo,easeInOutExpo,easeInSine,easeOutSine,easeInOutSine,easeInCirc,easeOutCirc,easeInOutCirc,easeInElastic,easeOutElastic,easeInOutElastic,easeInBack,easeOutBack,easeInOutBack,easeInBounce,easeOutBounce,easeInOutBounce";s: 2: "id";s: 35: "page_scroll_to_id_0_scrollingEasing";s: 10: "field_type";s: 6: "select";s: 5: "label";s: 0: "";s: 14: "checkbox_label";N;s: 12: "radio_labels";N;s: 10: "field_info";N;s: 11: "description";s: 98: "Alternative animation easing (applied when a link is clicked while the page is animated/scrolling)";s: 7: "wrapper";N;
            }s: 19: "pageEndSmoothScroll";a: 10: {
                s: 5: "value";s: 4: "true";s: 6: "values";N;s: 2: "id";s: 39: "page_scroll_to_id_0_pageEndSmoothScroll";s: 10: "field_type";s: 8: "checkbox";s: 5: "label";s: 15: "Scroll behavior";s: 14: "checkbox_label";s: 65: "Always scroll smoothly when reaching the end of the page/document";s: 12: "radio_labels";N;s: 10: "field_info";N;s: 11: "description";N;s: 7: "wrapper";s: 8: "fieldset";
            }s: 22: "stopScrollOnUserAction";a: 10: {
                s: 5: "value";s: 5: "false";s: 6: "values";N;s: 2: "id";s: 42: "page_scroll_to_id_0_stopScrollOnUserAction";s: 10: "field_type";s: 8: "checkbox";s: 5: "label";s: 0: "";s: 14: "checkbox_label";s: 49: "Stop page scrolling on mouse-wheel or touch-swipe";s: 12: "radio_labels";N;s: 10: "field_info";N;s: 11: "description";s: 127: "Enable if you want to stop page scrolling when the user tries to scroll the page manually (e.g. via mouse-wheel or touch-swipe)";s: 7: "wrapper";s: 8: "fieldset";
            }s: 17: "autoCorrectScroll";a: 10: {
                s: 5: "value";s: 5: "false";s: 6: "values";N;s: 2: "id";s: 37: "page_scroll_to_id_0_autoCorrectScroll";s: 10: "field_type";s: 8: "checkbox";s: 5: "label";s: 0: "";s: 14: "checkbox_label";s: 99: "Verify target position and readjust scrolling (if necessary), after scrolling animation is complete";s: 12: "radio_labels";N;s: 10: "field_info";N;s: 11: "description";N;s: 7: "wrapper";s: 8: "fieldset";
            }s: 6: "layout";a: 10: {
                s: 5: "value";s: 8: "vertical";s: 6: "values";s: 24: "vertical,horizontal,auto";s: 2: "id";s: 26: "page_scroll_to_id_0_layout";s: 10: "field_type";s: 5: "radio";s: 5: "label";s: 11: "Page layout";s: 14: "checkbox_label";N;s: 12: "radio_labels";s: 24: "vertical|horizontal|auto";s: 10: "field_info";N;s: 11: "description";s: 346: "Restrict page scrolling to top-bottom (vertical) or left-right (horizontal) accordingly. For both vertical and horizontal scrolling select <code>auto</code> <br /><small>Please note that "Layout" option does not transform your theme’s templates layout (i.e. it won’t change your theme/page design from vertical to horizontal).</small>";s: 7: "wrapper";s: 8: "fieldset";
            }s: 6: "offset";a: 10: {
                s: 5: "value";s: 18: ".nav-primary:fixed";s: 6: "values";N;s: 2: "id";s: 26: "page_scroll_to_id_0_offset";s: 10: "field_type";s: 4: "text";s: 5: "label";s: 6: "Offset";s: 14: "checkbox_label";N;s: 12: "radio_labels";N;s: 10: "field_info";s: 6: "pixels";s: 11: "description";s: 189: "Offset scroll-to position by x amount of pixels (positive or negative) or by <a href="http: //www.w3.org/TR/css3-selectors/" target="_blank">selector</a> (e.g. <code>#navigation-menu</code>)";s: 7: "wrapper";N;
            }s: 11: "dummyOffset";a: 10: {
                s: 5: "value";s: 5: "false";s: 6: "values";N;s: 2: "id";s: 31: "page_scroll_to_id_0_dummyOffset";s: 10: "field_type";s: 8: "checkbox";s: 5: "label";s: 0: "";s: 14: "checkbox_label";s: 54: "Auto-generate <code>#ps2id-dummy-offset</code> element";s: 12: "radio_labels";N;s: 10: "field_info";N;s: 11: "description";s: 393: "Enable if you want the plugin to create a hidden element and use its selector as offset. The element that will be created is: <code>#ps2id-dummy-offset</code> <br /><small>You should use the <code>#ps2id-dummy-offset</code> value in the <b>Offset</b> option above. You should then use the same selector/value and in your CSS and give it a height equal to the amount of offset you want.</small>";s: 7: "wrapper";s: 8: "fieldset";
            }s: 17: "highlightSelector";a: 10: {
                s: 5: "value";s: 0: "";s: 6: "values";N;s: 2: "id";s: 37: "page_scroll_to_id_0_highlightSelector";s: 10: "field_type";s: 4: "text";s: 5: "label";s: 21: "Highlight selector(s)";s: 14: "checkbox_label";N;s: 12: "radio_labels";N;s: 10: "field_info";N;s: 11: "description";s: 181: "Set the links (in the form of <a href="http: //www.w3.org/TR/css3-selectors/" target="_blank">CSS selectors</a>) that will be eligible for highlighting (leave empty to highlight all)";s: 7: "wrapper";N;
            }s: 12: "clickedClass";a: 10: {
                s: 5: "value";s: 14: "mPS2id-clicked";s: 6: "values";N;s: 2: "id";s: 32: "page_scroll_to_id_0_clickedClass";s: 10: "field_type";s: 4: "text";s: 5: "label";s: 31: "Classes & highlight options";s: 14: "checkbox_label";N;s: 12: "radio_labels";N;s: 10: "field_info";s: 10: "class name";s: 11: "description";s: 124: "Class of the clicked link. You can use this class (e.g. <code>.mPS2id-clicked</code>) in your CSS to style the clicked link.";s: 7: "wrapper";N;
            }s: 11: "targetClass";a: 10: {
                s: 5: "value";s: 13: "mPS2id-target";s: 6: "values";N;s: 2: "id";s: 31: "page_scroll_to_id_0_targetClass";s: 10: "field_type";s: 4: "text";s: 5: "label";s: 0: "";s: 14: "checkbox_label";N;s: 12: "radio_labels";N;s: 10: "field_info";s: 10: "class name";s: 11: "description";s: 413: "Class of the (current) target element. You can use this class (e.g. <code>.mPS2id-target</code>) in your CSS to style the highlighted target element(s). <br />If multiple elements are highlighted, you can use the <code>-first</code> or <code>-last</code> suffix in the class name (e.g. <code>.mPS2id-target-first</code>, <code>.mPS2id-target-last</code>) to style the first or last highlighted element accordingly";s: 7: "wrapper";N;
            }s: 14: "highlightClass";a: 10: {
                s: 5: "value";s: 16: "mPS2id-highlight";s: 6: "values";N;s: 2: "id";s: 34: "page_scroll_to_id_0_highlightClass";s: 10: "field_type";s: 4: "text";s: 5: "label";s: 0: "";s: 14: "checkbox_label";N;s: 12: "radio_labels";N;s: 10: "field_info";s: 10: "class name";s: 11: "description";s: 409: "Class of the (current) highlighted link. You can use this class (e.g. <code>.mPS2id-highlight</code>) in your CSS to style the highlighted link(s). <br />If multiple links are highlighted, you can use the <code>-first</code> or <code>-last</code> suffix in the class name (e.g. <code>.mPS2id-highlight-first</code>, <code>.mPS2id-highlight-last</code>) to style the first or last highlighted links accordingly";s: 7: "wrapper";N;
            }s: 20: "forceSingleHighlight";a: 10: {
                s: 5: "value";s: 5: "false";s: 6: "values";N;s: 2: "id";s: 40: "page_scroll_to_id_0_forceSingleHighlight";s: 10: "field_type";s: 8: "checkbox";s: 5: "label";s: 0: "";s: 14: "checkbox_label";s: 44: "Allow only one highlighted element at a time";s: 12: "radio_labels";N;s: 10: "field_info";N;s: 11: "description";N;s: 7: "wrapper";s: 8: "fieldset";
            }s: 22: "keepHighlightUntilNext";a: 10: {
                s: 5: "value";s: 5: "false";s: 6: "values";N;s: 2: "id";s: 42: "page_scroll_to_id_0_keepHighlightUntilNext";s: 10: "field_type";s: 8: "checkbox";s: 5: "label";s: 0: "";s: 14: "checkbox_label";s: 123: "Keep the current element highlighted until the next one comes into view (i.e. always keep at least one element highlighted)";s: 12: "radio_labels";N;s: 10: "field_info";N;s: 11: "description";N;s: 7: "wrapper";s: 8: "fieldset";
            }s: 21: "highlightByNextTarget";a: 10: {
                s: 5: "value";s: 5: "false";s: 6: "values";N;s: 2: "id";s: 41: "page_scroll_to_id_0_highlightByNextTarget";s: 10: "field_type";s: 8: "checkbox";s: 5: "label";s: 0: "";s: 14: "checkbox_label";s: 24: "Highlight by next target";s: 12: "radio_labels";N;s: 10: "field_info";N;s: 11: "description";s: 118: "Set targets length according to their next adjacent target position (useful when target elements have zero dimensions)";s: 7: "wrapper";s: 8: "fieldset";
            }s: 10: "appendHash";a: 10: {
                s: 5: "value";s: 5: "false";s: 6: "values";N;s: 2: "id";s: 30: "page_scroll_to_id_0_appendHash";s: 10: "field_type";s: 8: "checkbox";s: 5: "label";s: 14: "Links behavior";s: 14: "checkbox_label";s: 101: "Append the clicked link’s hash value (e.g. <code>#id</code>) to browser’s URL/address bar";s: 12: "radio_labels";N;s: 10: "field_info";N;s: 11: "description";N;s: 7: "wrapper";s: 8: "fieldset";
            }s: 12: "scrollToHash";a: 10: {
                s: 5: "value";s: 5: "false";s: 6: "values";N;s: 2: "id";s: 32: "page_scroll_to_id_0_scrollToHash";s: 10: "field_type";s: 8: "checkbox";s: 5: "label";s: 0: "";s: 14: "checkbox_label";s: 70: "Scroll from/to different pages (i.e. scroll to target when page loads)";s: 12: "radio_labels";N;s: 10: "field_info";N;s: 11: "description";N;s: 7: "wrapper";s: 8: "fieldset";
            }s: 18: "scrollToHashForAll";a: 10: {
                s: 5: "value";s: 5: "false";s: 6: "values";N;s: 2: "id";s: 38: "page_scroll_to_id_0_scrollToHashForAll";s: 10: "field_type";s: 8: "checkbox";s: 5: "label";s: 0: "";s: 14: "checkbox_label";s: 96: "Enable different pages scrolling on all links (even the ones that are not handled by the plugin)";s: 12: "radio_labels";N;s: 10: "field_info";N;s: 11: "description";N;s: 7: "wrapper";s: 8: "fieldset";
            }s: 17: "scrollToHashDelay";a: 10: {
                s: 5: "value";i: 0;s: 6: "values";N;s: 2: "id";s: 37: "page_scroll_to_id_0_scrollToHashDelay";s: 10: "field_type";s: 12: "text-integer";s: 5: "label";s: 0: "";s: 14: "checkbox_label";N;s: 12: "radio_labels";N;s: 10: "field_info";s: 55: "milliseconds delay for scrolling to target on page load";s: 11: "description";N;s: 7: "wrapper";N;
            }s: 26: "scrollToHashUseElementData";a: 10: {
                s: 5: "value";s: 4: "true";s: 6: "values";N;s: 2: "id";s: 46: "page_scroll_to_id_0_scrollToHashUseElementData";s: 10: "field_type";s: 8: "checkbox";s: 5: "label";s: 0: "";s: 14: "checkbox_label";s: 87: "Use element&apos;s custom offset (if it exists) when scrolling from/to different pages.";s: 12: "radio_labels";N;s: 10: "field_info";N;s: 11: "description";N;s: 7: "wrapper";s: 8: "fieldset";
            }s: 25: "scrollToHashRemoveUrlHash";a: 10: {
                s: 5: "value";s: 5: "false";s: 6: "values";N;s: 2: "id";s: 45: "page_scroll_to_id_0_scrollToHashRemoveUrlHash";s: 10: "field_type";s: 8: "checkbox";s: 5: "label";s: 0: "";s: 14: "checkbox_label";s: 123: "Remove URL hash (i.e. the <code>#some-id</code> part in browser&apos;s address bar) when scrolling from/to different pages.";s: 12: "radio_labels";N;s: 10: "field_info";N;s: 11: "description";N;s: 7: "wrapper";s: 8: "fieldset";
            }s: 18: "disablePluginBelow";a: 10: {
                s: 5: "value";i: 0;s: 6: "values";N;s: 2: "id";s: 38: "page_scroll_to_id_0_disablePluginBelow";s: 10: "field_type";s: 4: "text";s: 5: "label";s: 20: "Disable plugin below";s: 14: "checkbox_label";N;s: 12: "radio_labels";N;s: 10: "field_info";s: 11: "screen-size";s: 11: "description";s: 135: "Set the width,height screen-size (in pixels), below which the plugin will be disabled (e.g. <code>1024</code> or <code>1024,600</code>)";s: 7: "wrapper";N;
            }s: 21: "adminDisplayWidgetsId";a: 10: {
                s: 5: "value";s: 4: "true";s: 6: "values";N;s: 2: "id";s: 41: "page_scroll_to_id_0_adminDisplayWidgetsId";s: 10: "field_type";s: 8: "checkbox";s: 5: "label";s: 14: "Administration";s: 14: "checkbox_label";s: 28: "Display widgets id attribute";s: 12: "radio_labels";N;s: 10: "field_info";N;s: 11: "description";s: 65: "Show the id attribute of each widget in Appearance &rarr; Widgets";s: 7: "wrapper";s: 8: "fieldset";
            }s: 19: "adminTinyMCEbuttons";a: 10: {
                s: 5: "value";s: 5: "false";s: 6: "values";N;s: 2: "id";s: 39: "page_scroll_to_id_0_adminTinyMCEbuttons";s: 10: "field_type";s: 8: "checkbox";s: 5: "label";s: 0: "";s: 14: "checkbox_label";s: 55: "Enable insert link/target buttons in post visual editor";s: 12: "radio_labels";N;s: 10: "field_info";N;s: 11: "description";s: 55: "<small>Requires WordPress version 3.9 or higher</small>";s: 7: "wrapper";s: 8: "fieldset";
            }s: 26: "unbindUnrelatedClickEvents";a: 10: {
                s: 5: "value";s: 5: "false";s: 6: "values";N;s: 2: "id";s: 46: "page_scroll_to_id_0_unbindUnrelatedClickEvents";s: 10: "field_type";s: 8: "checkbox";s: 5: "label";s: 16: "Advanced options";s: 14: "checkbox_label";s: 70: "Prevent other scripts from handling plugin’s links (if possible)";s: 12: "radio_labels";N;s: 10: "field_info";N;s: 11: "description";s: 159: "Enable if another plugin or a theme script handles page scrolling and conflicts with "Pagescrolltoid" (removes other scripts js click events from the links)";s: 7: "wrapper";s: 8: "fieldset";
            }s: 27: "normalizeAnchorPointTargets";a: 10: {
                s: 5: "value";s: 5: "false";s: 6: "values";N;s: 2: "id";s: 47: "page_scroll_to_id_0_normalizeAnchorPointTargets";s: 10: "field_type";s: 8: "checkbox";s: 5: "label";s: 0: "";s: 14: "checkbox_label";s: 30: "Normalize anchor-point targets";s: 12: "radio_labels";N;s: 10: "field_info";N;s: 11: "description";s: 86: "Force zero dimensions (via CSS) on targets created with <code>[ps2id]</code> shortcode";s: 7: "wrapper";s: 8: "fieldset";
            }
        }
    }
    
    Plugin Author malihu

    (@malihu)

    Which update doesn’t work? Can you give me an example?

    Thread Starter M3

    (@emmtre)

    We had problem with several sites today when updating to 1.6.5. Probably due to the database caching used by the hosting company. So we had to spend some time before we found out that we had to re-save to flush the database cache.

    Plugin Author malihu

    (@malihu)

    OK. Thanks for the feedback. Please let me know if you need any help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Settings in the wp_options table’ is closed to new replies.