Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion includes/Admin/Menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
global $_registered_pages;

$capability = wpuf_admin_role();
$wpuf_icon = 'data:image/svg+xml;base64,' . base64_encode( '<svg width="83px" height="76px" viewBox="0 0 83 76" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="wpuf-icon" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="ufp" fill-rule="nonzero" fill="#9EA3A8"><path d="M49.38,51.88 C49.503348,56.4604553 45.8999295,60.2784694 41.32,60.42 C36.7400705,60.2784694 33.136652,56.4604553 33.26,51.88 L33.26,40.23 L19,40.23 L19,51.88 C19,64.77 29,75.25 41.36,75.26 L41.36,75.26 C47.3622079,75.2559227 53.0954073,72.7693647 57.2,68.39 C61.4213559,63.9375842 63.7575868,58.0253435 63.72,51.89 L63.72,40.23 L49.38,40.23 L49.38,51.88 Z" id="Shape"></path><polygon id="Shape" points="32.96 0.59 0 0.59 3.77 16.68 32.96 16.68"></polygon><path d="M68,0 L49.75,0 L49.75,16.1 L68,16.1 C68.74,16.1 69.39,17.1 69.39,18.24 C69.39,19.38 68.74,20.38 68,20.38 L49.75,20.38 L49.75,36.5 L68,36.5 C76,36.5 82.5,28.31 82.5,18.25 C82.5,8.19 76,0 68,0 Z" id="Shape"></path><polygon id="Shape" points="32.96 20.41 5.31 20.41 9.07 36.5 32.96 36.5"></polygon></g></g></svg>' );

Check warning on line 22 in includes/Admin/Menu.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

base64_encode() can be used to obfuscate code which is strongly discouraged. Please verify that the function is used for benign reasons.

add_menu_page( __( 'WP User Frontend', 'wp-user-frontend' ), __( 'User Frontend', 'wp-user-frontend' ), $capability, $this->parent_slug, [ $this, 'wpuf_post_forms_page' ], $wpuf_icon, '54.2' );

Expand All @@ -42,7 +42,7 @@
do_action( 'wpuf_admin_menu_top' );

if ( 'on' === wpuf_get_option( 'enable_payment', 'wpuf_payment', 'on' ) ) {
// $subscription_hook = add_submenu_page( $this->parent_slug, __( 'Subscriptions', 'wp-user-frontend' ), __( 'Subscriptions', 'wp-user-frontend' ), $capability, 'edit.php?post_type=wpuf_subscription' );

Check warning on line 45 in includes/Admin/Menu.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

This comment is 57% valid code; is this commented out code?

$subscription_hook = add_submenu_page(
$this->parent_slug,
Expand Down Expand Up @@ -124,7 +124,7 @@
default:
wp_enqueue_style( 'wpuf-forms-list' );
wp_enqueue_script( 'wpuf-forms-list' );
wp_localize_script('wpuf-forms-list', 'wpuf_forms_list',

Check failure on line 127 in includes/Admin/Menu.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

Opening parenthesis of a multi-line function call must be the last content on the line
[
'post_counts' => wpuf_get_forms_counts_with_status(),
'rest_nonce' => wp_create_nonce( 'wp_rest' ),
Expand All @@ -149,7 +149,7 @@
break;
}

include WPUF_ROOT . '/includes/Admin/template-parts/modal-v4.1.php';
include WPUF_ROOT . '/includes/Admin/template-parts/modal-post-forms-v4.2.php';

break;
}
Expand All @@ -158,8 +158,8 @@
/**
* Mark headway as async. Because nothing depends on it, it can run at any time
*/
public function add_async_attribute( $tag, $handle, $src ) {

Check warning on line 161 in includes/Admin/Menu.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

The method parameter $src is never used
if ('wpuf-headway-script' === $handle) {

Check failure on line 162 in includes/Admin/Menu.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

No space before closing parenthesis is prohibited

Check failure on line 162 in includes/Admin/Menu.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

No space after opening parenthesis is prohibited
return str_replace( ' src', ' async src', $tag );
}

Expand Down Expand Up @@ -233,7 +233,7 @@
*
* @return void
*/
public function subscribers_page( $post_ID ) {

Check warning on line 236 in includes/Admin/Menu.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

The method parameter $post_ID is never used
$page = WPUF_INCLUDES . '/Admin/views/subscribers.php';

wpuf_require_once( $page );
Expand Down Expand Up @@ -374,9 +374,9 @@
id="wpuf-headway-icon"
class="wpuf-border wpuf-border-gray-100 wpuf-mr-[16px] wpuf-rounded-full wpuf-p-1 wpuf-shadow-sm hover:wpuf-bg-slate-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2"
></span>
<a class="canny-link" target="_blank" href="<?php echo esc_url( 'https://wpuf.canny.io/ideas' ); ?>">💡 <?php esc_html_e(

Check failure on line 377 in includes/Admin/Menu.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

Opening PHP tag must be on a line by itself

Check failure on line 377 in includes/Admin/Menu.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

Opening PHP tag must be on a line by itself
'Submit Ideas', 'wp-user-frontend'

Check failure on line 378 in includes/Admin/Menu.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

Multi-line function call not indented correctly; expected 24 spaces but found 20
); ?></a>

Check failure on line 379 in includes/Admin/Menu.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

Closing PHP tag must be on a line by itself

Check failure on line 379 in includes/Admin/Menu.php

View workflow job for this annotation

GitHub Actions / Run PHPCS inspection

Line indented incorrectly; expected at least 16 tabs, found 5
</span>
</h2>
<div class="wpuf-settings-wrap">
Expand Down
Loading
Loading