Skip to content
This repository has been archived by the owner on Oct 4, 2017. It is now read-only.

Commit

Permalink
Merge pull request #20 from gellweiler/master
Browse files Browse the repository at this point in the history
Buxfix contact info and summary not showing up.
  • Loading branch information
benbalter committed May 31, 2014
2 parents f4ced75 + c3363b3 commit 7712db8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
10 changes: 5 additions & 5 deletions includes/templating.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
class WP_Resume_Templating {

public $author;
public $author_id;
public $date_format = 'F Y';
public $future_signifier;
private $parent;
Expand All @@ -22,7 +23,7 @@ function __construct( &$parent ) {
$this->parent = &$parent;

$this->author = &$parent->author;

$this->author_id = &$parent->author_id;
add_action( 'plugins_loaded', array( &$this, 'i18n_init' ) );
}

Expand All @@ -47,7 +48,7 @@ function i18n_init() {
*/
function get_name() {

$name = $this->parent->options->get_user_option( 'name', $this->author );
$name = $this->parent->options->get_user_option( 'name', $this->author_id );

$name = $this->parent->api->apply_deprecated_filters( 'resume_name', '2.5', 'name', $name );
return $this->parent->api->apply_filters( 'name', $name );
Expand Down Expand Up @@ -159,8 +160,7 @@ function get_taxonomy_name( $object, $taxonomy, $link ) {
* @returns array of contact info
*/
function get_contact_info() {

$contact_info = $this->parent->options->get_user_option( 'contact_info', $this->author );
$contact_info = $this->parent->options->get_user_option( 'contact_info', $this->author_id );
$contact_info = $this->parent->api->apply_deprecated_filters( 'resume_contact_info', '2.5', 'contact_info', $contact_info );
return $this->parent->api->apply_filters( 'contact_info', $contact_info );

Expand All @@ -174,7 +174,7 @@ function get_contact_info() {
*/
function get_summary() {

$summary = $this->parent->options->get_user_option( 'summary', $this->author );
$summary = $this->parent->options->get_user_option( 'summary', $this->author_id );
$summary = $this->parent->api->apply_deprecated_filters( 'resume_summary', '2.5', 'summary', $summary );
return $this->parent->api->apply_filters( 'summary', $summary );

Expand Down
9 changes: 7 additions & 2 deletions wp-resume.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class WP_Resume extends Plugin_Boilerplate_v_1 {

static $instance;
public $author = null;
public $author_id = null;
public $section = null;
public $query_obj;

Expand Down Expand Up @@ -252,6 +253,7 @@ function get_sections( $hide_empty = true, $author = '' ) {
$author = $user->user_nicename;
}

$this->author_id = $user->id;
$this->author = $author;

//get all sections ordered by term_id (order added)
Expand Down Expand Up @@ -746,6 +748,8 @@ function shortcode( $atts ) {

//determine author and set as global so templates can read
$this->author = $this->get_author( $atts );
$user = get_user_by('slug', $this->author);
$this->author_id = $user->id;

//allow shortcode to accept section argument
$section = $this->get_section( $atts );
Expand Down Expand Up @@ -981,9 +985,10 @@ function feed_get_author() {
} else {

$this->author = $matches[1];
$user = get_userdata('slag', $this->author);

}

$this->author_id = $user->id;
$this->author = $this->api->apply_filters( 'author', $this->author );

return $this->author;
Expand All @@ -994,4 +999,4 @@ function feed_get_author() {
}


$wp_resume = new WP_Resume();
$wp_resume = new WP_Resume();

0 comments on commit 7712db8

Please sign in to comment.