Permalink
Browse files

plugin compatibility

  • Loading branch information...
tareq1988 committed Mar 1, 2016
1 parent 74061ee commit 7e3f3ac549c021fc76195a3e514b44b86fd4cd35
Showing with 21 additions and 4 deletions.
  1. +4 −0 functions.php
  2. +3 −0 lib/custom.php
  3. +5 −1 lib/walker-docs.php
  4. +2 −2 single-docs.php
  5. +7 −1 templates/content-single.php
View
@@ -121,6 +121,8 @@ function wedocs_docs_search_filter( $query ) {
add_filter( 'pre_get_posts', 'wedocs_docs_search_filter' );
+if ( ! function_exists( 'wedocs_get_posts_children' ) ) :
+
function wedocs_get_posts_children( $parent_id, $post_type = 'page' ){
$children = array();
// grab the posts children
@@ -138,3 +140,5 @@ function wedocs_get_posts_children( $parent_id, $post_type = 'page' ){
$children = array_merge($children,$posts);
return $children;
}
+
+endif;
View
@@ -3,6 +3,7 @@
* Custom functions
*/
+if ( ! function_exists( 'wedocs_breadcrumbs' ) ) :
function wedocs_breadcrumbs() {
@@ -127,6 +128,8 @@ function wedocs_breadcrumbs() {
}
}
+endif;
+
/**
* Footer credits.
*/
View
@@ -1,5 +1,7 @@
<?php
+if ( ! class_exists( 'WeDocs_Walker_Docs' ) ) :
+
/**
* weDocs Docs Walker
*/
@@ -37,4 +39,6 @@ public function start_el( &$output, $page, $depth = 0, $args = array(), $current
parent::start_el( $output, $page, $depth, $args, $current_page);
}
-}
+}
+
+endif;
View
@@ -3,7 +3,7 @@
$skip_sidebar = get_post_meta( $post->ID, 'skip_sidebar', true );
?>
-<div class="row">
+<div class="row wedocs-single-wrap">
<?php if ( $skip_sidebar != 'yes' ) { ?>
<div class="col-sm-3">
@@ -48,7 +48,7 @@
</div>
<?php } ?>
- <div class="col-sm-<?php echo $skip_sidebar == 'yes' ? '12 skip-sidebar' : 9; ?> doc-single-content">
+ <div class="col-sm-<?php echo $skip_sidebar == 'yes' ? '12 skip-sidebar' : 9; ?> wedocs-single-content">
<?php wedocs_breadcrumbs(); ?>
<?php get_template_part('templates/content', 'single'); ?>
</div>
@@ -27,7 +27,13 @@
echo '</div>';
}
- get_template_part( 'templates/content', 'feedback' );
+ if ( function_exists( 'wedocs_doc_nav' ) ) {
+ wedocs_doc_nav();
+ }
+
+ if ( function_exists( 'wedocs_get_template_part' ) ) {
+ wedocs_get_template_part( 'content', 'feedback' );
+ }
}
?>

0 comments on commit 7e3f3ac

Please sign in to comment.