Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Changes to Yet Another Related Posts Plugin to support templates in plugin templates folder instead of theme folder
// 5 changes to /classes/YARPP_Core.php for version 4.3.6
// each change involves commenting out 1 line and replacing with revised version
// near line 489
// $this->templates = glob(STYLESHEETPATH . '/yarpp-template-*.php');
$this->templates = glob(YARPP_DIR . '/yarpp-templates' . '/yarpp-template-*.php');
// near line 1121
// } else if ((bool) $template && file_exists(STYLESHEETPATH.'/'.$template)) {
} else if ((bool) $template && file_exists(YARPP_DIR . '/yarpp-templates/' . $template)) {
// near line 1124
// include(STYLESHEETPATH . '/' . $template);
include(YARPP_DIR . '/yarpp-templates/' . $template);
// near line 1309
// } else if ((bool) $template && file_exists(STYLESHEETPATH.'/'.$template)) {
} else if ((bool) $template && file_exists(YARPP_DIR . '/yarpp-templates/' . $template)) {
// near line 1313
// include(STYLESHEETPATH . '/' . $template);
include(YARPP_DIR . '/yarpp-templates/' . $template);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment