From: Anthony Talarico Date: Thu, 4 Aug 2016 15:45:01 +0000 (-0400) Subject: added view file containing the mark up for the blog output with basic styles X-Git-Tag: v1.0.0^2~9 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=0943dc89f09b39c6d8ac73a19b9958f5964472c9;p=WP-Plugins%2Fhubspot-blog.git added view file containing the mark up for the blog output with basic styles --- diff --git a/index.php b/index.php index 125fe04..9b4cf5a 100644 --- a/index.php +++ b/index.php @@ -8,6 +8,7 @@ * License: All right reserved */ define('GLM_HUBSPOT_PLUGIN_PATH_FILE', __FILE__); +define('GLM_HUBSPOT_PLUGIN_DIR', plugin_dir_path(__FILE__)); define('GLM_HUBSPOT_DB_VERSION', '0.0.1'); define('GLM_HUBSPOT_DB_VERSION_OPTION_NAME', 'glm_hubspot_db_version'); define('GLM_HUBSPOT_TABLE', 'glm_hubspot_feed'); diff --git a/js/front/front.js b/js/front/front.js new file mode 100644 index 0000000..6b44c8d --- /dev/null +++ b/js/front/front.js @@ -0,0 +1,6 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + diff --git a/models/GlmHubSpotBlog_Widget.php b/models/GlmHubSpotBlog_Widget.php index dc30763..37edea7 100644 --- a/models/GlmHubSpotBlog_Widget.php +++ b/models/GlmHubSpotBlog_Widget.php @@ -68,8 +68,15 @@ class GlmHubSpotBlog_Widget { $path = plugin_dir_path(__FILE__); $this->check_for_updates(); - //echo '
$this->feed_data: ' . print_r( $this->feed_data, true ) . '
'; + $title = $this->feed_data->objects[0]->html_title; + $image_url = $this->feed_data->objects[0]->featured_image; + $content = $this->feed_data->objects[0]->post_body; + $url = $this->feed_data->objects[0]->published_url; + +// echo '
$this->feed_data: ' . print_r( $this->feed_data, true ) . '
'; + include_once GLM_HUBSPOT_PLUGIN_DIR . '/views/frontPage.php'; } + /** * check_for_updates diff --git a/views/frontPage.php b/views/frontPage.php new file mode 100644 index 0000000..ede9c2a --- /dev/null +++ b/views/frontPage.php @@ -0,0 +1,33 @@ +' + . '
' + . '' + . '

' . $title. '

' + . '
' + . '
' + . '' + . '' + . '' + . '
' . $content . '
' + . ' Read More ' + . ''; + ?> + + \ No newline at end of file