Plugin Directory

Changeset 1416558


Ignore:
Timestamp:
05/13/2016 07:33:32 PM (10 years ago)
Author:
xnicoco
Message:

better support overriding the plugin files in a wordpress theme directory

Location:
katracker/trunk
Files:
4 added
4 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • katracker/trunk/README.txt

    r1416531 r1416558  
    3838Note that torrents view best in list view and not in grid view.
    3939
     40For theme developers:
     41If you want to override the widget or the shortcode implementations and stylesheets, don't edit the files in the plugin directory as they will revert every time the plugin is updated. Instead, include in your theme directory a copy of the following files:
     42* For the widget: katracker-widget.php and katracker-widget.css
     43* For the shortcode: katracker-shortcode.php and katracker-shortcode.css
     44
    4045== Screenshots ==
    4146
     
    4752
    4853== Changelog ==
     54= 1.0.4 =
     55* Changed filenames, so there is better support to override plugins file in wordpress themes.
     56
    4957= 1.0.3 =
    5058* Fixed seed/peer statistics
  • katracker/trunk/katracker.php

    r1416531 r1416558  
    55 * Description: The only full and all powerful, complete bittorrent tracker integration for wordpress.
    66 * Author: nicoco
    7  * Version: 1.0.3
     7 * Version: 1.0.4
    88 * Author URI: kateam.org
    99 * License: GPL2
  • katracker/trunk/shortcode/shortcode.php

    r1398530 r1416558  
    2727    $template_part = locate_template( KATRACKER_PRE . '-shortcode.php' );
    2828    if ( empty( $template_part ) ) {
    29         $template_part = plugin_dir_path( __FILE__ ) . 'shortcode-content.php';
     29        $template_part = plugin_dir_path( __FILE__ ) . KATRACKER_PRE . '-shortcode.php';
    3030    }
    3131
     
    4646    $template_part = locate_template( array( KATRACKER_PRE . '-shortcode.css' ) );
    4747    if ( empty( $template_part ) ) {
    48         $template_part = plugins_url( 'shortcode-style.css', __FILE__ );
     48        $template_part = plugins_url( KATRACKER_PRE . '-shortcode.css', __FILE__ );
    4949    } else {
    5050        $template_part = get_template_directory_uri() . '/' . KATRACKER_PRE . '-shortcode.css';
  • katracker/trunk/widget/widget.php

    r1407779 r1416558  
    3333        $template_part = locate_template( KATRACKER_PRE . '-widget.php' );
    3434        if ( empty( $template_part ) ) {
    35             $template_part = plugin_dir_path( __FILE__ ) . 'widget-content.php';
     35            $template_part = plugin_dir_path( __FILE__ ) . KATRACKER_PRE . '-widget.php';
    3636        }
    3737
    3838        // Load Style
    39         wp_enqueue_style( 'katracker-shortcode-style' );
     39        wp_enqueue_style( 'katracker-widget-style' );
    4040        require_once $template_part;
    4141
     
    9696    $template_part = locate_template( array( KATRACKER_PRE . '-widget.css' ) );
    9797    if ( empty( $template_part ) ) {
    98         $template_part = plugins_url( 'widget-style.css', __FILE__ );
     98        $template_part = plugins_url( KATRACKER_PRE . '-widget.css', __FILE__ );
    9999    } else {
    100100        $template_part = get_template_directory_uri() . '/' . KATRACKER_PRE . '-widget.css';
Note: See TracChangeset for help on using the changeset viewer.