Making WordPress.org

Changeset 10447


Ignore:
Timestamp:
11/12/2020 06:49:51 AM (6 years ago)
Author:
dd32
Message:

Plugin Directory: i18n: Remove unused method.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-i18n.php

    r10446 r10447  
    250250
    251251                return $translation_set_id;
    252         }
    253 
    254         /**
    255          * Searches GlotPress "originals" for the passed string.
    256          *
    257          * @param string $slug   Plugin slug
    258          * @param string $branch dev|stable
    259          * @param string $key    Unique key
    260          * @param string $str    String to be searched for
    261          * @return bool|mixed|null
    262          */
    263         public function search_gp_original( $slug, $branch, $key, $str ) {
    264                 global $wpdb;
    265 
    266                 $cache_suffix = "original:{$key}";
    267 
    268                 if ( false !== ( $original = $this->cache_get( $slug, $branch, $cache_suffix ) ) ) {
    269                         return $original;
    270                 }
    271 
    272                 $branch_id = $this->get_gp_branch_id( $slug, $branch );
    273 
    274                 if ( empty( $branch_id ) ) {
    275                         return false;
    276                 }
    277 
    278                 $original = $wpdb->get_row( $wpdb->prepare(
    279                         'SELECT id, singular, comment FROM ' . GLOTPRESS_TABLE_PREFIX . 'originals WHERE project_id = %d AND status = %s AND singular = %s',
    280                         $branch_id, '+active', $str
    281                 ) );
    282 
    283                 if ( empty( $original ) ) {
    284                         $original = null;
    285                 }
    286 
    287                 $this->cache_set( $slug, $branch, $original, $cache_suffix );
    288 
    289                 return $original;
    290252        }
    291253
Note: See TracChangeset for help on using the changeset viewer.