Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Function name collision with Actions Pack Plugin #808

Merged
merged 4 commits into from
Feb 15, 2024

Conversation

mebishalnapit
Copy link
Collaborator

This PR includes:

  • Check for function exists before defining ap_verify_nonce function

@mebishalnapit mebishalnapit linked an issue Aug 10, 2023 that may be closed by this pull request
*/
function ap_verify_nonce( $action ) {
return wp_verify_nonce( ap_sanitize_unslash( '__nonce', 'p' ), $action );
if ( ! function_exists( 'ap_verify_nonce' ) ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mebishalnapit Unfortunately, integrating other plugin functions here isn't feasible. It poses a risk of disrupting our ajax actions. To address this, we'll need to deprecate the current function and introduce a new one, anspress_verify_nonce. Then, we'll have to systematically replace all instances of calls to the ap_verify_nonce function throughout our plugin.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rahularyan Done.

@rahularyan rahularyan merged commit b9a831d into master Feb 15, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Function name collision with Actions Pack Plugin
2 participants