Fix final WPCS errors: closing brace, short ternary, Yoda condition, multi-line array
This commit is contained in:
@@ -35,5 +35,4 @@ class PSA_Error {
|
|||||||
$http_code
|
$http_code
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,8 +95,12 @@ class PSA_Post_Type {
|
|||||||
wp_nonce_field( 'psa_save_meta', 'psa_meta_nonce' );
|
wp_nonce_field( 'psa_save_meta', 'psa_meta_nonce' );
|
||||||
|
|
||||||
$textarea_fields = array(
|
$textarea_fields = array(
|
||||||
'psa_sequence', 'psa_mechanism', 'psa_research_apps',
|
'psa_sequence',
|
||||||
'psa_safety_profile', 'psa_dosage_info', 'psa_references',
|
'psa_mechanism',
|
||||||
|
'psa_research_apps',
|
||||||
|
'psa_safety_profile',
|
||||||
|
'psa_dosage_info',
|
||||||
|
'psa_references',
|
||||||
);
|
);
|
||||||
|
|
||||||
echo '<table class="form-table">';
|
echo '<table class="form-table">';
|
||||||
@@ -106,7 +110,7 @@ class PSA_Post_Type {
|
|||||||
echo '<th><label for="' . esc_attr( $key ) . '">' . esc_html( $label ) . '</label></th>';
|
echo '<th><label for="' . esc_attr( $key ) . '">' . esc_html( $label ) . '</label></th>';
|
||||||
echo '<td>';
|
echo '<td>';
|
||||||
|
|
||||||
if ( $key === 'psa_source' ) {
|
if ( 'psa_source' === $key ) {
|
||||||
$options = array(
|
$options = array(
|
||||||
'' => '— Select —',
|
'' => '— Select —',
|
||||||
'ai-generated' => 'AI Generated',
|
'ai-generated' => 'AI Generated',
|
||||||
|
|||||||
@@ -67,7 +67,8 @@ class PSA_PubChem {
|
|||||||
$properties['cid'] = $cid;
|
$properties['cid'] = $cid;
|
||||||
|
|
||||||
// Cache successful lookups for 7 days.
|
// Cache successful lookups for 7 days.
|
||||||
set_transient( $cache_key, $properties, PSA_Config::PUBCHEM_CACHE_TTL ?: 7 * DAY_IN_SECONDS );
|
$ttl = PSA_Config::PUBCHEM_CACHE_TTL ? PSA_Config::PUBCHEM_CACHE_TTL : 7 * DAY_IN_SECONDS;
|
||||||
|
set_transient( $cache_key, $properties, $ttl );
|
||||||
|
|
||||||
return $properties;
|
return $properties;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user