• File: project.php
  • Full Path: /home/monpetu/www/leoreno.fr/post_types/project.php
  • Date Modified: 10/29/2024 2:43 PM
  • File size: 1.41 KB
  • MIME-type: text/x-php
  • Charset: utf-8
<?php

/**
 * Abstract class for register post type
 *
 * @package    WordPress
 * @subpackage Student2 Plugin
 * @author     Shahbaz Ahmed <shahbazahmed9@hotmail.com>
 * @version    1.0
 */

namespace TURNERPLUGIN\Inc\Post_Types;
use TURNERPLUGIN\Inc\Abstracts\Post_Type;
if ( ! function_exists( 'add_action' ) ) {
	exit;
}

/**
 * Abstract Post Type
 * Implemented by classes using the same CRUD(s) pattern.
 *
 * @version  2.6.0
 * @package  TURNERPLUGIN/Abstracts
 * @category Abstract Class
 * @author   Wptech
 */
class Project extends Post_Type {
	protected $post_type = 'project';
	protected $menu_icon = 'dashicons-portfolio';
	protected $taxonomies = array();
	public static $instance;

	/**
	 * [instance description]
	 *
	 * @return [type] [description]
	 */
	public static function instance() {
		if ( is_null( self::$instance ) ) {
			self::$instance = new self();
		}
		
		return self::$instance;
	}

	/**
	 * [init description]
	 *
	 * @return [type] [description]
	 */

	public static function init() {
		self::instance()->menu_name = esc_html__( 'Projects', 'wpfixker' );
		self::instance()->singular  = esc_html__( 'Project', 'wpturner' );
		self::instance()->plural    = esc_html__( 'Projects', 'wpturner' );
		self::instance()->supports    = array('title', 'editor', 'thumbnail', 'excerpt');
		add_action( 'init', array( self::instance(), 'register' ) );
	}
}