Changeset 1360868
- Timestamp:
- 02/29/2016 03:50:59 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
all-in-one-seo-pack/trunk/aioseop_class.php
r1359839 r1360868 1379 1379 $field = "aiosp_$f"; 1380 1380 1381 if ( ( isset( $_GET['taxonomy'] ) && isset( $_GET['tag_ID'] ) ) || is_category() || is_tag() || is_tax()) {1382 if ( AIOSEOPPRO) {1381 if ( ) { 1382 if ( ) { 1383 1383 if ( is_admin() && isset( $_GET['tag_ID'] ) ) { 1384 1384 $meta = get_term_meta( $_GET['tag_ID'], '_aioseop_' . $f, true ); … … 1389 1389 } 1390 1390 } 1391 1392 1393 1394 1395 1396 1391 1397 } 1392 } elseif ( is_singular() || is_admin() ) 1398 } else { 1399 $field = "aiosp_$f"; 1393 1400 $meta = get_post_meta( $post_id, '_aioseop_' . $f, true ); 1394 if ($field === 'title') { 1395 $get_opts[$field] = htmlspecialchars( ( $meta ) ); 1396 } else { 1397 $get_opts[$field] = htmlspecialchars( stripslashes( $meta ) ); 1401 if ( 'title' === $f || 'description' === $f ) { 1402 $get_opts[$field] = htmlspecialchars( ( $meta ) ); 1403 } else { 1404 $get_opts[$field] = htmlspecialchars( stripslashes( $meta ) ); 1405 } 1398 1406 } 1399 1407 … … 1958 1966 //$description = $this->apply_cf_fields( $description ); 1959 1967 if ( !(woocommerce_get_page_id( 'shop' ) == get_option( 'page_on_front' ) ) ){ 1960 $description = trim( stripslashes( $this->internationalize( get_post_meta( $post->ID, "_aioseop_description", true ) ) ) );1968 $description = trim( ( $this->internationalize( get_post_meta( $post->ID, "_aioseop_description", true ) ) ) ); 1961 1969 } 1962 1970 else if ( woocommerce_get_page_id( 'shop' ) == get_option( 'page_on_front' ) && !empty( $aioseop_options['aiosp_use_static_home_info'] ) ){ 1963 1971 //$description = $this->get_aioseop_description( $post ); 1964 $description = trim( stripslashes( $this->internationalize( get_post_meta( $post->ID, "_aioseop_description", true ) ) ) );1972 $description = trim( ( $this->internationalize( get_post_meta( $post->ID, "_aioseop_description", true ) ) ) ); 1965 1973 }else if ( woocommerce_get_page_id( 'shop' ) == get_option( 'page_on_front' ) && empty( $aioseop_options['aiosp_use_static_home_info'] ) ){ 1966 1974 $description = $this->get_aioseop_description( $post ); … … 2572 2580 return ''; 2573 2581 } 2574 $description = trim( stripslashes( $this->internationalize( get_post_meta( $post->ID, "_aioseop_description", true ) ) ) );2582 $description = trim( ( $this->internationalize( get_post_meta( $post->ID, "_aioseop_description", true ) ) ) ); 2575 2583 if ( !empty( $post ) && post_password_required( $post ) ) { 2576 2584 return $description; … … 2615 2623 $description = ''; 2616 2624 if ( is_front_page() && empty( $aioseop_options['aiosp_use_static_home_info'] ) ) 2617 $description = trim( stripslashes( $this->internationalize( $aioseop_options['aiosp_home_description'] ) ) );2625 $description = trim( ( $this->internationalize( $aioseop_options['aiosp_home_description'] ) ) ); 2618 2626 elseif ( !empty( $blog_page ) ) 2619 2627 $description = $this->get_post_description( $blog_page ); … … 3223 3231 } 3224 3232 $text = $this->substr( $text, 0, $max ); 3225 return trim( stripslashes( $text ) );3233 return trim( ( $text ) ); 3226 3234 } 3227 3235 … … 3230 3238 $text = preg_replace( '|\[(.+?)\](.+?\[/\\1\])?|s', '', $text ); 3231 3239 $text = wp_strip_all_tags( $text ); 3232 return trim( stripslashes( $text ) );3240 return trim( ( $text ) ); 3233 3241 } 3234 3242
Note: See TracChangeset
for help on using the changeset viewer.