Skip to content

Serialized Options Do Not Work #2

Open
@ronalfy

Description

Is your feature request related to a problem? Please describe.

When serialized options are displayed, they are not being saved properly, because they are serialized already.

Describe the solution you'd like

Here's an example of what to output for serialized options:

{
			"step": "runPHP",
			"code": "<?php require_once 'wordpress/wp-load.php'; update_option( 'wpac', maybe_unserialize( 'a:80:{s:6:\"enable\";b:1;s:5:\"debug\";b:0;s:10:\"menuHelper\";b:1;s:19:\"selectorCommentForm\";s:12:\"#commentform\";s:25:\"selectorCommentsContainer\";s:9:\"#comments\";s:19:\"selectorCommentList\";s:16:\".ct-comment-list\";s:26:\"selectorCommentPagingLinks\";s:9:\"#comments\";s:20:\"selectorCommentLinks\";s:9:\"#comments\";s:24:\"selectorRespondContainer\";s:8:\"#respond\";s:22:\"selectorErrorContainer\";s:8:\"p:parent\";s:20:\"selectorSubmitButton\";s:7:\"#submit\";s:16:\"selectorTextarea\";s:8:\"#comment\";s:21:\"selectorPostContainer\";s:0:\"\";s:11:\"scrollSpeed\";s:3:\"500\";s:18:\"autoUpdateIdleTime\";s:1:\"0\";s:27:\"popupOverlayBackgroundColor\";s:25:\"rgba(254, 254, 254, 0.75)\";s:29:\"popupOverlayBackgroundOpacity\";s:4:\"0.76\";s:27:\"popupBackgroundColorLoading\";s:7:\"#000000\";s:21:\"popupTextColorLoading\";s:7:\"#ffffff\";s:27:\"popupBackgroundColorSuccess\";s:7:\"#008000\";s:21:\"popupTextColorSuccess\";s:7:\"#FFFFFF\";s:25:\"popupBackgroundColorError\";s:7:\"#FF0000\";s:19:\"popupTextColorError\";s:7:\"#FFFFFF\";s:12:\"popupOpacity\";s:2:\"85\";s:18:\"popupOpacityTablet\";s:2:\"85\";s:18:\"popupOpacityMobile\";s:2:\"85\";s:17:\"popupCornerRadius\";s:1:\"5\";s:23:\"popupCornerRadiusTablet\";s:1:\"5\";s:23:\"popupCornerRadiusMobile\";s:1:\"5\";s:14:\"popupMarginTop\";s:2:\"10\";s:20:\"popupMarginTopTablet\";s:2:\"10\";s:20:\"popupMarginTopMobile\";s:2:\"10\";s:10:\"popupWidth\";s:2:\"30\";s:16:\"popupWidthTablet\";s:2:\"45\";s:16:\"popupWidthMobile\";s:2:\"75\";s:12:\"popupPadding\";s:2:\"20\";s:18:\"popupPaddingTablet\";s:2:\"20\";s:18:\"popupPaddingMobile\";s:2:\"20\";s:11:\"popupFadeIn\";s:3:\"400\";s:12:\"popupFadeOut\";s:3:\"400\";s:12:\"popupTimeout\";s:4:\"3000\";s:14:\"popupTextAlign\";s:6:\"center\";s:18:\"popupVerticalAlign\";s:14:\"verticalCenter\";s:17:\"popupTextFontSize\";s:4:\"20px\";s:23:\"popupTextFontSizeTablet\";s:4:\"20px\";s:23:\"popupTextFontSizeMobile\";s:4:\"20px\";s:11:\"popupZindex\";s:4:\"1000\";s:10:\"textPosted\";s:40:\"Your comment has been posted. Thank you!\";s:20:\"textPostedUnapproved\";s:67:\"Your comment has been posted and is awaiting moderation. Thank you!\";s:14:\"textReloadPage\";s:28:\"Reloading page. Please wait.\";s:15:\"textPostComment\";s:34:\"Posting your comment. Please wait.\";s:19:\"textRefreshComments\";s:30:\"Loading comments. Please wait.\";s:16:\"textUnknownError\";s:55:\"Something went wrong, your comment has not been posted.\";s:20:\"textErrorTypeComment\";s:30:\"Please type your comment text.\";s:23:\"textErrorCommentsClosed\";s:41:\"Sorry, comments are closed for this item.\";s:23:\"textErrorMustBeLoggedIn\";s:47:\"Sorry, you must be logged in to post a comment.\";s:27:\"textErrorFillRequiredFields\";s:46:\"Please fill the required fields (name, email).\";s:28:\"textErrorInvalidEmailAddress\";s:35:\"Please enter a valid email address.\";s:23:\"textErrorPostTooQuickly\";s:85:\"You are posting comments too quickly. Please wait a minute and resubmit your comment.\";s:25:\"textErrorDuplicateComment\";s:82:\"Duplicate comment detected. It looks like you have already submitted this comment.\";s:30:\"callbackOnBeforeSelectElements\";s:0:\"\";s:29:\"callbackOnBeforeSubmitComment\";s:0:\"\";s:26:\"callbackOnAfterPostComment\";s:0:\"\";s:30:\"callbackOnBeforeUpdateComments\";s:0:\"\";s:29:\"callbackOnAfterUpdateComments\";s:0:\"\";s:20:\"commentPagesUrlRegex\";s:0:\"\";s:16:\"disableUrlUpdate\";b:1;s:21:\"disableScrollToAnchor\";b:0;s:22:\"useUncompressedScripts\";b:0;s:20:\"placeScriptsInFooter\";b:1;s:20:\"optimizeAjaxResponse\";b:0;s:7:\"baseUrl\";s:0:\"\";s:12:\"disableCache\";b:0;s:13:\"enableByQuery\";b:0;s:15:\"lazyLoadEnabled\";b:1;s:15:\"lazyLoadDisplay\";s:7:\"overlay\";s:15:\"lazyLoadTrigger\";s:8:\"comments\";s:22:\"lazyLoadTriggerElement\";s:0:\"\";s:28:\"lazyLoadInlineDisplayElement\";s:9:\"#comments\";s:16:\"firstTimeInstall\";s:0:\"\";}' ) ); ?>"
		},

Why do you think this feature is something we should consider for this plugin?

This plugin is extremely useful and timesaving, and it'll save me a step of converting the serialized options.

Additional context

Sample blueprint.json: https://raw.githubusercontent.com/DLXPlugins/wp-ajaxify-comments/main/blueprint.json

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions