wo-thirds'; break; case 'illustration': $layout = 'fifty-fifty'; break; default: $layout = 'full-width'; break; } return $layout; } /** * Get a major version. * * @since 1.8.7.2 * * @param string $version Version. * * @return string Major version. */ private function get_major_version( $version ): string { // Allow only digits and dots. $clean_version = preg_replace( '/[^0-9.]/', '.', $version ); // Get version parts. $version_parts = explode( '.', $clean_version ); // If a version has more than 3 parts - use only first 3. Get block data only for major versions. if ( count( $version_parts ) > 3 ) { $version = implode( '.', array_slice( $version_parts, 0, 3 ) ); } return $version; } /** * Get the WPForms plugin previous version. * * @since 1.8.8 * * @return string Previous WPForms version. */ private function get_previous_plugin_version(): string { $previous_version = get_option( MigrationsBase::PREVIOUS_CORE_VERSION_OPTION_NAME, '' ); if ( ! empty( $previous_version ) ) { return $previous_version; } return '1.8.6'; // The last version before the "What's New?" feature. } }