From cbedac10ddd5446e0cafc307f561235907dc2582 Mon Sep 17 00:00:00 2001 From: Avinash Date: Tue, 11 Jul 2017 11:46:54 +0530 Subject: [PATCH] PSR update --- bootstrap/collectionpress/author_display.php | 15 +- .../collectionpress/author_display_posts.php | 17 +- bootstrap/collectionpress/cp_author_list.php | 21 ++- bootstrap/collectionpress/cp_item.php | 20 +-- bootstrap/collectionpress/item_display.php | 28 ++-- bootstrap/single-cp_authors.php | 158 +++++++++--------- 6 files changed, 129 insertions(+), 130 deletions(-) diff --git a/bootstrap/collectionpress/author_display.php b/bootstrap/collectionpress/author_display.php index 4f861e3..867f3d7 100644 --- a/bootstrap/collectionpress/author_display.php +++ b/bootstrap/collectionpress/author_display.php @@ -8,13 +8,10 @@ ?>
> - - -

- - + + +

+
diff --git a/bootstrap/collectionpress/author_display_posts.php b/bootstrap/collectionpress/author_display_posts.php index 9d249b0..867f3d7 100644 --- a/bootstrap/collectionpress/author_display_posts.php +++ b/bootstrap/collectionpress/author_display_posts.php @@ -7,14 +7,11 @@ * */ ?>
> - - - -

- - + + + +

+
diff --git a/bootstrap/collectionpress/cp_author_list.php b/bootstrap/collectionpress/cp_author_list.php index 82687fd..45b6713 100644 --- a/bootstrap/collectionpress/cp_author_list.php +++ b/bootstrap/collectionpress/cp_author_list.php @@ -11,7 +11,7 @@ $posts_per_page = get_option("post_per_page"); $paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1; $author_results = new WP_Query(array( - "post_type" =>"cp_authors", + "post_type" =>"cp_authors", "post_status" =>"publish", "orderby" =>"modified", "order" =>"DESC", @@ -26,13 +26,14 @@
- have_posts()): ?> - have_posts() ) : $author_results->the_post(); ?> + have_posts() ): ?> + have_posts()) : ?> + the_post(); ?>
> - +

@@ -40,18 +41,20 @@ + +

diff --git a/bootstrap/collectionpress/cp_item.php b/bootstrap/collectionpress/cp_item.php index 1f87fc3..51f3fb5 100644 --- a/bootstrap/collectionpress/cp_item.php +++ b/bootstrap/collectionpress/cp_item.php @@ -1,15 +1,15 @@ /collectionpress/cp_item.php" * */ get_header(); -if (isset($_GET) && isset($_GET['item_id'])){ - if ( $_GET['item_id']!='' ){ +if (isset($_GET) && isset($_GET['item_id'])) { + if ($_GET['item_id']!='') { $item_id = $_GET['item_id']; $cp_author = new CP_Author(); //~ do_action( 'show_item_details', $item_id ); @@ -23,19 +23,19 @@
- - metadata as $md): ?> + + metadata as $md) : ?>

element; ?>

qualifier; ?>

value; ?>

- - + + +

- - +
diff --git a/bootstrap/collectionpress/item_display.php b/bootstrap/collectionpress/item_display.php index 0afc185..775eae7 100644 --- a/bootstrap/collectionpress/item_display.php +++ b/bootstrap/collectionpress/item_display.php @@ -7,24 +7,24 @@ * */ ?> - + response->numFound; - $start_page = $response->response->start; - $limit = $response->responseHeader->params->rows; - $total_results = count($response->response->docs); - $total_pages = ceil($total_count/$limit); + $total_count = $response->response->numFound; + $start_page = $response->response->start; + $limit = $response->responseHeader->params->rows; + $total_results = count($response->response->docs); + $total_pages = ceil($total_count/$limit); ?> diff --git a/bootstrap/single-cp_authors.php b/bootstrap/single-cp_authors.php index 83c320a..628ad16 100644 --- a/bootstrap/single-cp_authors.php +++ b/bootstrap/single-cp_authors.php @@ -12,104 +12,106 @@
- + +
> -
- + '' ) ); - ?> -
+ wp_link_pages(array('before' => '')); + ?> +
-
-

+
+

- -
-
-

- $cp_related_author, - "post_type" =>"post", - "post_status" =>"publish", - "orderby" =>"modified", - "order" =>"DESC", - "posts_per_page" =>get_option('posts_per_page'), - "cache_results" => false, - "paged" => $aposts) ); - $found_posts =$author_posts->found_posts; - $total_pages =$author_posts->max_num_pages; - if ($author_posts->have_posts()) : - while ($author_posts->have_posts()) : $author_posts->the_post(); - - if (file_exists(locate_template('collectionpress/author_display_posts.php'))) { - include(locate_template('collectionpress/author_display_posts.php')); - } else { - include(CP_TEMPLATE_PATH.'/collectionpress/author_display_posts.php'); - } - - endwhile; ?> - - - -
+ +
+

+ $cp_related_author, + "post_type" =>"post", + "post_status" =>"publish", + "orderby" =>"modified", + "order" =>"DESC", + "posts_per_page" =>get_option('posts_per_page'), + "cache_results" => false, + "paged" => $aposts)); + $found_posts =$author_posts->found_posts; + $total_pages =$author_posts->max_num_pages; + if ($author_posts->have_posts()) : + while ($author_posts->have_posts()) : + $author_posts->the_post(); - - + endwhile; ?> + + +
+ + +