Skip to content

Commit 30dff79

Browse files
committed
add shortnames for popular products
1 parent a6a28cd commit 30dff79

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/Product.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,17 @@ public function is_wordpress_available() {
346346
* @return string Friendly name.
347347
*/
348348
public function get_friendly_name() {
349-
$name = apply_filters( $this->get_key() . '_friendly_name', trim( str_replace( 'Lite', '', $this->get_name() ) ) );
349+
$name = trim( str_replace( 'Lite', '', $this->get_name() ) );
350+
if ( defined( 'OTTER_BLOCKS_BASEFILE' ) && OTTER_BLOCKS_BASEFILE === $this->basefile ) {
351+
$name = 'Otter';
352+
}
353+
if ( defined( 'OPTML_BASEFILE' ) && OPTML_BASEFILE === $this->basefile ) {
354+
$name = 'Optimole';
355+
}
356+
if ( defined( 'WPMM_FILE' ) && WPMM_FILE === $this->basefile ) {
357+
$name = 'LightStart';
358+
}
359+
$name = apply_filters( $this->get_key() . '_friendly_name', $name );
350360
$name = rtrim( $name, '- ()' );
351361

352362
return $name;

0 commit comments

Comments
 (0)