Skip to content

Instantly share code, notes, and snippets.

@max-kk
Last active May 5, 2016 13:53
Show Gist options
  • Save max-kk/e8f7fa4ab70ec78ead5db31edb396032 to your computer and use it in GitHub Desktop.
Save max-kk/e8f7fa4ab70ec78ead5db31edb396032 to your computer and use it in GitHub Desktop.
Change description to full_description in photos list
<?php
// Hook includes/class-fv-functions.php :: render_template()
//apply_filters( 'fv_template_variables', $variables, $type, $template_path );
add_filter( 'fv_template_variables', 'fv_change_descr_to_full_descr', 10, 2 );
function fv_change_descr_to_full_descr($variables, $type) {
if ($type == 'theme') {
$variables['description'] = $variables['photo']->full_description;
}
return $variables;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment