Sruthy@xyzscripts
Forum Replies Created
-
Forum: Plugins
In reply to: [Insert PHP Code Snippet] add_action hook-call not workingThe code snippets were executed only during the rendering of a page.
Actions are the hooks that the WordPress core launches at specific points during execution, or when specific events occur. So add_action can’t be used in snippet code.
You can write this code into functions.php of your activated theme.
Forum: Plugins
In reply to: [Insert PHP Code Snippet] Help w/debugging?Hi,
The error message “Warning: usort() expects parameter 2 to be a valid callback, function ‘date_compare’ not found or invalid function name” indicates that there is an issue with the second parameter passed to the usort() function.
The usort() function is used to sort an array using a user-defined comparison function. The second parameter of the usort() function should be a valid callback function that can be used to compare the elements of the array.
In this case, the error message suggests that the function named “date_compare” is either not defined or has an invalid function name.
To resolve this error, you need to make sure that the function named “date_compare” is defined and has a valid function name. You should check the spelling of the function name and make sure that the function is defined in the correct file and in the correct scope.
You should also ensure that the function is properly defined as a callback function. A valid callback function must accept two parameters and return an integer value that represents the result of the comparison between the two parameters.
Forum: Reviews
In reply to: [Insert PHP Code Snippet] PHP Parse error: Unclosed curly braceHello @zainvirgo
We have investigated our plugin for a considerable amount of time. But, we didn’t find such an issue at our end.So would you please check any unclosed { exist in your snippet code.
Would you please check whether there exist a draft page named Snippet Preview.If not please deactivate and activate the plugin and check again.
Forum: Plugins
In reply to: [Insert PHP Code Snippet] not working with PHP 8.0Would you please share your snippet code
Forum: Plugins
In reply to: [Insert PHP Code Snippet] divide by zero in error_logwould you please share your snippet code here?
Forum: Plugins
In reply to: [Insert PHP Code Snippet] insert-php-code-snippet/shortcode-handler.php(99)Check The following in your wp-config.php file for the database values for connection are correct
DB_HOST
DB_USER
DB_NAME
DB_PASSWORDSForum: Plugins
In reply to: [Insert PHP Code Snippet] Can’t save PHP $_POST codeWould you please cross check and let know that the issue persist only when the code contains $_POST, $_SESSION etc?
You can’t set a snippet as form action.You can create the form and its action in the same snippet.
Forum: Plugins
In reply to: [Insert PHP Code Snippet] passing post_id to snippetNo.It’s not possible
Forum: Plugins
In reply to: [Insert PHP Code Snippet] Help for beginnerWould you please remove action from form and try again?
Forum: Plugins
In reply to: [Insert PHP Code Snippet] Parameters not workingYou can pass parameters only in our premium snippet plugin XYZ WP Insert code snippet.
Forum: Plugins
In reply to: [Insert PHP Code Snippet] Now working on WordPress latest update (5.8.1)would you please post what the issue you face with the latest wordpress update.
Forum: Plugins
In reply to: [Insert PHP Code Snippet] location replace or window.location doesn’t workPlease try to use like this,
echo ‘<script>window.location.href = “https://example.com/new_url”;</script>’;Forum: Plugins
In reply to: [Insert PHP Code Snippet] Parameters not workingWould you please post the shortcode you used?