Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
Reorganized readme.txt file, optimized content for all available localization language support at this moment, description, and tags
Fix some lines on the main plugin file my-style-anytime.php
  • Loading branch information
newfiesoft authored Feb 23, 2024
1 parent 7573230 commit 0335bd6
Show file tree
Hide file tree
Showing 50 changed files with 1,078 additions and 1,044 deletions.
10 changes: 5 additions & 5 deletions assets/template/role-template.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
* @URL: https://newfiesoft.com/wp-plugins/my-style-anytime/
*
*
* This is the style for rules {$name}
* This is the style for roles {$name}
*
* @Rules: {$name}
* @Roles: {$name}
*
*/

/* To import visitor style in this user @Rules type
/* To import visitor style in this user @Roles type
@import "visitor-style.css";
*/

Expand All @@ -33,7 +33,7 @@

/*#########################################################################*/

/*=== Start Responsive configurations for this rules user type ===*/
/*=== Start Responsive configurations for this roles user type ===*/

/*=| ##### Desktop screen resolution ##### |=*/

Expand Down Expand Up @@ -195,6 +195,6 @@
/* End media max-width: 390px */


/*=== End Responsive configurations for this rules user type ===*/
/*=== End Responsive configurations for this roles user type ===*/

/*#########################################################################*/
18 changes: 9 additions & 9 deletions assets/template/visitor-template.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
* @URL: https://newfiesoft.com/wp-plugins/my-style-anytime/
*
*
* This is the style for rules {$name}
* This is the style for roles {$name}
*
* @Rules: {$name}
* @Roles: {$name}
*
*/

Expand All @@ -23,7 +23,7 @@

/*=== Front Styles ===*/

/* Standard WordPress User rules style example */
/* Standard WordPress User roles style example */

.hello-administrator {
display: none;
Expand Down Expand Up @@ -51,7 +51,7 @@
color: green;
}

/* WooCommerce User rules style example */
/* WooCommerce User roles style example */

.hello-shop-manager {
display: none;
Expand All @@ -61,13 +61,13 @@
display: none;
}

/* Loco Translate User rules style example */
/* Loco Translate User roles style example */

.hello-translator {
display: none;
}

/* Yoast SEO User rules style example */
/* Yoast SEO User roles style example */

.hello-seo-manager {
display: none;
Expand All @@ -77,15 +77,15 @@
display: none;
}

/* YITH Affiliates User rules style example */
/* YITH Affiliates User roles style example */

.hello-affiliates {
display: none;
}

/*#########################################################################*/

/*=== Start Responsive configurations for this rules user type ===*/
/*=== Start Responsive configurations for this roles user type ===*/

/*=| ##### Desktop screen resolution ##### |=*/

Expand Down Expand Up @@ -247,6 +247,6 @@
/* End media max-width: 390px */


/*=== End Responsive configurations for this rules user type ===*/
/*=== End Responsive configurations for this roles user type ===*/

/*#########################################################################*/
10 changes: 5 additions & 5 deletions includes/back/back_functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
***/


//// Check the current user rules type and if it matches return with the user rules CSS file on the back side like /wp-admin/
//// Check the current user roles type and if it matches return with the user roles CSS file on the back side like /wp-admin/
function mysat_back_get_current_user_roles_style(): void {

// Get the current user
Expand Down Expand Up @@ -37,7 +37,7 @@ function mysat_back_get_current_user_roles_style(): void {
add_action('admin_enqueue_scripts', 'mysat_back_get_current_user_roles_style');


//// Generate css file for the user rules type who does not have or user rules are new inside wp_user_roles
//// Generate css file for the user roles type who does not have or user roles are new inside wp_user_roles
function mysat_back_get_generate_css_file($role_slug, $role_name): void {

// Your file generation logic here
Expand Down Expand Up @@ -76,9 +76,9 @@ function mysat_back_get_generate_css_file($role_slug, $role_name): void {
if ($role_slug === 'visitor') {
// Replace both occurrences directly for visitors
$template_content_visitor = str_replace( array(
'This is the style for rules {$name}',
'@Rules: {$name}'
), array( 'This is the style for rules Visitor', '@Rules: Visitor' ), $template_content_visitor );
'This is the style for roles {$name}',
'@Roles: {$name}'
), array( 'This is the style for roles Visitor', '@Roles: Visitor' ), $template_content_visitor );

// Write content to the file for visitor style
$wp_filesystem->put_contents($full_css_file_path, $template_content_visitor, FS_CHMOD_FILE);
Expand Down
4 changes: 2 additions & 2 deletions includes/front/front_functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
***/


//// Check the current user rules type and if matches return with user rules CSS file on the front side like domain.com
//// Check the current user roles type and if matches return with user roles CSS file on the front side like domain.com
function mysat_front_get_current_user_roles_style(): void {

// Get the current user
Expand Down Expand Up @@ -36,7 +36,7 @@ function mysat_front_get_current_user_roles_style(): void {
add_action('wp_enqueue_scripts', 'mysat_front_get_current_user_roles_style');


//// If there are no user rules to detect, use this to show the visitor CSS file
//// If there are no user roles to detect, use this to show the visitor CSS file
function mysat_get_visitor_style(): void {

// Get plugin dir URL
Expand Down
Binary file modified languages/my-style-anytime-de_CH.mo
Binary file not shown.
Loading

0 comments on commit 0335bd6

Please sign in to comment.