WordPress.org

Making WordPress.org

Changeset 6421


Ignore:
Timestamp:
01/23/2018 11:36:08 PM (4 years ago)
Author:
obenland
Message:

Pub: Open-source remaining pub plugins.

See [5346].

Location:
sites/trunk/wordpress.org/public_html/wp-content/mu-plugins/pub
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/mu-plugins/pub/wporg-allow-more-html-in-comments.php

    r5351 r6421  
    77 * Author URI:  https://wordpress.org/
    88 * License:     GPLv2 or later
     9 *
     10 * @package WordPressdotorg\AllowMoreHtmlInComments
    911 */
    1012
     
    5557        kses_init_filters();
    5658        p2_kses_init();
     59
    5760        // Don't have core fire kses_init_filters(), we already did.
    5861        return false;
  • sites/trunk/wordpress.org/public_html/wp-content/mu-plugins/pub/wporg-site-query-locale-support.php

    r5348 r6421  
    77 * Author URI:  https://wordpress.org/
    88 * License:     GPLv2 or later
     9 *
     10 * @package WordPressdotorg\ExtendedSiteQuery
    911 */
    1012
     
    3638
    3739    if ( ! empty( $query->query_vars['locale__in'] ) ) {
    38         $sql = LOCALES_TABLES . '.locale IN (' . implode( ',', array_fill( 0, count( $query->query_vars['locale__in'] ), '%s' ) ) . ')';
     40        $sql     = LOCALES_TABLES . '.locale IN (' . implode( ',', array_fill( 0, count( $query->query_vars['locale__in'] ), '%s' ) ) . ')';
    3941        $where[] = $wpdb->prepare( $sql, $query->query_vars['locale__in'] );
    4042    }
    4143
    4244    if ( ! empty( $query->query_vars['locale__not_in'] ) ) {
    43         $sql = LOCALES_TABLES . '.locale NOT IN (' . implode( ',', array_fill( 0, count( $query->query_vars['locale__not_in'] ), '%s' ) ) . ')';
     45        $sql     = LOCALES_TABLES . '.locale NOT IN (' . implode( ',', array_fill( 0, count( $query->query_vars['locale__not_in'] ), '%s' ) ) . ')';
    4446        $where[] = $wpdb->prepare( $sql, $query->query_vars['locale__not_in'] );
    4547    }
     
    6365 */
    6466function add_locale_to_default_query_vars( $query ) {
    65     $query->query_var_defaults = array_merge( $query->query_var_defaults, [ 'locale' => '', 'locale__in' => '', 'locale__not_in' => '' ] );
     67    $query->query_var_defaults = array_merge( $query->query_var_defaults, [
     68        'locale'         => '',
     69        'locale__in'     => '',
     70        'locale__not_in' => '',
     71    ] );
    6672}
    6773add_action( 'parse_site_query', __NAMESPACE__ . '\add_locale_to_default_query_vars' );
     
    7076 * Adds 'locale' field to site details.
    7177 *
    72  * @param stdClass $details The site details.
    73  * @return stdClass Site details.
     78 * @param \stdClass $details The site details.
     79 * @return \stdClass Site details.
    7480 */
    7581function add_locale_to_site_details( $details ) {
  • sites/trunk/wordpress.org/public_html/wp-content/mu-plugins/pub/wporg-time-shortcode.php

    r5347 r6421  
    77 * Author URI:  https://wordpress.org/
    88 * License:     GPLv2 or later
     9 *
     10 * @package WordPressdotorg\TimeShortcode
    911 */
    1012
     
    5052    // Try to parse the time, relative to the post time. Or current time, if an attr is set.
    5153    $timestamp = ! isset( $attr[0] ) ? get_the_date( 'U' ) : time();
    52     $time = strtotime( $gmtcontent, $timestamp );
     54    $time      = strtotime( $gmtcontent, $timestamp );
    5355
    5456    // If that didn't work, give up.
Note: See TracChangeset for help on using the changeset viewer.