Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into fix/admin_notifi…
Browse files Browse the repository at this point in the history
…cation_after_guest_email_verified
  • Loading branch information
sapayth committed Sep 18, 2024
2 parents 0e772eb + 2d97a71 commit 31c964d
Show file tree
Hide file tree
Showing 113 changed files with 49,254 additions and 7,821 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "7.3"
php-version: "7.4"
coverage: none
tools: composer, cs2pr

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ npm-debug.log
vendor
!assets/vendor
phpcs-report.txt
assets/css/admin/subscriptions.min.css
assets/js/subscriptions.min.js
25 changes: 23 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ module.exports = function(grunt) {
makepot: {
target: {
options: {
exclude: ['build/.*', 'node_modules/*', 'assets/*'],
exclude: ['build/.*', 'node_modules/*'],
mainFile: 'wpuf.php',
domainPath: '/languages/',
potFilename: 'wp-user-frontend.pot',
Expand Down Expand Up @@ -100,6 +100,18 @@ module.exports = function(grunt) {
'jshint:formBuilder', 'less:admin',
'concat:formBuilder', 'concat:templates', 'less:front'
]
},

vue: {
files: [
'assets/js/subscriptions.js',
'assets/css/admin/subscriptions.css',
'assets/js/components/**/*.vue',
'assets/js/stores/**/*.js',
],
tasks: [
'shell:npm_build'
]
}
},

Expand Down Expand Up @@ -133,6 +145,7 @@ module.exports = function(grunt) {
'!config.codekit',
'!**/nbproject/**',
'!assets/less/**',
'!assets/tailwind/**',
'!tests/**',
'!**/Gruntfile.js',
'!**/package.json',
Expand Down Expand Up @@ -203,6 +216,13 @@ module.exports = function(grunt) {
}
}
},

// is to run NPM commands through Grunt
shell: {
npm_build: {
command: 'npm run build',
}
}
});

// Load NPM tasks to be used here
Expand All @@ -217,8 +237,9 @@ module.exports = function(grunt) {
grunt.loadNpmTasks( 'grunt-contrib-compress' );
grunt.loadNpmTasks( 'grunt-notify' );
grunt.loadNpmTasks( 'grunt-wp-readme-to-markdown' );
grunt.loadNpmTasks( 'grunt-shell' );

grunt.registerTask( 'default', [ 'less', 'concat' ] );
grunt.registerTask( 'default', [ 'less', 'concat', 'uglify', 'i18n' ] );

// file auto generation
grunt.registerTask( 'i18n', [ 'makepot' ] );
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion Lib/WeDevs_Settings_API.php
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ function get_option( $option, $section, $default = '' ) {
function show_navigation() {
$html = '<h2 class="nav-tab-wrapper">';
$html .= '<div id="wpuf-search-section">
<input type="text" id="wpuf-settings-search" placeholder="Search in settings">
<input type="text" id="wpuf-settings-search" placeholder="'. esc_attr__( 'Search in settings', 'wp-user-frontend' ) .'">
<span class="dashicons dashicons-no-alt"></span>
</div>';
$count = count( $this->settings_sections );
Expand Down
3 changes: 1 addition & 2 deletions lib/invisible_recaptcha.php → Lib/invisible_recaptcha.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
*
*/

#[AllowDynamicProperties]
class Invisible_Recaptcha{
class Invisible_Recaptcha {

private static $_signupUrl = "https://www.google.com/recaptcha/admin";

Expand Down
File renamed without changes.
File renamed without changes.
5 changes: 3 additions & 2 deletions admin/html/form-settings-post.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@
'taxonomy' => $tax->name,
];

$tax = '<tr class="wpuf_settings_taxonomy"> <th> Default '. $post_type_selected . ' '. $tax->name .'</th> <td>
<select multiple name="wpuf_settings[default_'.$tax->name.'][]">';
// translators: %s: post type name and taxonomy name
$tax = '<tr class="wpuf_settings_taxonomy"> <th>' . sprintf( __( 'Default %s %s', 'wp-user-frontend' ), $post_type_selected, $tax->name ) . '</th> <td>
<select multiple name="wpuf_settings[default_'.$tax->name.'][]">';
$categories = get_terms( $args );

foreach ( $categories as $category ) {
Expand Down
4 changes: 2 additions & 2 deletions admin/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public static function common_text( $id, $values = [] ) {

<div class="wpuf-form-sub-fields">
<label>
<input type="text" class="smallipopInput" name="<?php echo esc_attr( $word_restriction_name ); ?>" value="<?php echo esc_attr( $word_restriction_value ); ?>" title="<?php esc_attr_e( 'Numebr of words the author to be restricted in', 'wp-user-frontend' ); ?>" />
<input type="text" class="smallipopInput" name="<?php echo esc_attr( $word_restriction_name ); ?>" value="<?php echo esc_attr( $word_restriction_value ); ?>" title="<?php esc_attr_e( 'Number of words the author to be restricted in', 'wp-user-frontend' ); ?>" />
</label>
</div>
</div> <!-- .wpuf-form-rows -->
Expand Down Expand Up @@ -196,7 +196,7 @@ public static function common_textarea( $id, $values = [] ) {

<div class="wpuf-form-sub-fields">
<label>
<input type="text" class="smallipopInput" name="<?php echo esc_attr( $word_restriction_name ); ?>" value="<?php echo esc_attr( $word_restriction_value ); ?>" title="<?php esc_attr_e( 'Numebr of words the author to be restricted in', 'wp-user-frontend' ); ?>" />
<input type="text" class="smallipopInput" name="<?php echo esc_attr( $word_restriction_name ); ?>" value="<?php echo esc_attr( $word_restriction_value ); ?>" title="<?php esc_attr_e( 'Number of words the author to be restricted in', 'wp-user-frontend' ); ?>" />
</label>
</div>
</div> <!-- .wpuf-form-rows -->
Expand Down
108 changes: 47 additions & 61 deletions assets/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@ span.wpuf_help {
float: right;
display: none;
}
span.wpuf-loading {
height: 16px;
width: 16px;
background: url('../images/wpspin_light.gif') no-repeat;
padding: 0;
margin: 5px 10px;
right: -40px;
top: 0;
float: left;
}
#option-saved {
-moz-border-radius: 5px 5px 5px 5px;
background: none repeat scroll 0 0 orange;
Expand Down Expand Up @@ -740,7 +750,7 @@ img.user-listing.active {
.wpuf-pro-field-tooltip {
background: #000;
width: max-content;
padding: 25px 50px 20px 20px;
padding: 25px 35px 30px 20px;
border-radius: 5px;
color: #fff;
position: absolute;
Expand All @@ -759,6 +769,7 @@ img.user-listing.active {
}
h3.tooltip-header {
color: #fff;
font-size: 1.3rem;
}
.wpuf-subscription-pack-settings nav ul .wpuf-pro-field-tooltip ul li span.tooltip-check svg path,
.wpuf-pro-field-tooltip ul li span.tooltip-check svg path {
Expand All @@ -770,8 +781,7 @@ h3.tooltip-header {
}
.wpuf-subscription-pack-settings nav ul .wpuf-pro-field-tooltip ul li,
.wpuf-pro-field-tooltip ul li {
font-size: 1.2em;
line-height: 1.5em;
line-height: 1.5rem;
font-weight: 400;
margin-bottom: 6px;
}
Expand Down Expand Up @@ -896,42 +906,42 @@ span.pro-icon:hover .wpuf-pro-field-tooltip {
.headway-header ul li a:hover {
text-decoration: underline;
}
.user-frontend_page_wpuf-post-forms .wrap h2.with-headway-icon,
.user-frontend_page_wpuf-profile-forms .wrap h2.with-headway-icon,
.user-frontend_page_wpuf-settings .wrap h2.with-headway-icon {
.wrap h2.with-headway-icon,
.wrap h2.with-headway-icon,
.wrap h2.with-headway-icon {
display: flex;
justify-content: space-between;
}
.user-frontend_page_wpuf-post-forms .wrap h2.with-headway-icon .flex-end,
.user-frontend_page_wpuf-profile-forms .wrap h2.with-headway-icon .flex-end,
.user-frontend_page_wpuf-settings .wrap h2.with-headway-icon .flex-end {
.wrap h2.with-headway-icon .flex-end,
.wrap h2.with-headway-icon .flex-end,
.wrap h2.with-headway-icon .flex-end {
display: flex;
align-items: center;
}
.user-frontend_page_wpuf-post-forms .wrap h2.with-headway-icon .flex-end .HW_badge.HW_softHidden,
.user-frontend_page_wpuf-profile-forms .wrap h2.with-headway-icon .flex-end .HW_badge.HW_softHidden,
.user-frontend_page_wpuf-settings .wrap h2.with-headway-icon .flex-end .HW_badge.HW_softHidden {
.wrap h2.with-headway-icon .flex-end .HW_badge.HW_softHidden,
.wrap h2.with-headway-icon .flex-end .HW_badge.HW_softHidden,
.wrap h2.with-headway-icon .flex-end .HW_badge.HW_softHidden {
background: #eea6d0 !important;
}
.user-frontend_page_wpuf-post-forms .wrap h2.with-headway-icon .flex-end .flex-end .headway-icon:hover .HW_badge.HW_softHidden,
.user-frontend_page_wpuf-profile-forms .wrap h2.with-headway-icon .flex-end .flex-end .headway-icon:hover .HW_badge.HW_softHidden,
.user-frontend_page_wpuf-settings .wrap h2.with-headway-icon .flex-end .flex-end .headway-icon:hover .HW_badge.HW_softHidden {
.wrap h2.with-headway-icon .flex-end .flex-end .headway-icon:hover .HW_badge.HW_softHidden,
.wrap h2.with-headway-icon .flex-end .flex-end .headway-icon:hover .HW_badge.HW_softHidden,
.wrap h2.with-headway-icon .flex-end .flex-end .headway-icon:hover .HW_badge.HW_softHidden {
background: #ee62b4 !important;
}
.user-frontend_page_wpuf-post-forms .wrap h2.with-headway-icon .flex-end a.canny-link,
.user-frontend_page_wpuf-profile-forms .wrap h2.with-headway-icon .flex-end a.canny-link,
.user-frontend_page_wpuf-settings .wrap h2.with-headway-icon .flex-end a.canny-link {
.wrap h2.with-headway-icon .flex-end a.canny-link,
.wrap h2.with-headway-icon .flex-end a.canny-link,
.wrap h2.with-headway-icon .flex-end a.canny-link {
font-size: 1rem;
text-decoration: none;
}
.user-frontend_page_wpuf-post-forms .wrap h2.with-headway-icon .flex-end a.canny-link:hover,
.user-frontend_page_wpuf-profile-forms .wrap h2.with-headway-icon .flex-end a.canny-link:hover,
.user-frontend_page_wpuf-settings .wrap h2.with-headway-icon .flex-end a.canny-link:hover {
.wrap h2.with-headway-icon .flex-end a.canny-link:hover,
.wrap h2.with-headway-icon .flex-end a.canny-link:hover,
.wrap h2.with-headway-icon .flex-end a.canny-link:hover {
text-decoration: underline;
}
.user-frontend_page_wpuf-post-forms .wrap h2.with-headway-icon #HW_frame_cont,
.user-frontend_page_wpuf-profile-forms .wrap h2.with-headway-icon #HW_frame_cont,
.user-frontend_page_wpuf-settings .wrap h2.with-headway-icon #HW_frame_cont {
.wrap h2.with-headway-icon #HW_frame_cont,
.wrap h2.with-headway-icon #HW_frame_cont,
.wrap h2.with-headway-icon #HW_frame_cont {
top: 78px !important;
}
@media only screen and (max-width: 1399px) {
Expand Down Expand Up @@ -1059,59 +1069,35 @@ span.pro-icon:hover .wpuf-pro-field-tooltip {
}
.wpuf-help-page .wpuf-subscribe-box {
display: flex;
justify-content: space-between;
border: 1px solid #e5e5e5;
background: #fff;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
margin-top: 15px;
}
.wpuf-help-page .wpuf-subscribe-box .text-wrap {
width: calc(100% - 530px);
.wpuf-help-page .wpuf-subscribe-box .wpuf-text-wrap {
padding: 10px 15px;
width: 60%;
}
.wpuf-help-page .wpuf-subscribe-box .text-wrap h3 {
.wpuf-help-page .wpuf-subscribe-box .wpuf-text-wrap h3 {
color: #ff5722;
margin: 4px 0 0 0;
}
.wpuf-help-page .wpuf-subscribe-box .text-wrap p {
margin-bottom: 5px;
}
.wpuf-help-page .wpuf-subscribe-box .form-wrap {
width: 530px;
display: flex;
padding: 10px 0;
.wpuf-help-page .wpuf-subscribe-box .wpuf-form-wrap {
background: #f7f7f7;
padding-left: 20px;
padding: 10px 15px;
width: 40%;
border-left: 1px solid #eee;
}
.wpuf-help-page .wpuf-subscribe-box .form-wrap .thank-you {
font-size: 16px;
color: green;
padding-top: 20px;
text-align: center;
width: 100%;
}
.wpuf-help-page .wpuf-subscribe-box .form-wrap label {
.wpuf-help-page .wpuf-subscribe-box .wpuf-form-wrap label {
color: #666;
}
.wpuf-help-page .wpuf-subscribe-box .form-wrap input {
max-width: 100%;
overflow: hidden;
}
.wpuf-help-page .wpuf-subscribe-box .form-wrap input[type="text"],
.wpuf-help-page .wpuf-subscribe-box .form-wrap input[type="email"] {
padding: 5px 8px;
}
.wpuf-help-page .wpuf-subscribe-box .form-wrap .fname {
width: 35%;
margin-right: 10px;
}
.wpuf-help-page .wpuf-subscribe-box .form-wrap .email {
width: 40%;
margin-right: 10px;
.wpuf-help-page .wpuf-subscribe-box .wpuf-form-wrap form {
display: flex;
align-items: flex-end;
}
.wpuf-help-page .wpuf-subscribe-box .form-wrap .submit-btn {
width: 20%;
padding-top: 22px;
.wpuf-help-page .wpuf-subscribe-box .wpuf-form-wrap form input {
margin-right: 15px;
}
.wpuf-help-page .help-blocks {
display: flex;
Expand Down
13 changes: 13 additions & 0 deletions assets/css/admin/subscriptions.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

.wpuf-inline-input .wpuf-p-4 {
padding: 0;
}
.wpuf-inline-input > *:first-child {
margin-right: 1rem;
}
body.user-frontend_page_wpuf_subscription {
background: #fff;
}
1 change: 1 addition & 0 deletions assets/css/admin/subscriptions.min.css

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions assets/images/wpuf-icon-circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 45 additions & 0 deletions assets/js/components/Header.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<script setup>
import { __ } from '@wordpress/i18n';
import {inject} from 'vue';
const wpufSubscriptions = inject( 'wpufSubscriptions' );
const logoUrl = wpufSubscriptions.assetUrl + '/images/wpuf-icon-circle.svg';
</script>

<template>
<div class="wpuf-w-[calc(100%+40px)] wpuf-ml-[-20px] wpuf-px-[20px] wpuf-flex wpuf-mt-4 wpuf-justify-between wpuf-items-center wpuf-border-b-2 wpuf-border-gray-100 wpuf-pb-4">
<div class="wpuf-flex wpuf-justify-start wpuf-items-center">
<img :src="logoUrl" alt="WPUF Icon" class="wpuf-w-12 wpuf-mr-4">
<h2>{{ __( 'WP User Frontend', 'wp-user-frontend' ) }}</h2>
<span class="wpuf-ml-2 wpuf-inline-flex wpuf-items-center wpuf-rounded-full wpuf-bg-green-100 wpuf-px-2 wpuf-py-1 wpuf-text-xs wpuf-font-medium wpuf-text-green-700 wpuf-ring-1 wpuf-ring-inset wpuf-ring-green-600/20">v{{ wpufSubscriptions.version }}</span>
<a
v-if="!wpufSubscriptions.isProActive"
:href="wpufSubscriptions.upgradeUrl"
target="_blank"
class="wpuf-ml-4 wpuf-rounded-md wpuf-bg-amber-500 wpuf-px-3 wpuf-py-2 wpuf-text-sm font-semibold wpuf-text-white wpuf-shadow-sm hover:wpuf-bg-amber-600 hover:wpuf-text-white hover:wpuf-shadow-none active:wpuf-shadow-none focus:wpuf-bg-amber-600 focus:wpuf-text-white">
{{ __( 'Upgrade', 'wp-user-frontend' ) }}
&nbsp;
<span class="dashicons dashicons-superhero-alt"></span>
</a>
</div>
<div class="wpuf-flex wpuf-justify-end wpuf-items-center wpuf-w-2/4">
<span
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="wpuf-border wpuf-border-gray-100 wpuf-mr-[16px] wpuf-canny-link wpuf-text-center wpuf-rounded-md wpuf-px-3 wpuf-py-2 wpuf-text-sm wpuf-font-semibold wpuf-shadow-sm hover:wpuf-bg-slate-100 focus:wpuf-bg-slate-100"
target="_blank"
href="https://wpuf.canny.io/ideas">💡 {{ __( 'Submit Ideas', 'wp-user-frontend' ) }}</a>
<a
:href="wpufSubscriptions.supportUrl"
target="_blank"
class="wpuf-rounded-md wpuf-text-center wpuf-bg-indigo-600 wpuf-px-3 wpuf-py-2 wpuf-text-sm wpuf-font-semibold wpuf-text-white wpuf-shadow-sm hover:wpuf-bg-indigo-500 hover:wpuf-text-white focus:wpuf-bg-indigo-500 focus:wpuf-text-white">
{{ __( 'Support ', 'wp-user-frontend' ) }}
&nbsp;&nbsp;
<span class="dashicons dashicons-businessman"></span>
</a>
</div>
</div>

</template>
8 changes: 8 additions & 0 deletions assets/js/components/ProBadge.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<script setup></script>

<template>
<svg
width="20" height="15" viewBox="0 0 20 15" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M19.2131 4.11564C19.2161 4.16916 19.2121 4.22364 19.1983 4.27775L17.9646 10.5323C17.9024 10.7741 17.6796 10.9441 17.4235 10.9455L10.0216 10.9818H10.0188H2.61682C2.35933 10.9818 2.13495 10.8112 2.07275 10.5681L0.839103 4.29542C0.824897 4.23985 0.820785 4.18385 0.824374 4.12895C0.34714 3.98269 0 3.54829 0 3.03636C0 2.40473 0.528224 1.89091 1.17757 1.89091C1.82692 1.89091 2.35514 2.40473 2.35514 3.03636C2.35514 3.39207 2.18759 3.71033 1.92523 3.92058L3.46976 5.43433C3.86011 5.81695 4.40179 6.03629 4.95596 6.03629C5.61122 6.03629 6.23596 5.7336 6.62938 5.22647L9.1677 1.95491C8.95447 1.74764 8.82243 1.46124 8.82243 1.14545C8.82243 0.513818 9.35065 0 10 0C10.6493 0 11.1776 0.513818 11.1776 1.14545C11.1776 1.45178 11.0526 1.72982 10.8505 1.93556L10.8526 1.93811L13.3726 5.21869C13.7658 5.73069 14.3928 6.03636 15.0499 6.03636C15.6092 6.03636 16.1351 5.82451 16.5305 5.43978L18.0848 3.92793C17.8169 3.71775 17.6449 3.39644 17.6449 3.03636C17.6449 2.40473 18.1731 1.89091 18.8224 1.89091C19.4718 1.89091 20 2.40473 20 3.03636C20 3.53462 19.6707 3.9584 19.2131 4.11564ZM17.8443 12.6909C17.8443 12.3897 17.5932 12.1455 17.2835 12.1455H2.77884C2.46916 12.1455 2.21809 12.3897 2.21809 12.6909V14C2.21809 14.3012 2.46916 14.5455 2.77884 14.5455H17.2835C17.5932 14.5455 17.8443 14.3012 17.8443 14V12.6909Z" fill="#FB9A28"/>
</svg>
</template>
Loading

0 comments on commit 31c964d

Please sign in to comment.