woocommerce/admin/woocommerce-admin-hooks.php

76 lines
2.3 KiB
PHP
Raw Normal View History

2011-12-12 16:34:56 +00:00
<?php
/**
* WooCommerce Admin Hooks
*
2012-08-14 12:21:34 +00:00
* Action/filter hooks used for WooCommerce functions.
*
* @author WooThemes
* @category Admin
* @package WooCommerce/Admin
* @version 1.6.4
2011-12-12 16:34:56 +00:00
*/
2012-10-15 10:32:24 +00:00
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
2012-08-14 12:21:34 +00:00
/**
* Events
2012-08-14 14:13:08 +00:00
*
* @see woocommerce_delete_post()
2012-12-10 11:23:38 +00:00
* @see woocommerce_trash_post()
* @see woocommerce_untrash_post()
2012-08-14 14:13:08 +00:00
* @see woocommerce_preview_emails()
* @see woocommerce_prevent_admin_access()
* @see woocommerce_check_download_folder_protection()
2012-08-14 14:13:08 +00:00
* @see woocommerce_ms_protect_download_rewite_rules()
2012-08-14 12:21:34 +00:00
*/
2012-12-10 11:23:38 +00:00
add_action('delete_post', 'woocommerce_delete_post');
add_action('wp_trash_post', 'woocommerce_trash_post');
add_action('untrash_post', 'woocommerce_untrash_post');
2011-12-12 16:34:56 +00:00
add_action('admin_init', 'woocommerce_preview_emails');
add_action('admin_init', 'woocommerce_prevent_admin_access');
add_action('woocommerce_settings_saved', 'woocommerce_check_download_folder_protection');
add_filter('mod_rewrite_rules', 'woocommerce_ms_protect_download_rewite_rules');
2011-12-12 16:34:56 +00:00
2012-08-14 12:21:34 +00:00
/**
* File uploads
2012-08-14 14:13:08 +00:00
*
* @see woocommerce_downloads_upload_dir()
* @see woocommerce_media_upload_downloadable_product()
2012-08-14 12:21:34 +00:00
*/
2011-12-12 16:34:56 +00:00
add_filter('upload_dir', 'woocommerce_downloads_upload_dir');
add_action('media_upload_downloadable_product', 'woocommerce_media_upload_downloadable_product');
2012-08-14 12:21:34 +00:00
/**
* Shortcode buttons
2012-08-14 14:13:08 +00:00
*
* @see woocommerce_add_shortcode_button()
* @see woocommerce_refresh_mce()
2012-08-14 12:21:34 +00:00
*/
2011-12-12 16:34:56 +00:00
add_action( 'init', 'woocommerce_add_shortcode_button' );
add_filter( 'tiny_mce_version', 'woocommerce_refresh_mce' );
2012-08-14 12:21:34 +00:00
/**
* Category/term ordering
2012-08-14 14:13:08 +00:00
*
* @see woocommerce_create_term()
* @see woocommerce_delete_term()
2012-08-14 12:21:34 +00:00
*/
2012-10-17 11:05:54 +00:00
add_action( "create_term", 'woocommerce_create_term', 5, 3 );
add_action( "delete_term", 'woocommerce_delete_term', 5 );
2012-08-14 12:21:34 +00:00
/**
* Bulk editing
2012-08-14 14:13:08 +00:00
*
* @see woocommerce_bulk_admin_footer()
* @see woocommerce_order_bulk_action()
* @see woocommerce_order_bulk_admin_notices()
2012-08-14 12:21:34 +00:00
*/
add_action( 'admin_footer', 'woocommerce_bulk_admin_footer', 10 );
add_action( 'load-edit.php', 'woocommerce_order_bulk_action' );
2013-03-10 14:33:27 +00:00
add_action( 'admin_notices', 'woocommerce_order_bulk_admin_notices' );
/**
* Mijireh Gateway
*/
add_action( 'add_meta_boxes', array( 'WC_Gateway_Mijireh', 'add_page_slurp_meta' ) );
add_action( 'wp_ajax_page_slurp', array( 'WC_Gateway_Mijireh', 'page_slurp' ) );