← Back
Editing: post_type.press_release.inc.php
<?php /** * Custom Post Types (Press_release) * **/ # Exit if accessed directly if(!defined("PRESSRELEASEDISTRIBUTION_EXEC")){ die(); } /** * Display front-end for custom post type press_release * * @package Press Release Distribution * @author lightimagemedia * @version 2.8 * @access public * */ class pressreleasedistribution_TheContent{ /** * Option Plugin * @access private **/ private $options; /** * Instance of a class * * @access public * @return void **/ public function __construct(){ $this->options = get_option("pressreleasedistribution_plugins"); // get current option // TODO: EDIT SINGLE POST INIT /** * Single Post Variable */ // get post id $this->postID = get_the_ID(); // get current post $post = get_post(); // element post $this->ID = $post->ID; $this->post_author = $post->post_author; $this->post_date = $post->post_date; $this->post_date_gmt = $post->post_date_gmt; $this->post_content = $post->post_content; $this->post_title = $post->post_title; $this->post_excerpt = $post->post_excerpt; $this->post_status = $post->post_status; $this->comment_status = $post->comment_status; $this->ping_status = $post->ping_status; $this->post_password = $post->post_password; $this->post_name = $post->post_name; $this->to_ping = $post->to_ping; $this->pinged = $post->pinged; $this->post_modified = $post->post_modified; $this->post_modified_gmt = $post->post_modified_gmt; $this->post_content_filtered = $post->post_content_filtered; $this->post_parent = $post->post_parent; $this->guid = $post->guid; $this->menu_order = $post->menu_order; $this->post_type = $post->post_type; $this->post_mime_type = $post->post_mime_type; $this->comment_count = $post->comment_count; $this->filter = $post->filter; // get post meta // get attachment $this->thumbnail_id = get_post_thumbnail_id($this->postID); //get attachment id // get thumbnail $this->image_thumbnail = get_the_post_thumbnail(); //with html $this->image_thumbnail_src = wp_get_attachment_image_src($this->thumbnail_id); $this->image_large_src = wp_get_attachment_image_src($this->thumbnail_id,"large"); $this->image_medium_src = wp_get_attachment_image_src($this->thumbnail_id,"medium"); $this->image_full_src = wp_get_attachment_image_src($this->thumbnail_id,"full"); } /** * Create front-end * * @param mixed $content * @access public * @return $string $content **/ public function Markup($content){ $new_content = null ; } }
Save File
Cancel