Tag/category conversion link on edit-tags.php should point to specific importer page when cat2tag plugin is active.
Props solarissmoke, c3mdigital. Fixes #16369. git-svn-id: https://develop.svn.wordpress.org/trunk@32792 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
86672e7d8c
commit
91512a9161
|
@ -302,6 +302,13 @@ if ( isset( $_REQUEST['message'] ) && ( $msg = (int) $_REQUEST['message'] ) ) {
|
|||
}
|
||||
|
||||
$class = ( isset( $_REQUEST['error'] ) ) ? 'error' : 'updated';
|
||||
|
||||
if ( is_plugin_active( 'wpcat2tag-importer/wpcat2tag-importer.php' ) ) {
|
||||
$import_link = admin_url( 'admin.php?import=wpcat2tag' );
|
||||
} else {
|
||||
$import_link = admin_url( 'import.php' );
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="wrap nosubsub">
|
||||
|
@ -347,12 +354,12 @@ endif; ?>
|
|||
?>
|
||||
</p>
|
||||
<?php if ( current_user_can( 'import' ) ) : ?>
|
||||
<p><?php printf(__('Categories can be selectively converted to tags using the <a href="%s">category to tag converter</a>.'), 'import.php') ?></p>
|
||||
<p><?php printf( __( 'Categories can be selectively converted to tags using the <a href="%s">category to tag converter</a>.' ), esc_url( $import_link ) ) ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php elseif ( 'post_tag' == $taxonomy && current_user_can( 'import' ) ) : ?>
|
||||
<div class="form-wrap">
|
||||
<p><?php printf(__('Tags can be selectively converted to categories using the <a href="%s">tag to category converter</a>.'), 'import.php') ;?></p>
|
||||
<p><?php printf( __( 'Tags can be selectively converted to categories using the <a href="%s">tag to category converter</a>.' ), esc_url( $import_link ) ) ;?></p>
|
||||
</div>
|
||||
<?php endif;
|
||||
|
||||
|
|
Loading…
Reference in New Issue