Make WordPress Core


Ignore:
Timestamp:
07/02/2015 10:31:58 PM (10 years ago)
Author:
obenland
Message:

Use get_default_comment_status() globally.

Also makes the filter name static and passes the post type for context.

Props valendesigns.
Fixes #31168.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-xmlrpc-server.php

    r32993 r33054  
    48104810                        break;
    48114811                    default:
    4812                         $comment_status = get_option('default_comment_status');
     4812                        $comment_status = get_default_comment_status( $post_type );
    48134813                        break;
    48144814                }
     
    48234823                        break;
    48244824                    default:
    4825                         $comment_status = get_option('default_comment_status');
     4825                        $comment_status = get_default_comment_status( $post_type );
    48264826                        break;
    48274827                }
    48284828            }
    48294829        } else {
    4830             $comment_status = get_option('default_comment_status');
     4830            $comment_status = get_default_comment_status( $post_type );
    48314831        }
    48324832
     
    48414841                        break;
    48424842                    default:
    4843                         $ping_status = get_option('default_ping_status');
     4843                        $ping_status = get_default_comment_status( $post_type, 'pingback' );
    48444844                        break;
    48454845                }
     
    48534853                        break;
    48544854                    default:
    4855                         $ping_status = get_option('default_ping_status');
     4855                        $ping_status = get_default_comment_status( $post_type, 'pingback' );
    48564856                        break;
    48574857                }
    48584858            }
    48594859        } else {
    4860             $ping_status = get_option('default_ping_status');
     4860            $ping_status = get_default_comment_status( $post_type, 'pingback' );
    48614861        }
    48624862
     
    51215121                        break;
    51225122                    default:
    5123                         $comment_status = get_option('default_comment_status');
     5123                        $comment_status = get_default_comment_status( $post_type );
    51245124                        break;
    51255125                }
     
    51345134                        break;
    51355135                    default:
    5136                         $comment_status = get_option('default_comment_status');
     5136                        $comment_status = get_default_comment_status( $post_type );
    51375137                        break;
    51385138                }
     
    51505150                        break;
    51515151                    default:
    5152                         $ping_status = get_option('default_ping_status');
     5152                        $ping_status = get_default_comment_status( $post_type, 'pingback' );
    51535153                        break;
    51545154                }
     
    51625162                        break;
    51635163                    default:
    5164                         $ping_status = get_option('default_ping_status');
     5164                        $ping_status = get_default_comment_status( $post_type, 'pingback' );
    51655165                        break;
    51665166                }
Note: See TracChangeset for help on using the changeset viewer.