Category: Javascript Actions

  • pbs.option.changed

    pbs.option.changed

    Triggered when an option (from the inspector) was changed.

    Parameters

    None.

  • pbs.save.payload

    pbs.save.payload

    Called right before the editor saves the contents. You can use this to place additional data to send during saving (this doesn’t save the data, just sends it via Ajax to the backend)

    Parameters

    payload

    FormData object. The data sent via Ajax for saving.

    Example

    wp.hooks.addAction( 'pbs.save.payload', function( payload ) {
    
    	// Add data to be sent during saving.
    	payload.append( 'my_data', 'My Data' );
    }
    
  • pbs.init

    pbs.init

    Called when the PBS editor finishes loading (not called when the user clicks on the start editing button)

    Example

    Do something after PBS loads

    wp.hooks.addAction( 'pbs.init', function() {
    	console.log( 'PBS is ready!' );
    }
  • pbs.iframe.resized

    pbs.iframe.resized

    Triggered when the user changes between the different responsive views.

    Parameters

    None.