Commit inicial - WordPress Análisis de Precios Unitarios

- WordPress core y plugins
- Tema Twenty Twenty-Four configurado
- Plugin allow-unfiltered-html.php simplificado
- .gitignore configurado para excluir wp-config.php y uploads

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-11-03 21:04:30 -06:00
commit a22573bf0b
24068 changed files with 4993111 additions and 0 deletions

View File

@@ -0,0 +1,173 @@
<?php
namespace TVD\Dashboard\Access_Manager;
/**
* Thrive Themes - https://thrivethemes.com
*
* @package thrive-dashboard
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden
}
class Main {
public static function init() {
static::hooks();
}
public static function hooks() {
add_action( 'current_screen', array( __CLASS__, 'conditional_hooks' ) );
}
/**
* Getting site's roles and the url to their users
*
* @return array
*/
public static function get_roles_url() {
global $wp_roles;
$all_roles = array();
foreach ( $wp_roles->roles as $role_tag => $role ) {
$role['url'] = add_query_arg( 'role', $role['name'], admin_url( 'users.php' ) );
$role['tag'] = $role_tag;
$role['can_edit_posts'] = isset( $role['capabilities']['edit_posts'] );
unset( $role['capabilities'] );
$all_roles[ $role['tag'] ] = $role;
}
return $all_roles;
}
/**
* Get all the products that should be included in the AM
*
* @return array
*/
public static function get_products() {
$all_products = array();
$all_products['td'] = array(
'name' => 'Thrive Dashboard Settings',
'tag' => 'td',
'logo' => TVE_DASH_IMAGES_URL . '/dash-logo-icon-small.png',
'prod_capability' => TVE_DASH_CAPABILITY,
);
foreach ( tve_dash_get_products( false ) as $product ) {
/* Skip old themes */
if ( 'theme' === $product->get_type() && 'thrive theme' !== strtolower( $product->get_title() ) ) {
continue;
}
$tag = $product->get_tag();
$all_products[ $tag ] = array(
'name' => $product->get_title(),
'tag' => $tag,
'logo' => $product->get_logo(),
'prod_capability' => $product->get_cap(),
);
}
return $all_products;
}
/**
* Getting plugin capabilities for each of the existing roles
*
* @param $all_roles
*
* @return array
*/
public static function get_roles_capabilities( $all_roles ) {
foreach ( static::get_products() as $product ) {
foreach ( $all_roles as $role ) {
$wp_role = get_role( $role['tag'] );
$all_roles[ $role['tag'] ]['products'][ $product['tag'] ] = array(
'name' => $product['name'],
'tag' => $product['tag'],
'logo' => $product['logo'],
'can_use' => $wp_role ? $wp_role->has_cap( $product['prod_capability'] ) : false,
'is_editable' => $product['tag'] === 'td' ? $role['tag'] !== 'administrator' && $role['can_edit_posts'] : $role['can_edit_posts'],
'prod_capability' => $product['prod_capability'],
);
}
}
return $all_roles;
}
/**
* Hook based on the current screen
*/
public static function conditional_hooks() {
if ( tve_get_current_screen_key() === 'admin_page_tve_dash_access_manager' ) {
add_action( 'admin_enqueue_scripts', array( __CLASS__, 'tve_dash_access_manager_include_scripts' ) );
add_action( 'admin_print_footer_scripts', array( __CLASS__, 'render_backbone_templates' ) );
}
}
public static function render_backbone_templates() {
$templates = tve_dash_get_backbone_templates( TVE_DASH_PATH . '/inc/access-manager/includes/templates', 'templates' );
tve_dash_output_backbone_templates( $templates, '' );
}
public static function tve_dash_access_manager_include_scripts() {
tve_dash_enqueue();
include TVE_DASH_PATH . '/inc/access-manager/includes/assets/css/am-icons.svg';
tve_dash_enqueue_style( 'tve-dash-access-manager-css', TVE_DASH_URL . '/inc/access-manager/includes/assets/css/style.css' );
tve_dash_enqueue_script( 'tve-dash-access-manager-js', TVE_DASH_URL . '/inc/access-manager/includes/assets/dist/admin.min.js', array(
'tve-dash-main-js',
'jquery',
'backbone',
), false, true );
wp_localize_script( 'tve-dash-access-manager-js', 'TVD_AM_CONST', array(
'roles_properties' => static::get_roles_functionalities( static::get_roles_capabilities( static::get_roles_url() ) ),
'baseUrl' => get_rest_url( get_current_blog_id(), 'wp/v2/pages/' ),
) );
}
/**
* Getting functionalities for each of the existing roles
*
* @param $all_roles
*
* @return array
*/
public static function get_roles_functionalities( $all_roles ) {
$functionalities = static::get_all_functionalities();
foreach ( $all_roles as $role ) {
foreach ( $functionalities as $functionality ) {
$roles_functionalities = $functionality::get_properties( $role['tag'] );
$all_roles[ $role['tag'] ]['functionalities'][ $roles_functionalities['tag'] ] = $roles_functionalities;
}
}
return $all_roles;
}
/**
* Get all functionalities from the Access Manager
*
* @return string[]
*/
public static function get_all_functionalities( $functionality_tag = null ) {
$functionalities = array(
new \TVD\Dashboard\Access_Manager\Admin_Bar_Visibility(),
new \TVD\Dashboard\Access_Manager\Login_Redirect()
);
if ( $functionality_tag ) {
$functionalities = current( array_filter( $functionalities,
static function ( $functionality ) use ( $functionality_tag ) {
return $functionality::get_tag() === $functionality_tag;
} ) );
}
return $functionalities;
}
}

View File

@@ -0,0 +1,77 @@
<?php
namespace TVD\Dashboard\Access_Manager;
use TVD\Dashboard\Access_Manager\Functionality;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden!
}
class Admin_Bar_Visibility extends Functionality {
public static function hooks() {
add_filter( 'show_admin_bar', array( __CLASS__, 'show_admin_bar' ) );
}
public static function get_name() {
return __( 'Admin Bar Visibility', 'thrive-dash' );
}
public static function get_tag() {
return 'admin_bar_visibility';
}
public static function get_default() {
return 'inherit';
}
public static function get_options() {
return array(
[
'name' => 'Inherit',
'tag' => 'inherit',
],
[
'name' => 'Hidden',
'tag' => 'hidden',
],
[
'name' => 'Displayed',
'tag' => 'displayed',
],
);
}
public static function get_icon() {
return 'wordpress';
}
public static function get_options_type() {
return 'dropdown';
}
public static function get_option_value( $user_role ) {
return get_option( static::get_option_name( $user_role ) );
}
public static function show_admin_bar( $show_admin_bar ) {
if ( is_user_logged_in() ) {
$user_role = reset( wp_get_current_user()->roles );
$visibility = static::get_option_value( $user_role );
switch ( $visibility ) {
case 'displayed':
$show_admin_bar = true;
break;
case 'hidden':
$show_admin_bar = false;
break;
default:
break;
}
}
return $show_admin_bar;
}
}

View File

@@ -0,0 +1,43 @@
<?php
namespace TVD\Dashboard\Access_Manager;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden!
}
abstract class Functionality {
public static function init() {
static::hooks();
}
abstract public static function hooks();
abstract public static function get_name();
abstract public static function get_tag();
abstract public static function get_default();
public static function update_option_value( $user_role, $updated_value ) {
update_option( static::get_option_name( $user_role ), $updated_value );
}
public static function get_option_name( $user_role ) {
return '_' . $user_role . '_' . static::get_tag();
}
public static function get_properties( $user_role ) {
return array(
'name' => static::get_name(),
'tag' => static::get_tag(),
'functionality_options' => static::get_options(),
'get_options_type' => static::get_options_type(),
'icon' => static::get_icon(),
'default_value' => static::get_default(),
'value' => static::get_option_value( $user_role ),
);
}
}

View File

@@ -0,0 +1,107 @@
<?php
namespace TVD\Dashboard\Access_Manager;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden!
}
class Login_Redirect extends Functionality {
public static function hooks() {
add_filter( 'login_redirect', array( __CLASS__, 'login_redirect' ), 10, 3 );
}
public static function get_name() {
return 'WordPress Login Redirect';
}
public static function get_tag() {
return 'login_redirect';
}
public static function get_default() {
return 'inherit';
}
public static function get_options() {
$options = array(
[
'name' => 'Inherit',
'tag' => 'inherit',
],
[
'name' => 'WordPress Dashboard',
'tag' => 'wpdashboard',
],
[
'name' => 'Homepage',
'tag' => 'homepage',
],
[
'name' => 'Custom',
'tag' => 'custom',
],
);
if ( tve_dash_is_plugin_active( 'thrive-apprentice' ) ) {
$options[] = [
'name' => 'Apprentice Homepage',
'tag' => 'apphomepage',
];
}
return $options;
}
public static function get_icon() {
return 'wordpress';
}
public static function get_options_type() {
return 'dropdown';
}
public static function get_option_value( $user_role ) {
$option = get_option( static::get_option_name( $user_role ) );
if ( $option === 'apphomepage' && ! tve_dash_is_plugin_active( 'thrive-apprentice' ) ) {
$option = 'inherit';
}
return $option;
}
public static function login_redirect( $redirect, $requested_redirect_to, $logged_in_user ) {
if ( ! is_wp_error( $logged_in_user ) && $logged_in_user && $logged_in_user->ID ) {
if ( ! empty( $logged_in_user->roles ) ) {
$user_role = $logged_in_user->roles[0];
$url = static::get_option_value( $user_role );
} else {
$url = 'inherit';
}
if ( $url ) {
switch ( $url ) {
case 'inherit':
break;
case 'wpdashboard':
$redirect = get_admin_url();
break;
case 'homepage':
$redirect = get_home_url();
break;
case 'apphomepage':
if ( tve_dash_is_plugin_active( 'thrive-apprentice' ) ) {
$redirect = get_permalink( tva_get_settings_manager()->factory( 'index_page' )->get_value() );
}
break;
default:
$redirect = get_permalink( $url['pageId'] );
break;
}
}
}
return $redirect;
}
}

View File

@@ -0,0 +1,47 @@
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<symbol id="icon-cap-editable" viewBox="0 0 512 512">
<path d="M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"/>
</symbol>
<symbol id="icon-cap-non-editable" viewBox="0 0 26 25">
<g fill-rule="nonzero" fill="none">
<path d="M20.672 11.125a9.86 9.86 0 0 0-1.374-5.086 10.278 10.278 0 0 0-3.712-3.712A9.86 9.86 0 0 0 10.5.953a9.86 9.86 0 0 0-5.086 1.374A10.278 10.278 0 0 0 1.702 6.04a9.86 9.86 0 0 0-1.374 5.086 9.86 9.86 0 0 0 1.374 5.086 10.278 10.278 0 0 0 3.712 3.712 9.86 9.86 0 0 0 5.086 1.374 9.86 9.86 0 0 0 5.086-1.374 10.278 10.278 0 0 0 3.712-3.712 9.86 9.86 0 0 0 1.374-5.086zM9.31 16.498a.546.546 0 0 1-.452.205.546.546 0 0 1-.45-.205l-4.266-4.266a.546.546 0 0 1-.206-.45c0-.192.069-.343.206-.452l.902-.943a.648.648 0 0 1 .472-.205c.177 0 .335.068.471.205l2.871 2.87 6.153-6.152a.648.648 0 0 1 .471-.205c.178 0 .335.069.472.205l.902.944c.137.11.205.26.205.451a.546.546 0 0 1-.205.451l-7.546 7.547z"
fill="#8E8E8E" opacity=".75"/>
<path d="M24.594 18.188c.286 0 .53.1.73.3.2.2.301.444.301.73v4.126c0 .286-.1.53-.3.73-.201.2-.445.301-.731.301H17.03c-.286 0-.53-.1-.73-.3-.2-.201-.301-.445-.301-.731v-4.125c0-.287.1-.53.3-.73.201-.201.445-.301.731-.301h.516V16.64c0-.588.147-1.132.44-1.633a3.282 3.282 0 0 1 1.193-1.193 3.174 3.174 0 0 1 1.632-.44c.588 0 1.132.147 1.633.44.502.294.9.692 1.193 1.193.293.501.44 1.045.44 1.633v1.547h.516zm-2.235 0V16.64c0-.43-.15-.795-.45-1.096-.302-.3-.667-.451-1.097-.451-.43 0-.794.15-1.095.45-.301.302-.451.667-.451 1.097v1.547h3.093z"
fill="#787F78"/>
</g>
</symbol>
<symbol id="icon-no-cap-editable" viewBox="0 0 512 512">
<path d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z"/>
</symbol>
<symbol id="icon-no-cap-non-editable" viewBox="0 0 26 25">
<g fill-rule="nonzero" fill="none">
<path d="M10.5.953a9.86 9.86 0 0 1 5.086 1.374 10.278 10.278 0 0 1 3.712 3.712 9.86 9.86 0 0 1 1.374 5.086 9.86 9.86 0 0 1-1.374 5.086 10.278 10.278 0 0 1-3.712 3.712 9.86 9.86 0 0 1-5.086 1.374 9.86 9.86 0 0 1-5.086-1.374 10.278 10.278 0 0 1-3.712-3.712 9.86 9.86 0 0 1-1.374-5.086 9.86 9.86 0 0 1 1.374-5.086 10.278 10.278 0 0 1 3.712-3.712A9.86 9.86 0 0 1 10.5.953zm5.004 12.838-2.707-2.666 2.707-2.666a.571.571 0 0 0 .123-.349.571.571 0 0 0-.123-.348l-1.64-1.64a.443.443 0 0 0-.329-.124.6.6 0 0 0-.369.123L10.5 8.828 7.834 6.121a.571.571 0 0 0-.349-.123.571.571 0 0 0-.348.123l-1.64 1.64a.443.443 0 0 0-.124.329.6.6 0 0 0 .123.369l2.707 2.666-2.707 2.666a.571.571 0 0 0-.123.349c0 .123.041.239.123.348l1.64 1.64a.443.443 0 0 0 .329.124.6.6 0 0 0 .369-.123l2.666-2.707 2.666 2.707c.11.082.226.123.349.123.123 0 .239-.041.348-.123l1.64-1.64a.443.443 0 0 0 .124-.329.6.6 0 0 0-.123-.369z"
fill="#8E8E8E" opacity=".75"/>
<path d="M24.594 18.188c.286 0 .53.1.73.3.2.2.301.444.301.73v4.126c0 .286-.1.53-.3.73-.201.2-.445.301-.731.301H17.03c-.286 0-.53-.1-.73-.3-.2-.201-.301-.445-.301-.731v-4.125c0-.287.1-.53.3-.73.201-.201.445-.301.731-.301h.516V16.64c0-.588.147-1.132.44-1.633a3.282 3.282 0 0 1 1.193-1.193 3.174 3.174 0 0 1 1.632-.44c.588 0 1.132.147 1.633.44.502.294.9.692 1.193 1.193.293.501.44 1.045.44 1.633v1.547h.516zm-2.235 0V16.64c0-.43-.15-.795-.45-1.096-.302-.3-.667-.451-1.097-.451-.43 0-.794.15-1.095.45-.301.302-.451.667-.451 1.097v1.547h3.093z"
fill="#787F78"/>
</g>
</symbol>
<symbol id="icon-sync-alt" viewBox="0 0 512 512">
<path d="M483.515 28.485L431.35 80.65C386.475 35.767 324.485 8 256 8 123.228 8 14.824 112.338 8.31 243.493 7.971 250.311 13.475 256 20.301 256h28.045c6.353 0 11.613-4.952 11.973-11.294C66.161 141.649 151.453 60 256 60c54.163 0 103.157 21.923 138.614 57.386l-54.128 54.129c-7.56 7.56-2.206 20.485 8.485 20.485H492c6.627 0 12-5.373 12-12V36.971c0-10.691-12.926-16.045-20.485-8.486zM491.699 256h-28.045c-6.353 0-11.613 4.952-11.973 11.294C445.839 370.351 360.547 452 256 452c-54.163 0-103.157-21.923-138.614-57.386l54.128-54.129c7.56-7.56 2.206-20.485-8.485-20.485H20c-6.627 0-12 5.373-12 12v143.029c0 10.691 12.926 16.045 20.485 8.485L80.65 431.35C125.525 476.233 187.516 504 256 504c132.773 0 241.176-104.338 247.69-235.493.339-6.818-5.165-12.507-11.991-12.507z"/>
</symbol>
<symbol id="icon-users" viewBox="0 0 640 512">
<path d="M544 224c44.2 0 80-35.8 80-80s-35.8-80-80-80-80 35.8-80 80 35.8 80 80 80zm0-112c17.6 0 32 14.4 32 32s-14.4 32-32 32-32-14.4-32-32 14.4-32 32-32zM96 224c44.2 0 80-35.8 80-80s-35.8-80-80-80-80 35.8-80 80 35.8 80 80 80zm0-112c17.6 0 32 14.4 32 32s-14.4 32-32 32-32-14.4-32-32 14.4-32 32-32zm396.4 210.9c-27.5-40.8-80.7-56-127.8-41.7-14.2 4.3-29.1 6.7-44.7 6.7s-30.5-2.4-44.7-6.7c-47.1-14.3-100.3.8-127.8 41.7-12.4 18.4-19.6 40.5-19.6 64.3V432c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48v-44.8c.2-23.8-7-45.9-19.4-64.3zM464 432H176v-44.8c0-36.4 29.2-66.2 65.4-67.2 25.5 10.6 51.9 16 78.6 16 26.7 0 53.1-5.4 78.6-16 36.2 1 65.4 30.7 65.4 67.2V432zm92-176h-24c-17.3 0-33.4 5.3-46.8 14.3 13.4 10.1 25.2 22.2 34.4 36.2 3.9-1.4 8-2.5 12.3-2.5h24c19.8 0 36 16.2 36 36 0 13.2 10.8 24 24 24s24-10.8 24-24c.1-46.3-37.6-84-83.9-84zm-236 0c61.9 0 112-50.1 112-112S381.9 32 320 32 208 82.1 208 144s50.1 112 112 112zm0-176c35.3 0 64 28.7 64 64s-28.7 64-64 64-64-28.7-64-64 28.7-64 64-64zM154.8 270.3c-13.4-9-29.5-14.3-46.8-14.3H84c-46.3 0-84 37.7-84 84 0 13.2 10.8 24 24 24s24-10.8 24-24c0-19.8 16.2-36 36-36h24c4.4 0 8.5 1.1 12.3 2.5 9.3-14 21.1-26.1 34.5-36.2z"/>
</symbol>
<symbol id="icon-wordpress" viewBox="0 0 22 22">
<path d="M2.664 7.012a8.975 8.975 0 0 0-.816 3.738c0 1.776.472 3.402 1.418 4.877.945 1.475 2.191 2.585 3.738 3.33L2.664 7.012zm14.523 3.265c0-.487-.085-.974-.257-1.46a8.57 8.57 0 0 0-.516-1.032l-.086-.172c-.286-.458-.473-.787-.559-.988a2.21 2.21 0 0 1-.257-.988c0-.43.15-.81.45-1.139.302-.33.667-.494 1.097-.494h.128a9.634 9.634 0 0 0-2.835-1.762A8.836 8.836 0 0 0 11 1.598a8.907 8.907 0 0 0-4.383 1.117 9.154 9.154 0 0 0-3.265 3.008h.601c.401 0 .931-.015 1.59-.043l.86-.043c.143-.029.25.021.322.15a.413.413 0 0 1 .021.387.304.304 0 0 1-.3.193l-1.032.086 3.309 9.926 2.02-6.016-1.419-3.91c-.344 0-.673-.028-.988-.086a.304.304 0 0 1-.3-.193.413.413 0 0 1 .02-.387c.072-.129.194-.179.366-.15l.86.043c.658.028 1.18.043 1.568.043.386 0 .895-.015 1.525-.043l.86-.043c.171-.029.293.021.365.15a.413.413 0 0 1 .021.387.304.304 0 0 1-.3.193l-1.032.086 3.266 9.84 1.03-3.352c.201-.687.345-1.174.43-1.46a5.05 5.05 0 0 0 .172-1.204zm-8.765 9.239c.86.257 1.719.386 2.578.386a9.348 9.348 0 0 0 3.05-.515l-.085-.13-2.793-7.69-2.75 7.949zM19.035 6.367c.029.287.043.602.043.946 0 1.03-.23 2.12-.687 3.265l-2.793 8.078a9.159 9.159 0 0 0 3.308-3.308 8.864 8.864 0 0 0 1.246-4.598 8.907 8.907 0 0 0-1.117-4.383zm2.621 4.383c0-1.92-.48-3.695-1.44-5.328a10.768 10.768 0 0 0-3.888-3.889A10.33 10.33 0 0 0 11 .093c-1.92 0-3.695.48-5.328 1.44a10.768 10.768 0 0 0-3.889 3.889 10.33 10.33 0 0 0-1.44 5.328c0 1.92.48 3.695 1.44 5.328a10.768 10.768 0 0 0 3.889 3.889A10.33 10.33 0 0 0 11 21.407c1.92 0 3.695-.48 5.328-1.44a10.768 10.768 0 0 0 3.889-3.889 10.33 10.33 0 0 0 1.44-5.328zm-.472 0a9.88 9.88 0 0 1-1.375 5.092 10.275 10.275 0 0 1-3.717 3.717A9.88 9.88 0 0 1 11 20.934a9.88 9.88 0 0 1-5.092-1.375 10.275 10.275 0 0 1-3.717-3.717A9.88 9.88 0 0 1 .816 10.75a9.88 9.88 0 0 1 1.375-5.092 10.275 10.275 0 0 1 3.717-3.717A9.88 9.88 0 0 1 11 .566a9.88 9.88 0 0 1 5.092 1.375c1.561.917 2.8 2.156 3.717 3.717a9.88 9.88 0 0 1 1.375 5.092z"
fill="#424242" fill-rule="nonzero"/>
</symbol>
<symbol id="icon-info" viewBox="0 0 512 512">
<path d="M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 448c-110.532 0-200-89.431-200-200 0-110.495 89.472-200 200-200 110.491 0 200 89.471 200 200 0 110.53-89.431 200-200 200zm42-104c0 23.159-18.841 42-42 42s-42-18.841-42-42 18.841-42 42-42 42 18.841 42 42zm-81.37-211.401l6.8 136c.319 6.387 5.591 11.401 11.985 11.401h41.17c6.394 0 11.666-5.014 11.985-11.401l6.8-136c.343-6.854-5.122-12.599-11.985-12.599h-54.77c-6.863 0-12.328 5.745-11.985 12.599z"/>
</symbol>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 8.9 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,19 @@
<?php
/**
* Thrive Themes - https://thrivethemes.com
*
* @package thrive-dashboard
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Silence is golden!
}
require_once( TVE_DASH_PATH . '/templates/header.phtml' ); ?>
<div class="tvd-am-breadcrumbs">
<a href="<?php echo esc_url( admin_url( 'admin.php?page=tve_dash_section' ) ); ?>">
<?php echo esc_html__( 'Thrive Dashboard', 'thrive-dash' ); ?>
</a>
<span class="tvd-breadcrumb"><?php echo esc_html__( 'User Access Manager', 'thrive-dash' ); ?></span>
</div>
<div class="tvd-access-manager-setting"></div>

View File

@@ -0,0 +1,13 @@
<div class="tvd-am-reset-default-modal">
<div class="title">
<?php echo __( 'Are you sure you want to reset the access options for the ', 'thrive-dash' ); ?>
<span class="role-name"></span>
<?php echo __( ' role?', 'thrive-dash' ); ?></div>
<div class="subtitle">
<?php dashboard_icon( 'info' ); ?>
<?php echo __( 'Please note that this cannot be undone', 'thrive-dash' ); ?></div>
<div class="buttons-wrapper">
<button class="click reset-button tvd-modal-close"><?php echo __( 'NO', 'thrive-dash' ); ?></button>
<button class="click reset-button tvd-modal-submit"><?php echo __( 'YES', 'thrive-dash' ); ?></button>
</div>
</div>

View File

@@ -0,0 +1,43 @@
<div class="tvd-am-container-header">
<h3 class="tvd-am-container-title"><?php echo esc_html__( 'User Access Manager', 'thrive-dash' ); ?></h3>
<div class="tvd-am-buttons-wrapper">
<a class="tvd-am-view-users click" target="_blank">
<?php dashboard_icon( 'users' ); ?>
<span><?php echo esc_html__( 'VIEW USERS', 'thrive-dash' ); ?></span>
</a>
<button class="tvd-am-reset-defaults click">
<?php dashboard_icon( 'sync-alt' ); ?>
<span><?php echo esc_html__( 'RESET DEFAULTS', 'thrive-dash' ); ?></span>
</button>
</div>
</div>
<div class="tvd-am-container-info">
<?php echo esc_html__( 'Edit which user roles have access to Thrive Themes plugins by enabling or disabling the checkboxes below.', 'thrive-dash' ); ?></div>
</div>
<h3 class="tvd-am-container-role"></h3>
<div class="tvd-am-container-sections">
<div class="tvd-am-section-wrapper tvd-am-products-cap-wrapper">
<div class="tvd-am-section-header">
<div class="tvd-am-section-title"><?php echo esc_html__( 'Products', 'thrive-dash' ); ?></div>
<div class="tvd-am-section-functionality"><?php echo esc_html__( 'HAS ACCESS', 'thrive-dash' ); ?></div>
</div>
<div class="tvd-am-section-content tvd-am-products-cap-content"></div>
</div>
<div class="tvd-am-section-wrapper tvd-am-functionality-wrapper">
<div class="tvd-am-section-header">
<div class="tvd-am-section-title"><?php echo esc_html__( 'Functionality', 'thrive-dash' ); ?></div>
<div class="tvd-am-section-functionality"><?php echo esc_html__( 'SETTING', 'thrive-dash' ); ?></div>
</div>
<div class="tvd-am-section-content tvd-am-functionality-content"></div>
</div>
<div id="tvd-back-td" class="tvd-col tvd-m6">
<a href="
<?php echo admin_url( 'admin.php?page=tve_dash_section' ); ?>" class="tvd-waves-effect tvd-waves-light tvd-btn-small tvd-btn-gray">
<?php echo __( 'Back To Dashboard', 'thrive-dash' ); ?>
</a>
</div>
</div>

View File

@@ -0,0 +1,2 @@
<div class="tvd-sidebar tvd-am-sidebar"></div>
<div class="tvd-am-container"></div>

View File

@@ -0,0 +1,22 @@
<div class="custom-redirect-select-wrapper tvd-page-selector" style="display:none;">
<div id="custom-page-info">
<p>
<?php echo __( 'Select a page using the field below. If no page is selected this setting will not remain active.', 'thrive-dash' ); ?>
</p>
</div>
<select id="tvd-am-custom-redirect"></select>
<div class="custom-page-options">
<span class="custom-page-title"></span>
<a class="view-page" target="_blank"><span class="tvd-icon-eye"></span><?php echo __( 'View', 'thrive-dash' ) ?></a>
<span class="tvd-sep"></span>
<button class="click open-remove-options"><span class="tvd-icon-delete"></span><?php echo __( 'Remove page', 'thrive-dash' ) ?></button>
</div>
</div>
<div class="custom-redirect-remove-page-wrapper" style="display: none">
<?php echo __( 'Are you sure you want to remove this login redirect page?', 'thrive-dash' ) ?>
<div class="remove-page-options">
<button class="click keep-page"><?php echo __( 'Keep this page', 'thrive-dash' ) ?></button>
<button class="click remove-page"><?php echo __( 'Remove this page', 'thrive-dash' ) ?></button>
</div>
</div>

View File

@@ -0,0 +1,16 @@
<div class="tvd-am-item-wrapper tvd-am-functionality-wrapper tvd-am-<#= model.getTag() #>">
<div class="tvd-am-item-icon tvd-am-functionality-icon">
<?php dashboard_icon( '<#= model.getIcon() #>' ); ?>
</div>
<div class="tvd-am-item-title tvd-am-functionality-title">
<#= model.getName()#>
</div>
<div>
<select class="tvd-am-functionality-select" data-functionality="<#= model.getTag() #>">
<# optionsTags.forEach((option, index) => {#>
<option value="<#= option #>"
<#= option === selectedValue ? 'selected=selected' : ''#>><#= optionsNames[index] #></option>
<#})#>
</select>
</div>
</div>

View File

@@ -0,0 +1,14 @@
<div class="tvd-am-item-wrapper tvd-am-product-wrapper">
<div class="tvd-am-item-icon tvd-am-product-icon">
<img src="<#= model.getLogo() #>" alt="" class="tvd-responsive-img">
</div>
<div class="tvd-am-item-title tvd-am-product-title">
<#= model.getName() #>
</div>
<div class="tvd-am-product-cap-wrapper">
<button class="tvd-am-product-cap click tvd-am-<#= canUse #> tvd-am<#= isEditable #>" data-cap="<#= model.getProductCapability() #>">
<?php dashboard_icon( '<#= canUse.concat(isEditable)#>' ); ?>
<div class="tvd-am-product-cap-tooltip"></div>
</button>
</div>
</div>

View File

@@ -0,0 +1,3 @@
<button class="click tvd-am-role<#= model.isActive() ? ' active' : ''#>" data-role="<#= model.getTag() #>">
<#= model.getName() #>
</button>