Changeset 1661925
- Timestamp:
- 05/22/2017 01:24:49 AM (9 years ago)
- Location:
- listings-wp/trunk
- Files:
-
- 9 edited
-
assets/css/listings-wp.css (modified) (2 diffs)
-
includes/admin/class-lwp-admin-options.php (modified) (3 diffs)
-
includes/frontend/template-hooks.php (modified) (1 diff)
-
includes/frontend/template-tags.php (modified) (2 diffs)
-
includes/functions-listing.php (modified) (1 diff)
-
listings-wp.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
templates/archive-listing.php (modified) (1 diff)
-
templates/global/wrapper-end.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
listings-wp/trunk/assets/css/listings-wp.css
r1661904 r1661925 117 117 max-width: 25% 118 118 } 119 .listings-wp-single . sidebar .agent {120 display: inline-block; 121 } 122 .listings-wp-single . sidebar .agent h4.name {119 .listings-wp-single .agent { 120 display: inline-block; 121 } 122 .listings-wp-single .agent h4.name { 123 123 font-weight: 600; 124 124 margin-bottom: 0; … … 145 145 margin: 5px 0 20px; 146 146 padding: 0; 147 display: inline -block;147 display: inline; 148 148 } 149 149 .listings-wp-single ul.contact li { -
listings-wp/trunk/includes/admin/class-lwp-admin-options.php
r1661904 r1661925 225 225 'type' => 'text', 226 226 )); 227 227 228 228 229 229 230 $cmb->object_type( 'options-page' ); … … 272 273 273 274 $cmb->add_field( array( 275 'name' => __( 'Force Listings Page Title', 'listings-wp-related' ), 276 'desc' => __( 'If your page title is not displaying correctly, you can force the page title here.', 'listings-wp-related' ) . '<br>' . __( '(Some themes may be using incorrect template tags to display the archive title. This forces the title within the page)', 'listings-wp-related' ), 277 'id' => 'archives_page_title', 278 'type' => 'select', 279 'default' => 'no', 280 'options' => array( 281 'no' => __( 'No', 'listings-wp' ), 282 'yes' => __( 'Yes', 'listings-wp' ), 283 ), 284 )); 285 286 $cmb->add_field( array( 274 287 'name' => __( 'Single Listing URL', 'listings-wp' ), 275 288 'desc' => __( 'The single listing URL (or slug).', 'listings-wp' ) . '<br>' . … … 279 292 'default' => 'listing', 280 293 )); 294 295 296 281 297 282 298 $cmb->object_type( 'options-page' ); -
listings-wp/trunk/includes/frontend/template-hooks.php
r1654776 r1661925 25 25 * 26 26 */ 27 add_action( 'listings_wp_archive_page_content', 'listings_wp_listing_archive_content', 10 ); 27 add_action( 'listings_wp_archive_page_content', 'listings_wp_listing_archive_title', 10 ); 28 add_action( 'listings_wp_archive_page_content', 'listings_wp_listing_archive_content', 20 ); 28 29 29 30 add_action( 'listings_wp_before_listings_loop', 'listings_wp_ordering', 10 ); -
listings-wp/trunk/includes/frontend/template-tags.php
r1660581 r1661925 200 200 /*=================================== Archive page =================================== 201 201 */ 202 add_filter( 'get_the_archive_title', 'listings_wp_listing_display_theme_title', 10, 1 ); 203 function listings_wp_listing_display_theme_title( $title ) { 204 if( ! is_listing_archive() ) 205 return $title; 206 207 $title = listings_wp_listing_archive_get_title(); 208 return $title; 209 210 } 211 212 213 if ( ! function_exists( 'listings_wp_listing_archive_title' ) ) { 214 215 function listings_wp_listing_archive_title() { 216 217 $force = listings_wp_force_page_title(); 218 219 if( $force != 'yes' ) 220 return; 221 ?> 222 223 <h1 class="page-title"><?php esc_html_e( listings_wp_listing_archive_get_title() ); ?></h1> 224 225 <?php 226 227 } 228 229 } 230 231 function listings_wp_listing_archive_get_title() { 232 233 // get the title we need (search page or not) 234 if ( is_search() ) { 235 236 $query = isset( $_GET['s'] ) && ! empty( $_GET['s'] ) ? ' - ' . $_GET['s'] : ''; 237 $page_title = sprintf( __( 'Search Results %s', 'listings-wp' ), esc_html( $query ) ); 238 239 if ( get_query_var( 'paged' ) ) 240 $page_title .= sprintf( __( ' – Page %s', 'listings-wp' ), get_query_var( 'paged' ) ); 241 242 } else { 243 244 $page_title = get_the_title(); 245 246 } 247 248 $page_title = apply_filters( 'listings_wp_archive_page_title', $page_title ); 249 250 return $page_title; 251 252 } 202 253 203 254 /** … … 207 258 if ( ! function_exists( 'listings_wp_page_title' ) ) { 208 259 209 function listings_wp_page_title( $echo = true ) { 210 211 if ( is_search() ) { 212 $query = isset( $_GET['s'] ) && ! empty( $_GET['s'] ) ? ' - ' . $_GET['s'] : ''; 213 $page_title = sprintf( __( 'Search Results %s', 'listings-wp' ), esc_html( $query ) ); 214 215 if ( get_query_var( 'paged' ) ) 216 $page_title .= sprintf( __( ' – Page %s', 'listings-wp' ), get_query_var( 'paged' ) ); 217 218 } else { 219 220 $archive_page = listings_wp_option( 'archives_page' ); 221 $page_title = get_the_title( $archive_page ); 222 223 } 224 225 $page_title = apply_filters( 'listings_wp_archive_page_title', $page_title ); 226 227 if ( $echo ) 228 echo $page_title; 229 else 230 return $page_title; 260 function listings_wp_page_title() { 261 $page_title = listings_wp_listing_archive_get_title(); 262 return $page_title; 231 263 } 232 264 -
listings-wp/trunk/includes/functions-listing.php
r1657350 r1661925 78 78 79 79 return $classes; 80 } 81 82 /* 83 * Show Archive Page title within page content area 84 */ 85 function listings_wp_force_page_title() { 86 $force = listings_wp_option( 'archives_page_title' ) ? listings_wp_option( 'archives_page_title' ) : 'no'; 87 return $force; 80 88 } 81 89 -
listings-wp/trunk/listings-wp.php
r1661904 r1661925 6 6 * Author URI: http://listings-wp.com 7 7 * Plugin URI: http://listings-wp.com 8 * Version: 1.0. 78 * Version: 1.0.8 9 9 * Text Domain: listings-wp 10 10 * Domain Path: languages … … 92 92 $this->define( 'LISTINGSWP_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); 93 93 $this->define( 'LISTINGSWP_PLUGIN_BASENAME', plugin_basename( __FILE__ ) ); 94 $this->define( 'LISTINGSWP_VERSION', '1.0. 7' );94 $this->define( 'LISTINGSWP_VERSION', '1.0.8' ); 95 95 } 96 96 -
listings-wp/trunk/readme.txt
r1661904 r1661925 4 4 Requires at least: 4.5 5 5 Tested up to: 4.7.5 6 Stable tag: 1.0. 76 Stable tag: 1.0.8 7 7 License: GPLv3 8 8 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 115 115 == Changelog == 116 116 117 = 1.0.8 - 2017-05-22 = 118 * NEW - Add option to force listing page title 119 * UPDATE - Allow listing page title to be better integrated into theme 120 * UPDATE - Minor CSS for agent name and contact details 121 117 122 = 1.0.7 - 2017-05-22 = 118 123 * UPDATE - Better checks to avoid duplicate pages when creating listing archive page -
listings-wp/trunk/templates/archive-listing.php
r1654776 r1661925 18 18 */ 19 19 do_action( 'listings_wp_before_main_content' ); 20 21 if ( apply_filters( 'listings_wp_show_page_title', true ) ) : ?>22 23 <h1 class="page-title"><?php listings_wp_page_title(); ?></h1>24 25 <?php endif;26 20 27 21 /** -
listings-wp/trunk/templates/global/wrapper-end.php
r1654776 r1661925 23 23 case 'divi' : 24 24 echo '</div>'; 25 get_sidebar();26 25 echo '</div>'; 27 26 echo '</div>'; … … 30 29 case 'twentyeleven' : 31 30 echo '</div>'; 32 get_sidebar();33 31 echo '</div>'; 34 32 break; … … 41 39 case 'twentyfourteen' : 42 40 echo '</div></div></div>'; 43 get_sidebar();44 41 break; 45 42 case 'twentyfifteen' : … … 51 48 case 'twentyseventeen' : 52 49 echo '</main></div>'; 53 get_sidebar();54 50 echo '</div>'; 55 51 break;
Note: See TracChangeset
for help on using the changeset viewer.