Actions

June 27, 2017 · View on GitHub

General actions

ActionDescriptionArgument(s)
tailor_activatedFires after the plugin is activated
tailor_deactivatedFires after the plugin is deactivated
tailor_updatedFires after the plugin is updatedstring $previous_version
tailor_initFires after all plugin files are loadedTailor $tailor
tailor_saveFires when the save action is triggeredint postid<br>Tailorpost_id <br> Tailor tailor
tailor_save_afterFires after all save actions have been completedint postid<br>Tailorpost_id <br> Tailor tailor
tailor_save_post_contentFires before the updated post content is savedint postid<br>stringpost_id <br> string post_content
string $updated_post_content
tailor_save_post_content_afterFires after the updated post content has been savedint postid<br>stringpost_id <br> string post_content
string $updated_post_content
tailor_partial_{$slug}Fires before a template partial is loadedstring partial<br>stringpartial <br> string slug
string name<br>arrayname <br> array args

Element actions

ActionDescriptionArgument(s)
tailor_load_elementsFires after all default element files are loadedTailor_Elements $element_manager
tailor_register_elementsFires after all default elements have been registeredTailor_Elements $element_manager
tailor_print_element_dataFires after element library data have been printed
tailor_print_element_htmlFires after element HTML templates have been printed
tailor_print_default_element_htmlFires after default element HTML templates have been printed
tailor_element_register_controlsFires after element controls have been registeredTailor_Element $element
tailor_element_register_controls_{$tag}Fires after element controls have been registeredTailor_Element $element
tailor_element_prepare_controlsFires after element controls have been preparedTailor_Element $element

Model actions

ActionDescriptionArgument(s)
tailor_print_modelsFires after element models have been printed
tailor_add_modelsFires after element models have been added to a pageint postid<br>arraypost_id <br> array sanitized_models
tailor_add_modelFires after an element model has been added to a pageint postid<br>arraypost_id <br> array sanitized_model
tailor_update_modelsFires after element models have been updated on a given pageint postid<br>arraypost_id <br> array sanitized_models
tailor_update_modelFires after an element model has been updated on a given pageint postid<br>arraypost_id <br> array sanitized_model
tailor_delete_modelsFires after element models have been deleted on a given pageint $post_id
tailor_delete_modelFires after an element model has been deleted on a given pageint postid<br>intpost_id <br> int model_id
tailor_change_collectionFires after the model collection has been changedint postid<br>arraypost_id <br> array sanitized_models
tailor_save_modelsFires after element models have been saved on a given pageint postid<br>arraypost_id <br> array sanitized_models
ActionDescriptionArgument(s)
tailor_sidebar_initFires when a sidebar session is initialized
tailor_sidebar_headFires when the document head of the sidebar is rendered
tailor_sidebar_contentFires when the sidebar content is rendered
tailor_sidebar_footerFires when the sidebar footer is rendered
tailor_enqueue_sidebar_stylesFires after the sidebar styles are enqueuedstring $handle
tailor_enqueue_sidebar_scriptsFires after the sidebar scripts are enqueuedstring $handle

Canvas actions

ActionDescriptionArgument(s)
tailor_canvas_initFires when a canvas session is initialized
tailor_sidebar_headFires when the document head is rendered during a canvas page load
tailor_sidebar_contentFires when the page content is rendered during a canvas page load
tailor_sidebar_footerFires when the footer is rendered during a canvas page load
tailor_enqueue_canvas_stylesFires after styles are enqueued during a canvas page loadstring $handle
tailor_enqueue_canvas_scriptsFires after scripts are enqueued during a canvas page loadstring $handle

Custom CSS/JavaScript actions

ActionDescriptionArgument(s)
tailor_print_dynamic_css_rulesFires when dynamic CSS rule data is printed
tailor_print_setting_css_rulesFires when setting CSS rule data is printed
tailor_print_customizer_cssFires when Customizer CSS is printed
tailor_print_custom_cssFires when custom CSS is printed
tailor_print_dynamic_cssFires when dynamic CSS is printed
tailor_print_custom_jsFires when custom JavaScript is printed

Template actions

ActionDescriptionArgument(s)
tailor_add_templateFires when a template model collection is addedarray $template
tailor_update_templateFires when a template model collection is updatedarray $template
tailor_delete_templateFires when a template model collection is deletedint $template_id

Setting actions

ActionDescriptionArgument(s)
tailor_load_panelsFires after panels, sections, settings and controls have been loadedTailor_Setting_Manager $setting_manager
tailor_register_panelsFires after panels, sections, settings and controls have been registeredTailor_Setting_Manager $setting_manager
tailor_print_panel_templatesFires after panel templates have been printedstring $type
tailor_save_settingsFires when settings have been savedint postid<br>arraypost_id <br> array settings
tailor_save_{$id}Fires before a setting's save method is calledTailor_Setting $setting
tailor_update_{$type}Fires after a setting's update method is calledmixed value<br>TailorSettingvalue <br> Tailor_Setting setting

Admin actions

ActionDescriptionArgument(s)
tailor_register_admin_settingsFires after admin settings have been registered

REST API actions

ActionDescriptionArgument(s)
tailor_api_loadedFires after REST API files have been loaded
tailor_api_initFires after REST API routes have been created