Astra_Ext_White_Label_Markup::themes_page( array $themes )
White labels the theme on the themes page.
Description
Parameters
- $themes
-
(array) (Required) Themes Array.
Return
(array)
Source
File: classes/class-astra-ext-white-label-markup.php
public function themes_page( $themes ) { $astra_key = 'astra'; if ( isset( $themes[ $astra_key ] ) ) { if ( false !== self::get_whitelabel_string( 'astra', 'name', false ) ) { $themes[ $astra_key ]['name'] = self::get_whitelabel_string( 'astra', 'name', false ); foreach ( $themes as $key => $theme ) { if ( isset( $theme['parent'] ) && 'Astra' == $theme['parent'] ) { $themes[ $key ]['parent'] = self::get_whitelabel_string( 'astra', 'name', false ); } } } if ( false !== self::get_whitelabel_string( 'astra', 'description', false ) ) { $themes[ $astra_key ]['description'] = self::get_whitelabel_string( 'astra', 'description', false ); } if ( false !== self::get_whitelabel_string( 'astra-agency', 'author', false ) ) { $author_url = ( '' === self::get_whitelabel_string( 'astra-agency', 'author_url', '' ) ) ? '#' : self::get_whitelabel_string( 'astra-agency', 'author_url', '' ); $themes[ $astra_key ]['author'] = self::get_whitelabel_string( 'astra-agency', 'author', false ); $themes[ $astra_key ]['authorAndUri'] = '<a href="' . esc_url( $author_url ) . '">' . self::get_whitelabel_string( 'astra-agency', 'author', false ) . '</a>'; } if ( false !== self::get_whitelabel_string( 'astra', 'screenshot', false ) ) { $themes[ $astra_key ]['screenshot'] = array( self::get_whitelabel_string( 'astra', 'screenshot', false ) ); } // Change link and theme name from the heme popup for the update notification. if ( isset( $themes[ $astra_key ]['update'] ) ) { // Replace Theme name with whitelabel theme name. $themes[ $astra_key ]['update'] = str_replace( 'Astra', self::get_whitelabel_string( 'astra', 'name' ), $themes[ $astra_key ]['update'] ); // Replace Theme URL with Agency URL. $themes[ $astra_key ]['update'] = str_replace( 'https://wordpress.org/themes/astra/?TB_iframe=true&width=1024&height=800', add_query_arg( array( 'TB_iframe' => true, 'hight' => '800', 'width' => '1024', ), self::get_whitelabel_string( 'astra-agency', 'author_url', 'https://wordpress.org/themes/astra/?TB_iframe=true&width=1024&height=800' ) ), $themes[ $astra_key ]['update'] ); } } return $themes; }
Expand full source code Collapse full source code View on Trac