Support » Plugin: WP Security Audit Log » Possible to log ‘edits’ made via Elementor & Gravity Form elements?

  • Resolved cashwellcamc

    (@cashwellcamc)


    Is it possible to use this plugin to log the users activity from Elementor and Gravity forms? Would this be creating custom sensors to do this?

    I downloaded the custom event template; but I’m not really sure how to define Elementor or Gravity Forms in the below?

    $custom_alerts = array(
        __('Third Party Support', 'wp-security-audit-log') => array(
            __('Custom Alerts', 'wp-security-audit-log') => array(
                array(2222, E_CRITICAL, __('Custom critical Alert', 'wp-security-audit-log'), __('%CustomAlertText%', 'wp-security-audit-log')),
                array(3333, E_WARNING, __('Custom warning Alert', 'wp-security-audit-log'), __('%CustomAlertText%', 'wp-security-audit-log')),
                array(4444, E_NOTICE, __('Custom notice Alert', 'wp-security-audit-log'), __('%CustomAlertText%', 'wp-security-audit-log'))
            )
        )
    );
    

    I would really appreciate any pointers! Would love for this plugin to be my ‘go-to’ if I can figure out how to incorporate it with Elementor and Gravity Forms.

    • This topic was modified 2 months, 1 week ago by  cashwellcamc.
Viewing 2 replies - 1 through 2 (of 2 total)
  • In Elementors documentation it mentions the below (I think for a similar plugin). Anything usable from the below I can try in the ‘custom event template’ above?

    add_action( 'elementor/editor/after_save', function( $post_id, $editor_data ) {
        // Activity Log Plugin
        aal_insert_log(
    		[
    			'action' => 'saved',
    			'object_type' => 'Elementor Data',
    			'object_id' => $post_id,
    			'object_name' => get_the_title( $post_id ),
    		]
    	);
    }
    Plugin Contributor robertabela

    (@robert681)

    Hello @cashwellcamc

    Yes, in such case you have to create custom activity events in the plugin.

    Unfortunately we are not very familiar with the Elementor code. However the logic of how this works is as follows:

    1) Define the custom event template.

    2) Look for the hook inside Elementor where the change is happening (you might ask them). That is the hook you need to use in the custom sensor to record the change.

    The documentation which I’ve linked to above has some examples. If you’d like to see some of the easiest events, check out the LogInOut and UserProfile sensors in the plugn’s /classes/Sensors/ directories.

    Hope that helps. If you have any further questions please do not hesitate to ask.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.