Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.

Action Hooks

Thorsten Frommen edited this page Jul 1, 2015 · 4 revisions

Below you can find all currently available, not deprecated action hooks, in alphabetical order.

inpsyde_mlp_init

Runs before internal actions are registered.

Parameters:

  • Inpsyde_Property_List_Interface $plugin_data Plugin data object.
  • wpdb $wpdb Database object.

inpsyde_mlp_loaded

Runs after internal actions have been registered.

Parameters:

  • Inpsyde_Property_List_Interface $plugin_data Plugin data object.
  • wpdb $wpdb Database object.

mlp_after_new_blog_fields

Runs at the end but still inside the new blog fields table.

Parameters: n/a

mlp_after_post_synchronization

Runs after all save_post actions have been called for the remote blogs.

Parameters:

  • array $save_context Context of the to-be-saved post.
    • int $source_blog Source blog ID.
    • WP_Post $source_post Source post object.
    • string $real_post_type Post type of the real post (in case we are saving a revision).
    • int $real_post_id Post ID of the real post (in case we are saving a revision).

mlp_after_term_synchronization

Runs after the terms have been changed.

Parameters:

  • int $term_taxonomy_id Term taxonomy ID.
  • string $taxonomy Taxonomy name.
  • string $current_filter Current_filter.
  • bool $success Denotes whether or not the database was changed.

mlp_and_wp_loaded

Late loading event for MultilingualPress.

Parameters:

  • Inpsyde_Property_List_Interface $plugin_data Plugin data object.
  • wpdb $wpdb Database object.

mlp_before_post_synchronization

Runs before the first save_post action is called for the remote blogs.

Parameters:

  • array $save_context Context of the to-be-saved post.
    • int $soutce_blog Source blog ID.
    • WP_Post $source_post Source post object.
    • string $real_post_type Post type of the real post (in case we are saving a revision).
    • int $real_post_id Post ID of the real post (in case we are saving a revision).

mlp_before_term_synchronization

Runs before the terms are changed.

Parameters:

  • int $term_taxonomy_id Term taxonomy ID.
  • string $taxonomy Taxonomy name.
  • string $current_filter Current_filter.

mlp_blogs_add_fields

Runs at the end of but still inside the site settings table.

Parameters:

  • int $blog_id Blog ID.

mlp_blogs_save_fields

Runs after having saved the site settings.

Parameters:

  • array $_POST The $_POST superglobal.

mlp_duplicated_blog

Runs after successful blog duplication.

Parameters:

  • int[] $context Blog duplication context.
    • int $source_blog_id Source blog ID.
    • int $new_blog_id New blog ID.

mlp_modules_add_fields

Runs after the features table.

Parameters: n/a

mlp_modules_add_fields_to_table

Runs at the end of but still inside the features table.

Parameters: n/a

mlp_modules_save_fields

Runs before the redirect. Process your fields in the $_POST superglobal here and then call update_site_option().

Parameters:

  • array $_POST The $_POST superglobal.

mlp_post_translator_init

Runs before internal actions are registered.

Parameters:

  • array $translator_init_args Translator arguments.
    • Inpsyde_Nonce_Validator $nonce Nonce validator object.
    • Mlp_Save_Post_Request_Validator $request_validator Request validator object.
    • string[] $allowed_post_types Allowed post types.
    • Mlp_Translatable_Post_Data $basic_data Basic post data object.
    • Mlp_Translation_Metabox $instance Meta box object.

mlp_prepare_nav_menu_item_output

Runs before a nav menu item is sent to the walker.

Parameters:

  • WP_Post $item Nav menu item object.
  • Mlp_Translation_Interface $translation Translation object.

mlp_reset_table_done

Runs after having reset the database table.

Parameters:

  • Mlp_Db_Languages_Schema $table_schema Languages table schema.

mlp_translation_meta_box_bottom

Runs before the main content of the meta box.

Parameters:

  • WP_Post $post Post object.
  • int $remote_blog_id Remote blog ID.
  • WP_Post $remote_post Remote post object.

mlp_translation_meta_box_bottom_{$remote_blog_id}

Runs before the main content of the meta box.

Parameters:

  • WP_Post $post Post object.
  • int $remote_blog_id Remote blog ID.
  • WP_Post $remote_post Remote post object.

mlp_translation_meta_box_main

Runs with the main content of the meta box.

Parameters:

  • WP_Post $post Post object.
  • int $remote_blog_id Remote blog ID.
  • WP_Post $remote_post Remote post object.

mlp_translation_meta_box_main_{$remote_blog_id}

Runs with the main content of the meta box.

Parameters:

  • WP_Post $post Post object.
  • int $remote_blog_id Remote blog ID.
  • WP_Post $remote_post Remote post object.

mlp_translation_meta_box_registered

Runs after registration of the meta box for the given blog's language.

Parameters:

  • WP_Post $post Post object.
  • int $blog_id Blog ID.

mlp_translation_meta_box_top

Runs before the main content of the meta box.

Parameters:

  • WP_Post $post Post object.
  • int $remote_blog_id Remote blog ID.
  • WP_Post $remote_post Remote post object.

mlp_translation_meta_box_top_{$remote_blog_id}

Runs before the main content of the meta box.

Parameters:

  • WP_Post $post Post object.
  • int $remote_blog_id Remote blog ID.
  • WP_Post $remote_post Remote post object.