Add fixtures importer button events screen
This commit is contained in:
@@ -94,6 +94,19 @@ class SP_Admin {
|
|||||||
public function action_links() {
|
public function action_links() {
|
||||||
global $pagenow, $typenow;
|
global $pagenow, $typenow;
|
||||||
if ( 'edit.php' == $pagenow && in_array( $typenow, sp_primary_post_types() ) ) {
|
if ( 'edit.php' == $pagenow && in_array( $typenow, sp_primary_post_types() ) ) {
|
||||||
|
if ( 'sp_event' === $typenow ) {
|
||||||
|
?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
(function($) {
|
||||||
|
$(".wrap .page-title-action:first-child").after(
|
||||||
|
$("<a class=\"add-new-h2\" href=\"<?php echo esc_url( admin_url( add_query_arg( array( 'import' => 'sp_fixture_csv' ), 'admin.php' ) ) ); ?>\"><?php _e( 'Import Fixtures', 'sportspress' ); ?></a>")
|
||||||
|
).after(
|
||||||
|
$("<a class=\"add-new-h2\" href=\"<?php echo esc_url( admin_url( add_query_arg( array( 'import' => 'sp_event_csv' ), 'admin.php' ) ) ); ?>\"><?php _e( 'Import Events', 'sportspress' ); ?></a>")
|
||||||
|
);
|
||||||
|
})(jQuery);
|
||||||
|
</script>
|
||||||
|
<?php
|
||||||
|
} else {
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
(function($) {
|
(function($) {
|
||||||
@@ -105,6 +118,7 @@ class SP_Admin {
|
|||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return new SP_Admin();
|
return new SP_Admin();
|
||||||
Reference in New Issue
Block a user