Skip to content

Commit

Permalink
fixed .gitignore, deleted unnecessary files, changed icon
Browse files Browse the repository at this point in the history
  • Loading branch information
gardenboi committed Oct 12, 2023
1 parent 351e709 commit 018ca5d
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 94 deletions.
16 changes: 0 additions & 16 deletions assets/icon-original.svg

This file was deleted.

55 changes: 22 additions & 33 deletions assets/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 8 additions & 9 deletions cf7-antispam.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,23 +134,22 @@ function uninstall_cf7_antispam() {
* Initialize the plugin once all other plugins have finished loading.
*/

require_once CF7ANTISPAM_PLUGIN_DIR . '/includes/service.php';

/**
* call the integration action to mount our plugin as a component
* into the intefration page
*/


/**
* call the integration action to mount our plugin as a component
* into the intefration page
*/

function cf7_antispam_register_service() {
require_once CF7ANTISPAM_PLUGIN_DIR . '/includes/service.php';
$integration = WPCF7_Integration::get_instance();
$integration->add_service(
'cf7-antispam',
WPCF7_Antispam::get_instance()
);

}

add_action( 'wpcf7_init', 'cf7_antispam_register_service', 1, 0 );
add_action( 'wpcf7_init', 'cf7_antispam_register_service', 1, 0 );



Expand Down
86 changes: 50 additions & 36 deletions includes/service.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,41 +89,44 @@ public function get_categories() {
*/
public function icon() {
$allowed_html = array(
'svg' => array(
'xmlns' => true,
'id' => true,
'viewbox' => true,
'width' => true,
'height' => true,
'svg' => array(
'xmlns' => true,
'xmlns:xlink' => true,
'xml:space' => true,
'viewbox' => true,
),
'defs' => array(),
'style' => array(),
'g' => array(
'defs' => array(),
'circle' => array(
'fill' => true,
'id' => true,
'cx' => true,
'cy' => true,
'r' => true,
),
'clipPath' => array(
'id' => true,
),
'circle' => array(
'cx' => true,
'cy' => true,
'r' => true,
'class' => true,
'transform' => true,
'use' => array(
'xlink:href' => true,
'overflow' => true,
),
'path' => array(
'fill' => true,
'd' => true,
),
'path' => array(
'd' => true,
'class' => true,
'fill' => true,
'ellipse' => array(
'cx' => true,
'cy' => true,
'rx' => true,
'ry' => true,
'fill' => true,
),
'rect' => array(
'width' => true,
'height' => true,
'x' => true,
'y' => true,
'class' => true,
'rx' => true,
'ry' => true,
'g' => array(
'stroke' => true,
'stroke-miterlimit' => true,
),
);
echo '<div class="integration-icon">' . wp_kses( file_get_contents( CF7ANTISPAM_PLUGIN_DIR . '/assets/icon-original.svg' ), $allowed_html ) . '</div>';
echo '<div class="integration-icon">' . wp_kses( file_get_contents( CF7ANTISPAM_PLUGIN_DIR . '/assets/icon.svg' ), $allowed_html ) . '</div>';
}

/**
Expand Down Expand Up @@ -199,16 +202,27 @@ public function load( $action = '' ) {
*/
public function display( $action = '' ) {
echo sprintf(
'<p>%s</p>',
'<p>%s<br>%s<br>%s<br>%s%s</p>',
esc_html__(
'Antispam for Contact Form 7 is a free plugin’.'
. 'It blocks bots from flooding your mailbox, without tedious configuration and without captcha, '
. 'CF7-AntiSpam uses different in and off page bots traps and an auto-learning mechanism based on a statistical “Bayesian” spam filter called B8'
. 'Its recomended to install ',
'Antispam for Contact Form 7 is a free plugin for Contact Form 7.',
'contact-form-7'
),
esc_html__(
'It blocks bots from flooding your mailbox, without tedious configuration and without captcha. (which may introduce issues)',
'contact-form-7'
),
esc_html__(
'CF7-AntiSpam uses different in and off page bots traps and an auto-learning mechanism based on a statistical “Bayesian” spam filter called B8.',
'contact-form-7'
),
esc_html__(
'It\'s recommended to install ',
'contact-form-7'
),
'<a href="https://wordpress.org/plugins/flamingo/">Flamingo</a>' . esc_html__(
' which will provide additional controls and a dashboard widget.',
'contact-form-7'
)
. '<a href="https://wordpress.org/plugins/flamingo/">Flamingo</a>'
. esc_html__( ' which will provide additional controls and a dashboard widget.', 'contact-form-7' )
);


Expand All @@ -217,7 +231,7 @@ public function display( $action = '' ) {
// phpcs:ignore
wpcf7_link(
esc_html__( 'https://wordpress.org/plugins/cf7-antispam/', 'contact-form-7' ),
esc_html__( 'CF7-Antispam', 'contact-form-7' )
esc_html__( 'CF7-Antispam (v' . CF7ANTISPAM_VERSION . ')', 'contact-form-7' )
)
);

Expand Down

0 comments on commit 018ca5d

Please sign in to comment.