Plugin Directory

Changeset 2821001


Ignore:
Timestamp:
11/19/2022 10:35:45 PM (3 years ago)
Author:
darkmysite
Message:

Version 1.0.1

Location:
darkmysite
Files:
80 added
6 edited

Legend:

Unmodified
Added
Removed
  • darkmysite/trunk/assets/js/client_main.js

    r2819372 r2821001  
    1515function darkmysite_init() {
    1616    'use strict';
     17
     18    /* Auto exclude elements those has no background color set */
     19    document.querySelectorAll( "div, section, header, footer, main, aside" ).forEach( function(e) {
     20        if(window.getComputedStyle(e, null).backgroundColor == 'rgba(0, 0, 0, 0)'){
     21            e.classList.add("darkmysite_bg_ignore");
     22            e.querySelectorAll("*").forEach(function (e) {
     23                return e.classList.add("darkmysite_bg_ignore");
     24            })
     25        }else{
     26            e.classList.remove("darkmysite_bg_ignore");
     27        }
     28    });
     29
     30
     31    /* Switch to latest dark or normal state */
    1732    if (darkmysite_last_state === "1" || darkmysite_last_state === "0") {
    1833        if (darkmysite_last_state === "1") {
  • darkmysite/trunk/darkmysite.php

    r2819372 r2821001  
    44 * Plugin URI:        https://darkmysite.com
    55 * Description:       Simplest way to enable dark mode on your website - DarkMySite.
    6  * Version:           1.0.0
     6 * Version:           1.0.1
    77 * Author:            DarkMySite - WP Dark Mode
    88 * Author URI:        https://darkmysite.com
     
    1919}
    2020
    21 defined( 'DARKMYSITE_VERSION' ) or define( 'DARKMYSITE_VERSION', '1.0.0' );
     21defined( 'DARKMYSITE_VERSION' ) or define( 'DARKMYSITE_VERSION', '1.0.1' );
    2222defined( 'DARKMYSITE_PATH' ) or define( 'DARKMYSITE_PATH', plugin_dir_path( __FILE__ ) );
    2323defined( 'DARKMYSITE_URL' ) or define( 'DARKMYSITE_URL', plugin_dir_url( __FILE__ ) );
     
    3737        require_once DARKMYSITE_PATH . 'includes/DarkMySiteUtils.php';
    3838        require_once DARKMYSITE_PATH . 'includes/DarkMySiteSettings.php';
     39        require_once DARKMYSITE_PATH . 'includes/DarkMySiteExternalSupport.php';
    3940        require_once DARKMYSITE_PATH . 'backend/class-darkmysite-ajax.php';
    4041        require_once DARKMYSITE_PATH . 'backend/class-darkmysite-admin.php';
  • darkmysite/trunk/frontend/class-darkmysite-client.php

    r2819372 r2821001  
    1212        public $utils;
    1313        public $settings;
     14        public $external_support;
    1415
    1516        public function __construct()
     
    1718            $this->utils = new DarkMySiteUtils($this);
    1819            $this->settings = new DarkMySiteSettings($this);
     20            $this->external_support = new DarkMySiteExternalSupport($this);
    1921            new DarkMySiteClientAjax($this);
    2022            new DarkMySiteShortcodeParser($this);
  • darkmysite/trunk/frontend/templates/dashboard.php

    r2819372 r2821001  
    1313<?php
    1414$disallowed_elements = "";
     15
     16
     17// Get Disallowed Elements from External Plugins
     18$disallowed_from_external = $this->external_support->getDisallowedElementsByAvailablePlugins();
     19if(sizeof($disallowed_from_external) > 0){
     20    foreach( $disallowed_from_external as $single_element ) {
     21        $disallowed_elements .= ', '.trim($single_element);
     22    }
     23}
    1524?>
    1625
  • darkmysite/trunk/frontend/templates/views/inline_styles_rules.php

    r2819372 r2821001  
    11<style type="text/css">
     2    .darkmysite_dark_mode_enabled <?php echo esc_attr($allowed_element); ?>:not(.darkmysite_switch, .darkmysite_switch *, .darkmysite_ignore, .darkmysite_ignore *, .darkmysite_bg_ignore, input, textarea, button, select, mark, code, pre, ins, option, img, progress, iframe, svg, video, canvas, a, path, i <?php echo esc_attr($disallowed_elements); ?>),
     3    .darkmysite_dark_mode_enabled <?php echo esc_attr($allowed_element); ?> *:not(.darkmysite_switch, .darkmysite_switch *, .darkmysite_ignore, .darkmysite_ignore *, .darkmysite_bg_ignore, input, textarea, button, select, mark, code, pre, ins, option, img, progress, iframe, svg, video, canvas, a, path, i <?php echo esc_attr($disallowed_elements); ?>) {
     4        background: var(--darkmysite_dark_mode_bg) !important;
     5        background-color: var(--darkmysite_dark_mode_bg) !important;
     6    }
    27    .darkmysite_dark_mode_enabled <?php echo esc_attr($allowed_element); ?>:not(.darkmysite_switch, .darkmysite_switch *, .darkmysite_ignore, .darkmysite_ignore *, input, textarea, button, select, mark, code, pre, ins, option, img, progress, iframe, svg, video, canvas, a, path, i <?php echo esc_attr($disallowed_elements); ?>),
    38    .darkmysite_dark_mode_enabled <?php echo esc_attr($allowed_element); ?> *:not(.darkmysite_switch, .darkmysite_switch *, .darkmysite_ignore, .darkmysite_ignore *, input, textarea, button, select, mark, code, pre, ins, option, img, progress, iframe, svg, video, canvas, a, path, i <?php echo esc_attr($disallowed_elements); ?>) {
    4         background: var(--darkmysite_dark_mode_bg) !important;
    5         background-color: var(--darkmysite_dark_mode_bg) !important;
    69        color: var(--darkmysite_dark_mode_text_color) !important;
     10    }
     11    .darkmysite_dark_mode_enabled <?php echo esc_attr($allowed_element); ?>:not(.darkmysite_switch, .darkmysite_switch *, .darkmysite_ignore, .darkmysite_ignore *, input, textarea, button, select, mark, code, pre, ins, option, img, progress, iframe, svg, video, canvas, a, path, i <?php echo esc_attr($disallowed_elements); ?>),
     12    .darkmysite_dark_mode_enabled <?php echo esc_attr($allowed_element); ?> *:not(.darkmysite_switch, .darkmysite_switch *, .darkmysite_ignore, .darkmysite_ignore *, input, textarea, button, select, mark, code, pre, ins, option, img, progress, iframe, svg, video, canvas, a, path, i <?php echo esc_attr($disallowed_elements); ?>) {
    713        border-color: var(--darkmysite_dark_mode_border_color) !important;
    814    }
  • darkmysite/trunk/readme.txt

    r2819372 r2821001  
    66Requires at least: 4.8
    77Tested up to: 6.1
    8 Stable tag: 1.0.0
     8Stable tag: 1.0.1
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    115115== Changelog ==
    116116
     117= 1.0.1 =
     118Support for page builder has been added and tested with more than 20 themes.
     1191. Elementor Page Builder support added
     1202. Elements having background image will not be changed in dark mode
     1213. Elements those has no background property, will kept unchanged in dark mode
     122
    117123= 1.0.0 =
    118124This is the initial release of DarkMySite. With this release, DarkMySite started the journey with both the Free Version and Paid Version.
Note: See TracChangeset for help on using the changeset viewer.