Code Duplication    Length = 5-8 lines in 2 locations

classes/helpers/FrmAppHelper.php 1 location

@@ 86-93 (lines=8) @@
83
	 * @param string $upgrade_link
84
	 */
85
	public static function conditional_action_button( $addon, $license_type, $plan_required, $upgrade_link ) {
86
		if ( ! $addon ) {
87
			?>
88
			<a class="install-now button button-secondary frm-button-secondary" href="<?php echo esc_url( $upgrade_link ); ?>" target="_blank" rel="noopener" aria-label="<?php esc_attr_e( 'Upgrade Now', 'formidable' ); ?>">
89
				<?php esc_html_e( 'Upgrade Now', 'formidable' ); ?>
90
			</a>
91
			<?php
92
			return;
93
		}
94
95
		if ( $addon['status']['type'] === 'installed' ) {
96
			?>

classes/views/addons/list.php 1 location

@@ 57-61 (lines=5) @@
54
					<p>
55
						<?php echo esc_html( $addon['excerpt'] ); ?>
56
						<?php $show_docs = isset( $addon['docs'] ) && ! empty( $addon['docs'] ) && $addon['installed']; ?>
57
						<?php if ( $show_docs ) { ?>
58
							<br/><a href="<?php echo esc_url( $addon['docs'] ); ?>" target="_blank" aria-label="<?php esc_attr_e( 'View Docs', 'formidable' ); ?>">
59
								<?php esc_html_e( 'View Docs', 'formidable' ); ?>
60
							</a>
61
						<?php } ?>
62
					</p>
63
					<?php
64
					$plan_required = FrmFormsHelper::get_plan_required( $addon );