Plugin Directory

Changeset 2531277


Ignore:
Timestamp:
05/13/2021 03:48:52 PM (5 years ago)
Author:
jakeob
Message:

Added possibility to overtake styles.

Location:
simple-ftp-directory-lister/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • simple-ftp-directory-lister/trunk/readme.txt

    r2376663 r2531277  
    44Tags: FTP lister, directory lister, file lister, show files from ftp
    55Requires at least: 5.1
    6 Tested up to: 5.4
     6Tested up to: 5.7
    77Requires PHP: 7.2
    8 Stable tag: 1.4.3
     8Stable tag: 1.4.4
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6262 
    6363Yes, you can define the text in CSS. You have to get the language from the page somewhere. For example if your theme writes language class to body tag the css will be: body.en_GB .sdfl-no-files-available-wrapper::after {content: "No files available at the moment.";}
     64
     65= Can I completely change the styles your plugin is using? =
     66 
     67Yes, you can. To use your styles you need to create a folder called simple-ftp-directory-lister within your theme directory with a subfolder called css. From now on all the styles of the plugin will be loaded from this folder. Be aware that you should be using child theme in order to keep any theme changes after you update the theme. There are 5 different css files that controls styles. You need to copy these files from the plugin folder to the css folder you just created. Now change anything you want in these files, the plugin will be loading these and ignore its own css files. Example where you need to create the folder: /wp-content/themes/themeyouareusing/simple-ftp-directory-lister/css/"
    6468 
    6569== Screenshots ==
     
    7074 
    7175== Changelog ==
     76= 1.4.4 =
     77Added possibility to overtake styles.
    7278= 1.4.3 =
    7379Updated example of upload directory.
  • simple-ftp-directory-lister/trunk/simple-ftp-directory-lister.php

    r2376663 r2531277  
    33 * Plugin Name:       Simple FTP Directory Lister
    44 * Description:       Choose folder from FTP - WP UPLOAD DIRECTORY - and display all its files and subfolders. Easy integration.
    5  * Version:           1.4.3
     5 * Version:           1.4.4
    66 * Requires at least: 5.2
    77 * Requires PHP:      7.2
     
    176176<style>
    177177<?php
     178$pathToStyles = "assets/css";
     179$pathToStylesThemeOverride = get_stylesheet_directory() . "/simple-ftp-directory-lister";
     180if (is_dir( $pathToStylesThemeOverride )){
     181$pathToStyles = $pathToStylesThemeOverride."/css";
     182}
     183
    178184
    179185/*load styles */
     
    182188
    183189  echo "@media (min-width: ".($options_array["mobile_version_breakpoint"]+1)."px) {";
    184   include "assets/css/simple-ftp-directory-lister-horizontal.css";
     190  include $pathToStyles."/simple-ftp-directory-lister-horizontal.css";
    185191  echo '}';
    186192
    187193  echo "@media (max-width: ".$options_array["mobile_version_breakpoint"]."px) {";
    188   include "assets/css/simple-ftp-directory-lister-horizontal-mobile.css";
     194  include $pathToStyles."/simple-ftp-directory-lister-horizontal-mobile.css";
    189195  echo '}';
    190196        }
    191197else  {
    192   include "assets/css/simple-ftp-directory-lister-vertical.css";
    193 }
    194 
    195 include "assets/css/simple-ftp-directory-lister.css";
     198  include $pathToStyles."/simple-ftp-directory-lister-vertical.css";
     199}
     200
     201include $pathToStyles."/simple-ftp-directory-lister.css";
    196202
    197203echo "#mobile-indicator {
     
    204210  }
    205211}";
    206 include "assets/css/simple-ftp-directory-lister-icons.css";
     212include $pathToStyles."/simple-ftp-directory-lister-icons.css";
    207213?>
    208214</style>
Note: See TracChangeset for help on using the changeset viewer.