Plugin Directory

Changeset 1358560

Timestamp:
02/26/2016 02:38:21 AM (8 years ago)
Author:
dougal
Message:

Bugfix for post-level meta in Pro. Rearrange logic to eliminate duplication.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • all-in-one-seo-pack/trunk/aioseop_class.php

    r1358401 r1358560  
    13761376            }
    13771377            foreach ( $optlist as $f ) {
    1378 
    1379                 if ( AIOSEOPPRO ) {
    1380                     $meta = '';
    1381                     $field = "aiosp_$f";
    1382                     if ( ( isset( $_GET['taxonomy'] ) && isset( $_GET['tag_ID'] ) ) || is_category() || is_tag() || is_tax() ) {
     1378                $meta = '';
     1379               
     1380
     1381               
     1382                    if ( ) {
    13831383                        if ( is_admin() && isset( $_GET['tag_ID'] ) ) {
    13841384                            $meta = get_term_meta( $_GET['tag_ID'], '_aioseop_' . $f, true );
     
    13891389                            }
    13901390                        }
    1391                     } else
    1392                         $meta = get_post_meta( $post_id, '_aioseop_' . $f, true );
    1393                     if ($field === 'title') {
    1394                         $get_opts[$field] = htmlspecialchars( ( $meta ) );
    1395                     } else {
    1396                         $get_opts[$field] = htmlspecialchars( stripslashes( $meta ) );
    13971391                    }
    1398                 } elseif ( is_singular()  || is_admin() ) {
    1399                     $field = "aiosp_$f";
     1392                } elseif ( is_singular() || is_admin() )
    14001393                    $meta = get_post_meta( $post_id, '_aioseop_' . $f, true );
    1401                     if ($field === 'title') {
    1402                         $get_opts[$field] = htmlspecialchars( ( $meta ) );
    1403                     } else {
    1404                         $get_opts[$field] = htmlspecialchars( stripslashes( $meta ) );
    1405                     }
     1394                if ($field === 'title') {
     1395                    $get_opts[$field] = htmlspecialchars( ( $meta ) );
     1396                } else {
     1397                    $get_opts[$field] = htmlspecialchars( stripslashes( $meta ) );
    14061398                }
    14071399
Note: See TracChangeset for help on using the changeset viewer.