Permalink
Browse files

Swap join() for implode().

  • Loading branch information...
1 parent cf6c0d2 commit e38073c5a5a883eec4b01a3e454d506e4524c557 Michael Sisk committed Dec 3, 2013
Showing with 48 additions and 48 deletions.
  1. +7 −7 -/php/admin.php
  2. +3 −3 -/php/config.php
  3. +1 −1 -/php/media.php
  4. +2 −2 -/php/posts.php
  5. +27 −27 -/php/tags.php
  6. +1 −1 -/php/transcripts.php
  7. +7 −7 webcomic.php
View
@@ -338,7 +338,7 @@ public function deactivate() {
}
if ( $values ) {
- $wpdb->query( sprintf( "INSERT INTO {$wpdb->term_relationships} ( object_id, term_taxonomy_id, term_order ) VALUES %s ON DUPLICATE KEY UPDATE term_order = VALUES( term_order )", join( ',', $values ) ) );
+ $wpdb->query( sprintf( "INSERT INTO {$wpdb->term_relationships} ( object_id, term_taxonomy_id, term_order ) VALUES %s ON DUPLICATE KEY UPDATE term_order = VALUES( term_order )", implode( ',', $values ) ) );
$count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM {$wpdb->term_relationships} WHERE term_taxonomy_id = %d", $language->term_id ) );
@@ -479,13 +479,13 @@ public function admin_notices() {
if ( $notice = get_transient( 'webcomic_notice' ) ) {
delete_transient( 'webcomic_notice' );
- echo '<div class="updated"><p>', join( '</p></div><div class="updated"><p>', $notice ), '</p></div>';
+ echo '<div class="updated"><p>', implode( '</p></div><div class="updated"><p>', $notice ), '</p></div>';
}
if ( $error = get_transient( 'webcomic_error' ) ) {
delete_transient( 'webcomic_error' );
- echo '<div class="error"><p>', join( '</p></div><div class="error"><p>', $error ), '</p></div>';
+ echo '<div class="error"><p>', implode( '</p></div><div class="error"><p>', $error ), '</p></div>';
}
if ( isset( self::$config[ 'thanks' ] ) ) {
@@ -613,7 +613,7 @@ public static function save_collection( $collection ) {
}
if ( $values ) {
- $wpdb->query( sprintf( "INSERT INTO {$wpdb->term_relationships} ( object_id, term_taxonomy_id, term_order ) VALUES %s ON DUPLICATE KEY UPDATE term_order = VALUES( term_order )", join( ',', $values ) ) );
+ $wpdb->query( sprintf( "INSERT INTO {$wpdb->term_relationships} ( object_id, term_taxonomy_id, term_order ) VALUES %s ON DUPLICATE KEY UPDATE term_order = VALUES( term_order )", implode( ',', $values ) ) );
$count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM {$wpdb->term_relationships} WHERE term_taxonomy_id = %d", $term->term_id ) );
@@ -667,15 +667,15 @@ public function widget_showcase() {
}
$caption = empty( $entry[ 'template' ] ) ? sprintf( __( 'Created by %1$s with %2$s', 'webcomic' ),
- join( ', ', $entry[ 'creators' ] ),
+ implode( ', ', $entry[ 'creators' ] ),
'<a href="' . $entry[ 'theme' ][ 'url' ] . '" target="_blank">' . $entry[ 'theme' ][ 'name' ] . '</a>'
) : sprintf( __( 'Created by %1$s with %3$s (based on %4$s)', 'webcomic' ),
- join( ', ', $entry[ 'creators' ] ),
+ implode( ', ', $entry[ 'creators' ] ),
'<a href="' . $entry[ 'theme' ][ 'url' ] . '" target="_blank">' . $entry[ 'theme' ][ 'name' ] . '</a>',
'<a href="' . $entry[ 'template' ][ 'url' ] . '" target="_blank">' . $entry[ 'template' ][ 'name' ] . '</a>'
);
- echo '<figure><a href="', $entry[ 'url' ], '" target="_blank"><img src="', $entry[ 'image' ], '" alt=""><h4>', $entry[ 'name' ], '</h4><blockquote>', wpautop( $entry[ 'description' ] ), '</blockquote></a><figcaption>', $caption, ' <span>#', $entry[ 'rating' ], $entry[ 'genre' ] ? ' #' . join( ' #', $entry[ 'genre' ] ) : '', '</span></figcaption></figure>';
+ echo '<figure><a href="', $entry[ 'url' ], '" target="_blank"><img src="', $entry[ 'image' ], '" alt=""><h4>', $entry[ 'name' ], '</h4><blockquote>', wpautop( $entry[ 'description' ] ), '</blockquote></a><figcaption>', $caption, ' <span>#', $entry[ 'rating' ], $entry[ 'genre' ] ? ' #' . implode( ' #', $entry[ 'genre' ] ) : '', '</span></figcaption></figure>';
}
echo '</div></div>';
View
@@ -525,7 +525,7 @@ public function network_showcase_url() {
public function network_showcase_creators() {
$user = wp_get_current_user();
?>
- <input type="text" name="webcomic_creators" id="webcomic_creators" value="<?php echo esc_attr( self::$network[ 'showcase' ] ? join( ', ', self::$network[ 'showcase' ][ 'creators' ] ) : $user->display_name ); ?>" class="regular-text">
+ <input type="text" name="webcomic_creators" id="webcomic_creators" value="<?php echo esc_attr( self::$network[ 'showcase' ] ? implode( ', ', self::$network[ 'showcase' ][ 'creators' ] ) : $user->display_name ); ?>" class="regular-text">
<p class="description"><?php _e( 'Enter the names or Twitter @usernames of the creators of this site, separated by commas.', 'webcomic' ); ?></p>
<?php
}
@@ -1426,7 +1426,7 @@ public function save( $options ) {
}
}
- if ( $slug = join( '/', $slug ) ) {
+ if ( $slug = implode( '/', $slug ) ) {
$collection[ 'slugs' ][ $k ] = $slug;
}
}
@@ -1616,7 +1616,7 @@ public static function ajax_slug_preview( $slug, $preview, $collection ) {
}
}
- $slug = join( '/', $slug );
+ $slug = implode( '/', $slug );
$slug = $slug ? $slug : self::$config[ 'collections' ][ $collection ][ 'slugs' ][ $fallback ];
echo json_encode( array(
View
@@ -349,7 +349,7 @@ public function attachment_submitbox_misc_actions() {
krsort( $sizes );
- echo '<div class="misc-pub-section">', __( 'Alternate Sizes:', 'webcomic' ), '<br><b>', $sizes ? join( '<br>', $sizes ) : __( 'None available', 'webcomic' ), '</b><br><a href="', esc_html( wp_nonce_url( add_query_arg( array( 'post' => $post->ID, 'action' => 'edit', 'webcomic_action' => 'regenerate' ), admin_url( 'post.php' ) ), 'webcomic_regenerate' ) ), '" class="button">', __( 'Regenerate', 'webcomic' ), '</a></div>';
+ echo '<div class="misc-pub-section">', __( 'Alternate Sizes:', 'webcomic' ), '<br><b>', $sizes ? implode( '<br>', $sizes ) : __( 'None available', 'webcomic' ), '</b><br><a href="', esc_html( wp_nonce_url( add_query_arg( array( 'post' => $post->ID, 'action' => 'edit', 'webcomic_action' => 'regenerate' ), admin_url( 'post.php' ) ), 'webcomic_regenerate' ) ), '" class="button">', __( 'Regenerate', 'webcomic' ), '</a></div>';
}
}
View
@@ -568,7 +568,7 @@ public function box_transcripts( $post ) {
$authors[] = esc_html( $author[ 'name' ] );
}
- $authors = join( ', ', $authors );
+ $authors = implode( ', ', $authors );
if ( $languages = wp_get_object_terms( $p->ID, 'webcomic_language' ) ) {
$terms = array();
@@ -577,7 +577,7 @@ public function box_transcripts( $post ) {
$terms[] = esc_html( sanitize_term_field( 'name', $language->name, $language->term_id, 'webcomic_transcript', 'display' ) );
}
- $terms = join( ', ', $terms );
+ $terms = implode( ', ', $terms );
} else {
$terms = __( ' - ', 'webcomic' );
}
Oops, something went wrong.

0 comments on commit e38073c

Please sign in to comment.