woocommerce_after_/before prefixes

This commit is contained in:
Mike Jolley 2016-08-01 10:27:15 +01:00
parent 97b0161c4c
commit 45d6b88ac6
1 changed files with 8 additions and 7 deletions

View File

@ -271,8 +271,8 @@ class WC_Admin_Attributes {
<form action="edit.php?post_type=product&amp;page=product_attributes&amp;edit=<?php echo absint( $edit ); ?>" method="post">
<table class="form-table">
<tbody>
<?php do_action( 'woocommerce_edit_attribute_fields_before' ) ?>
<tr class="form-field form-required">
<?php do_action( 'woocommerce_before_edit_attribute_fields' ); ?>
<tr class="form-field form-required">
<th scope="row" valign="top">
<label for="attribute_label"><?php _e( 'Name', 'woocommerce' ); ?></label>
</th>
@ -310,7 +310,6 @@ class WC_Admin_Attributes {
<?php endforeach; ?>
<?php
/**
* Deprecated action in favor of product_attributes_type_selector filter.
*
@ -336,7 +335,7 @@ class WC_Admin_Attributes {
<p class="description"><?php _e( 'Determines the sort order of the terms on the frontend shop product pages. If using custom ordering, you can drag and drop the terms in this attribute.', 'woocommerce' ); ?></p>
</td>
</tr>
<?php do_action( 'woocommerce_edit_attribute_fields_after' ) ?>
<?php do_action( 'woocommerce_after_edit_attribute_fields' ) ?>
</tbody>
</table>
<p class="submit"><input type="submit" name="save_attribute" id="submit" class="button-primary" value="<?php esc_attr_e( 'Update', 'woocommerce' ); ?>"></p>
@ -376,7 +375,6 @@ class WC_Admin_Attributes {
if ( $attribute_taxonomies = wc_get_attribute_taxonomies() ) :
foreach ( $attribute_taxonomies as $tax ) :
?><tr>
<td>
<strong><a href="edit-tags.php?taxonomy=<?php echo esc_html( wc_attribute_taxonomy_name( $tax->attribute_name ) ); ?>&amp;post_type=product"><?php echo esc_html( $tax->attribute_label ); ?></a></strong>
@ -442,7 +440,8 @@ class WC_Admin_Attributes {
<h2><?php _e( 'Add New Attribute', 'woocommerce' ); ?></h2>
<p><?php _e( 'Attributes let you define extra product data, such as size or colour. You can use these attributes in the shop sidebar using the "layered nav" widgets. Please note: you cannot rename an attribute later on.', 'woocommerce' ); ?></p>
<form action="edit.php?post_type=product&amp;page=product_attributes" method="post">
<?php do_action( 'woocommerce_add_attribute_fields_before' ) ?>
<?php do_action( 'woocommerce_before_add_attribute_fields' ) ?>
<div class="form-field">
<label for="attribute_label"><?php _e( 'Name', 'woocommerce' ); ?></label>
<input name="attribute_label" id="attribute_label" type="text" value="" />
@ -491,7 +490,9 @@ class WC_Admin_Attributes {
</select>
<p class="description"><?php _e( 'Determines the sort order of the terms on the frontend shop product pages. If using custom ordering, you can drag and drop the terms in this attribute.', 'woocommerce' ); ?></p>
</div>
<?php do_action( 'woocommerce_add_attribute_fields_after' ) ?>
<?php do_action( 'woocommerce_after_add_attribute_fields' ) ?>
<p class="submit"><input type="submit" name="add_new_attribute" id="submit" class="button button-primary" value="<?php esc_attr_e( 'Add Attribute', 'woocommerce' ); ?>"></p>
<?php wp_nonce_field( 'woocommerce-add-new_attribute' ); ?>
</form>