Inventory_Presser_Photo_Numberer::add_hooks()
Adds hooks
Return Return
(void)
Source Source
File: includes/class-photo-numberer.php
public function add_hooks() { // Check if photos are attached to a vehicle parent. add_action( 'add_attachment', array( __CLASS__, 'maybe_number_photo' ), 10, 1 ); add_action( 'edit_attachment', array( __CLASS__, 'maybe_number_photo' ), 10, 1 ); /** * Put the sequence number in the title of the post to which photos are * attached in the Media Library table view. */ add_filter( 'the_title', array( $this, 'add_sequence_number_to_titles' ), 10, 2 ); }
Expand full source codeCollapse full source codeView on Github