Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 9 additions & 32 deletions classes/helpers/FrmStylesHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -616,38 +616,6 @@ public static function previewing_style() {
return $ajax_change || isset( $_GET['flat'] );
}

/**
* @since 5.5.1
* @return void
*/
public static function maybe_include_font_icon_css() {
$signature_add_on_is_active = class_exists( 'FrmSigAppHelper', false );

if ( ! FrmAppHelper::pro_is_installed() && ! $signature_add_on_is_active ) {
// If Pro and Signatures are both not active, there is no need to include the font icon CSS in lite.
return;
}

$pro_version_will_handle_loading = false;

if ( class_exists( 'FrmProDb', false ) ) {
$pro_version_that_includes_font_icons_css = '5.5.1';

// Include font icons in Lite for backward compatibility with older version of Pro.
$pro_version_will_handle_loading = version_compare( FrmProDb::$plug_version, $pro_version_that_includes_font_icons_css, '>=' );
}

$load_it_here = false;
if ( ! $pro_version_will_handle_loading ) {
// If Pro is not handling it, we still need to include it for the Signature add on.
$load_it_here = $signature_add_on_is_active;
}

if ( $load_it_here ) {
readfile( FrmAppHelper::plugin_path() . '/css/font_icons.css' );
}
}

/**
* Get the URL for the Styler page list view (where you can assign styles to a form and view style templates) for a target form.
*
Expand Down Expand Up @@ -753,4 +721,13 @@ function ( $value ) {

return FrmDb::get_count( 'frm_forms', $where );
}

/**
* @since 5.5.1
* @deprecated x.x
* @return void
*/
public static function maybe_include_font_icon_css() {
_deprecated_function( __METHOD__, 'x.x' );
}
Comment on lines +726 to +732
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace 'x.x' with the actual version number in the deprecation annotation and method call.

- * @deprecated x.x
- _deprecated_function( __METHOD__, 'x.x' );
+ * @deprecated [actual_version_number]
+ _deprecated_function( __METHOD__, '[actual_version_number]' );

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
* @since 5.5.1
* @deprecated x.x
* @return void
*/
public static function maybe_include_font_icon_css() {
_deprecated_function( __METHOD__, 'x.x' );
}
* @since 5.5.1
* @deprecated [actual_version_number]
* @return void
*/
public static function maybe_include_font_icon_css() {
_deprecated_function( __METHOD__, '[actual_version_number]' );
}

}
2 changes: 0 additions & 2 deletions css/custom_theme.css.php
Original file line number Diff line number Diff line change
Expand Up @@ -1607,8 +1607,6 @@


<?php
FrmStylesHelper::maybe_include_font_icon_css();

/**
* Call action so other plugins can add additional CSS.
*
Expand Down