Plugin Directory

Changeset 2465565


Ignore:
Timestamp:
01/30/2021 02:54:33 PM (5 years ago)
Author:
themexa
Message:

v2.9 - Autoloader Required Once, Settings and Other Plugin Links Added

Location:
secure-file-manager/trunk
Files:
3 added
6 edited

Legend:

Unmodified
Added
Removed
  • secure-file-manager/trunk/includes/admin.php

    r2453424 r2465565  
    3030        'sfm_settings_display'
    3131    );
     32
     33    global $sfm_access_control;
     34    $sfm_access_control = add_submenu_page(
     35        $menu_slug,
     36        __( 'Access Control', 'secure-file-manager' ),
     37        __( 'Access Control', 'secure-file-manager' ),
     38        'administrator',
     39        'sfm_access_control',
     40        'sfm_access_control_display'
     41    );
     42}
     43
     44add_filter( 'plugin_action_links_' . plugin_basename(SECURE_FILE_MANAGER_PLUGIN_FILE), 'secure_file_manager_settings_link' );
     45function secure_file_manager_settings_link( $actions ){
     46
     47    array_unshift( $actions, '<a href="'. esc_url( get_admin_url(null, 'admin.php?page=sfm_settings') ) .'">Settings</a>' );
     48    array_unshift( $actions, '<b><a href="'. esc_url( 'https://themexa.com/secure-file-manager-pro') .'" target="_blank">Get Pro</a></b>' );
     49    return $actions;
     50
     51}
     52
     53add_filter( 'plugin_row_meta', 'secure_file_manager_plugin_row_meta', 10, 2 );
     54function secure_file_manager_plugin_row_meta( $links, $file ) {
     55    if ( strpos( $file, 'secure-file-manager.php' ) !== false ) {
     56        $new_links = array(
     57            '<b><a href="' . esc_url( 'https://themexa.com/support' ) . '" target="_blank">Support</a></b>'
     58        );
     59        $links = array_merge( $links, $new_links );
     60    }
     61    return $links;
    3262}
    3363
     
    6494<?php }
    6595
    66 function sfm_settings_display() {
     96function sfm_access_control_display() {
    6797
    6898    if ( ! current_user_can( 'manage_options' ) ) {
     
    78108                    <div class="jumbotron" style="background-image: url( <?php echo plugin_dir_url( dirname( __FILE__ ) ); ?>assets/images/tinypixi_pluginman_head.png ); ">
    79109                        <h1 class="display-3"><?php _e( 'Secure File Manager', 'secure-file-manager' ); ?></h1>
    80                         <p class="lead"><?php _e( 'Settings', 'bwpse' ); ?></p>
     110                        <p class="lead"><?php _e( 'Access Control', 'bwpse' ); ?></p>
    81111                    </div>
    82112                </div>
     
    144174    </div>
    145175<?php }
     176
     177function sfm_settings_display() {
     178
     179    if ( ! current_user_can( 'manage_options' ) ) {
     180        wp_die( '<h1>Unauthorized Access. Please contact Site Administrator.</h1>' );
     181    }
     182
     183    ?>
     184
     185    <div class="tx_wrap sfm_wrapper">
     186        <div class="container">
     187            <div class="row">
     188                <div class="col-lg-12">
     189                    <div class="jumbotron" style="background-image: url( <?php echo plugin_dir_url( dirname( __FILE__ ) ); ?>assets/images/tinypixi_pluginman_head.png ); ">
     190                        <h1 class="display-3"><?php _e( 'Secure File Manager', 'secure-file-manager' ); ?></h1>
     191                        <p class="lead"><?php _e( 'Settings', 'bwpse' ); ?></p>
     192                    </div>
     193                </div>
     194            </div>
     195            <div class="row alert alert-success mb-4">
     196                <div class="col-10 text-center pt-2">
     197                    <h5>This is a demo screenshot of the pro features. To get the pro features, get Secure File Manager Pro.</h5>
     198                </div>
     199                <div class="col-2">
     200                    <a href="https://themexa.com/secure-file-manager-pro" target="_blank">
     201                        <button type="button" class="btn btn-primary">Get Pro</button>
     202                    </a>
     203                </div>
     204            </div>
     205            <div class="row">
     206                <div class="col-12 my-4">
     207                    <h4 class="my-4 text-center"><strong>Global Settings</strong></h4>
     208                    <img src="<?php echo plugin_dir_url( dirname( __FILE__ ) ); ?>assets/images/global.jpg" class="img-fluid">
     209                </div>
     210            </div>
     211            <div class="row alert alert-success mb-4">
     212                <div class="col-10 text-center pt-2">
     213                    <h5>This is a demo screenshot of the pro features. To get the pro features, get Secure File Manager Pro.</h5>
     214                </div>
     215                <div class="col-2">
     216                    <a href="https://themexa.com/secure-file-manager-pro" target="_blank">
     217                        <button type="button" class="btn btn-primary">Get Pro</button>
     218                    </a>
     219                </div>
     220            </div>
     221            <div class="row">
     222                <div class="col-12 my-4">
     223                    <h4 class="my-4 text-center"><strong>User Access</strong></h4>
     224                    <img src="<?php echo plugin_dir_url( dirname( __FILE__ ) ); ?>assets/images/user-access.jpg" class="img-fluid">
     225                </div>
     226            </div>
     227            <div class="row alert alert-success mb-4">
     228                <div class="col-10 text-center pt-2">
     229                    <h5>This is a demo screenshot of the pro features. To get the pro features, get Secure File Manager Pro.</h5>
     230                </div>
     231                <div class="col-2">
     232                    <a href="https://themexa.com/secure-file-manager-pro" target="_blank">
     233                        <button type="button" class="btn btn-primary">Get Pro</button>
     234                    </a>
     235                </div>
     236            </div>
     237            <div class="row">
     238                <div class="col-12 my-4">
     239                    <h4 class="my-4 text-center"><strong>Restrict User</strong></h4>
     240                    <img src="<?php echo plugin_dir_url( dirname( __FILE__ ) ); ?>assets/images/restrict-user.jpg" class="img-fluid">
     241                </div>
     242            </div>
     243            <div class="row alert alert-success mb-4">
     244                <div class="col-10 text-center pt-2">
     245                    <h5>This is a demo screenshot of the pro features. To get the pro features, get Secure File Manager Pro.</h5>
     246                </div>
     247                <div class="col-2">
     248                    <a href="https://themexa.com/secure-file-manager-pro" target="_blank">
     249                        <button type="button" class="btn btn-primary">Get Pro</button>
     250                    </a>
     251                </div>
     252            </div>
     253            <div>
     254
     255            </div>
     256        </div>
     257    </div>
     258<?php }
  • secure-file-manager/trunk/includes/assets.php

    r2457478 r2465565  
    1212
    1313    global $sfm_file_manager;
     14    global $sfm_access_control;
    1415    global $sfm_settings;
    1516
    16     if( $hook != $sfm_file_manager && $hook != $sfm_settings ) {
     17    if( $hook != $sfm_file_manager && $hook != $sfm_access_control && $hook != $sfm_settings) {
    1718        return;
    1819    }
  • secure-file-manager/trunk/readme.txt

    r2457478 r2465565  
    66Tested up to: 5.6
    77Requires PHP: 7.1
    8 Stable tag: 2.8.2
     8Stable tag: 2.9
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    158158* Authenticated RCE Vulnerability Fixed
    159159
     160= 2.9 =
     161* File Manager Autoloader Required Once
     162* Settings and Other Plugin Links Added
     163
    160164== Upgrade Notice ==
    161165= 1.0 =
  • secure-file-manager/trunk/secure-file-manager.php

    r2457478 r2465565  
    33/**
    44 * @package Secure File Manager
    5  * @version 2.8.2
     5 * @version 2.9
    66 */
    77
    88/*
    99Plugin Name: Secure File Manager
    10 Plugin URI: https://www.themexa.com/project/wp-secure-file-manager
     10Plugin URI: https://themexa.com/secure-file-manager-pro
    1111Description: Most Beautiful and Secure WordPress File Manager
    1212Author: Themexa
    13 Version: 2.8.2
     13Version: 2.9
    1414Author URI: https://www.themexa.com
    1515License: GPL2
     
    2525 * Current plugin version.
    2626 */
    27 define( 'secure-file-manager', '2.8.2' );
     27define( 'secure-file-manager', '2.9' );
     28
     29/**
     30 * Secure File Manager Plugin File
     31 */
     32define( 'SECURE_FILE_MANAGER_PLUGIN_FILE', __FILE__ );
    2833
    2934/**
  • secure-file-manager/trunk/vendor/elfinder/js/script.js

    r2452008 r2465565  
    22    $(document).ready(function() {
    33        $('#elfinder').elfinder(
    4             // 1st Arg - options
    54            {
    65                cssAutoLoad : false,               // Disable CSS auto loading
     
    87                url : elfScript.pluginsDirUrl + '/vendor/elfinder/php/connector.minimal.php',
    98                customData : {_wpnonce: elfScript.sfmpNonceKey },
    10                 // , lang: 'ru'                    // language (OPTIONAL)
    119            },
    12             // 2nd Arg - before boot up function
    1310            function(fm, extraObj) {
    1411                // `init` event callback function
     
    2926                    }
    3027                });
    31                 // Optional for set document.title dynamically.
    3228                var title = document.title;
    3329                fm.bind('open', function() {
  • secure-file-manager/trunk/vendor/elfinder/php/connector.minimal.php

    r2457478 r2465565  
    1717
    1818// elFinder autoload
    19 require './autoload.php';
     19require_once './autoload.php';
    2020// ===============================================
    2121
     
    4444    file_put_contents('.debug.txt', $o, FILE_APPEND);
    4545}
    46 
    47 
    4846
    4947/**
Note: See TracChangeset for help on using the changeset viewer.