• Home
  • Plugins
    • BSK PDF Manager
    • BSK Forms Blacklist
    • BSK Forms Validation
  • Documentations
    • BSK PDF Manager
    • BSK Forms Blacklist
    • BSK Forms Validation
  • Blog
  • Contact Us
  • Your Account
    • Purchase History
    • Checkout

Action: bsk_pdfm_after_document_update

All filters and hooks should be placed in your active theme’s functions.php file

bsk_pdfm_after_document_update

 

Description

Use this hook to perform actions after a document updated. The hook is triggered when a document is updated..

 

Usage

add_action( "bsk_pdfm_after_document_update", "do_sepcial_action_when_document_updated", 10, 5 );

 

Parameters

  • $pdf_id integer. The id of the new inserted document.
  • $pdf_categories array. The id of the categories that the document is assigned.
  • $pdf_tags array. The id of the tags that the document is assigned.
  • $file_url string. The URL of the file, empty string if no file uploaded.
  • $extra_datas array. Extra data of the document, includes: title ( string), description ( string ), publish_date ( string ), expiry_date ( string ), status ( string ).

 

Example

Save document update log.


add_filter( "bsk_pdfm_after_document_update", "save_document_update_logs", 10, 5 );
function save_document_update_logs( 
                                       $pdf_id,
                                       $pdf_categories,
                                       $pdf_tags,
                                       $file_url,
                                       $extra_datas
                                   ) {

    if ( $extra_datas['status'] != 'published' ) {
        return;
    }

    update_option( 'bsk_pdfm_document_' . $pdf_id . '_' . wp_date( 'Y-m-d-H-i-s' ), 'The document: ' . $extra_datas['title'] . ' is updated on ' . wp_date( 'Y-m-d H:i:s' ) );
}

Installation

  • How to install free version
  • How to install Pro version
  • How to upgrade to Pro version
  • Check version and update automatically
  • Update new version manually
  • Settings

    • Set Upload Directory
    • Multiple document formats
    • Featured image settings
    • Permalink settings
    • Sort PDFs / documents by date / title / custom / last modified
    • Hierarchical Category
    • Capability settings
    • User Available Categories
    • Embedded Viewer
    • Upload

      • Upload PDF / Document
      • Bulk Upload by FTP
      • Bulk add by Media Library
      • Generate thumbnail of PDF
      • Notification

        • Auto on new uploaded
        • Notify admin to approve PDF/document
        • Display all / specific

          • In list
          • In columns
          • In dropdown
          • Get specific PDFs' link only
          • Get specific PDFs' URL only
          • Display by category

            • In list
            • In columns
            • In dropdown
            • Display with category selector

              • In list
              • In columns
              • In dropdown
              • Embed PDF into Post / Page

                • Display PDF by embedding

                Hooks

                • Hooks

                FAQ

                • FAQ
  • Licensing
  • Refund Policy
  • Affiliate Area

 

Copyright © 2025 BannerSky

BannerSky