Plugin Directory

Changeset 2602711


Ignore:
Timestamp:
09/22/2021 01:28:05 AM (5 years ago)
Author:
rich_
Message:

change theme via customizer

Location:
awesome-code-highlighting/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • awesome-code-highlighting/trunk/index.php

    r2485627 r2602711  
    1010Tags: code highlight, syntax
    1111*/
     12
     13require_once(__DIR__ . '/customizer.php');
     14
    1215class RBK_Code_Highlight {
    1316    public function __construct() {   
     
    1518        add_action('wp_footer', array($this, 'rbk_remove_pre_style'));
    1619    }
     20
     21    public $options = array(
     22
     23    );
     24
    1725    public function rbk_code_highlights(){
    1826        wp_enqueue_script('rbk-code-highlights-js', plugin_dir_url( __FILE__ ).'highlight.pack.js', array());
    1927        wp_enqueue_script('rbk-code-highlights-js-2', plugin_dir_url( __FILE__ ).'init-highlight.js', array('rbk-code-highlights-js'));
    20         wp_enqueue_style('rbk-code-highlights-css', plugin_dir_url( __FILE__ ).'styles/atom-one-dark.css');
     28        wp_enqueue_style('rbk-code-highlights-css', plugin_dir_url( __FILE__ ).'styles/'.get_option('code_highlighting_theme').'.css');
    2129    }
    2230    public function rbk_remove_pre_style() {
  • awesome-code-highlighting/trunk/readme.txt

    r2485627 r2602711  
    44Tags: code
    55Requires at least: 3.0.1
    6 Tested up to: 5.6.2
    7 Stable tag: 0.0.2
     6Tested up to: 5.7.0
     7Stable tag: 0.0.3
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1515This plugin uses highlight.js to detect and highlight "pre" HTML tags.
    1616
    17 To customize the color scheme update change the wp_enqueue_style called in the index.php to match a file name in the styles directory.
     17To color theme use the customizer: Appearance -> Customize -> Code Highlighting Theme
    1818
    1919== Installation ==
Note: See TracChangeset for help on using the changeset viewer.