precation->deprecated_function( __METHOD__, '3.1.0' ); return []; } /** * @throws \Exception */ public static function ajax_get_revisions( $data ) { Plugin::$instance->documents->check_permissions( $data['editor_post_id'] ); return self::get_revisions(); } /** * @since 2.3.0 * @access public * @static */ public static function register_ajax_actions( Ajax $ajax ) { $ajax->register_ajax_action( 'get_revisions', [ __CLASS__, 'ajax_get_revisions' ] ); $ajax->register_ajax_action( 'get_revision_data', [ __CLASS__, 'ajax_get_revision_data' ] ); } /** * @since 1.7.0 * @access private * @static */ private static function register_actions() { add_action( 'wp_restore_post_revision', [ __CLASS__, 'restore_revision' ], 10, 2 ); add_action( 'init', [ __CLASS__, 'add_revision_support_for_all_post_types' ], 9999 ); add_filter( 'elementor/document/config', [ __CLASS__, 'document_config' ], 10, 2 ); add_action( 'elementor/db/before_save', [ __CLASS__, 'db_before_save' ], 10, 2 ); add_action( '_wp_put_post_revision', [ __CLASS__, 'save_revision' ] ); add_action( 'wp_creating_autosave', [ __CLASS__, 'update_autosave' ] ); add_action( 'elementor/ajax/register_actions', [ __CLASS__, 'register_ajax_actions' ] ); // Hack to avoid delete the auto-save revision in WP editor. add_filter( 'edit_post_content', [ __CLASS__, 'avoid_delete_auto_save' ], 10, 2 ); add_action( 'edit_form_after_title', [ __CLASS__, 'remove_temp_post_content' ] ); if ( wp_doing_ajax() ) { add_filter( 'elementor/documents/ajax_save/return_data', [ __CLASS__, 'on_ajax_save_builder_data' ], 10, 2 ); } } /** * @since 1.9.0 * @access private * @static */ private static function current_revision_id( $post_id ) { $current_revision_id = $post_id; $autosave = Utils::get_post_autosave( $post_id ); if ( is_object( $autosave ) ) { $current_revision_id = $autosave->ID; } return $current_revision_id; } } Comments for The Purple Pomegranate https://thepurplepomegranate.com Mon, 30 May 2022 09:46:29 +0000 hourly 1 https://wordpress.org/?v=6.9.4 Comment on Hello world! by A WordPress Commenter https://thepurplepomegranate.com/index.php/2022/05/30/hello-world/#comment-1 Mon, 30 May 2022 09:46:29 +0000 https://thepurplepomegranate.com/?p=1#comment-1 Hi, this is a comment.
To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard.
Commenter avatars come from Gravatar.

]]>