From eb94b69b25874885871f6bd63ac09f21cf3abd49 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 2 Jul 2020 18:25:51 +0300 Subject: Implimented vechicles cpt. Fixed issue 41. --- wp-content/plugins/dx-cars/class.cpt.php | 23 +++++++++++++++++++++++ wp-content/plugins/dx-cars/dx-cars.php | 16 +++++++++++++--- 2 files changed, 36 insertions(+), 3 deletions(-) (limited to 'wp-content/plugins') diff --git a/wp-content/plugins/dx-cars/class.cpt.php b/wp-content/plugins/dx-cars/class.cpt.php index e69de29..f439934 100644 --- a/wp-content/plugins/dx-cars/class.cpt.php +++ b/wp-content/plugins/dx-cars/class.cpt.php @@ -0,0 +1,23 @@ + array( + 'name' => __( 'Vehicles' ), + 'singular_name' => __( 'Vechicle' ) + ), + 'public' => true, + 'has_archive' => true, + 'rewrite' => array( 'slug' => 'vechicles' ), + 'show_in_rest' => true, ); + return $arr; + } + + function cpt_create() { + register_post_type( 'Vechicles', $this->labels() ); + } +} diff --git a/wp-content/plugins/dx-cars/dx-cars.php b/wp-content/plugins/dx-cars/dx-cars.php index 5e32617..90cc6ec 100644 --- a/wp-content/plugins/dx-cars/dx-cars.php +++ b/wp-content/plugins/dx-cars/dx-cars.php @@ -1,4 +1,14 @@ -init(); -- cgit v1.3.1-26-gb76a