Plugin Directory

Changeset 2082430


Ignore:
Timestamp:
05/07/2019 01:22:02 PM (7 years ago)
Author:
wsmeu
Message:

Added custom templating functionality
Added german language files

Location:
color-system-visualizer
Files:
64 added
3 edited

Legend:

Unmodified
Added
Removed
  • color-system-visualizer/trunk/color-system-visualizer.php

    r2077660 r2082430  
    66Author: WSM – Walter Solbach Metallbau GmbH
    77Author URI: https://www.wsm.eu/
    8 Version: 1.0
     8Version: 1.1
    99Text Domain:
    1010Domain Path: /languages
  • color-system-visualizer/trunk/includes/cpm_template_register.php

    r2077660 r2082430  
    1111    /* Checks for single template by post type */
    1212    if ( $post->post_type == 'color' ) {
    13         if ( file_exists( plugin_dir_path( __FILE__ ) . 'cpm-single-template.php' ) ) {
     13        if ( file_exists( get_stylesheet_directory() . '/cpm-single-template.php' ) ) {
     14            return get_stylesheet_directory() . '/cpm-single-template.php';
     15        } else if ( file_exists( plugin_dir_path( __FILE__ ) . 'cpm-single-template.php' ) ) {
    1416            return plugin_dir_path( __FILE__ ) . 'cpm-single-template.php';
    1517        }
     
    2325
    2426function get_cpm_color_palette_archive_template( $archive_template ) {
    25      global $post;
     27    global $post;
    2628
    27      if ( ( is_archive () ) && ( ( $post->post_type == 'color' ) ) ) {
    28           $archive_template = plugin_dir_path( __FILE__ ) . 'cpm-archive-template.php';
    29           return $archive_template;
    30      }
    31      return $archive_template;
     29    if ( ( is_archive () ) && ( ( $post->post_type == 'color' ) ) ) {
     30        if ( file_exists( get_stylesheet_directory() . '/cpm-archive-template.php' ) ) {
     31            $archive_template = get_stylesheet_directory() . '/cpm-archive-template.php';
     32        } else if ( file_exists( plugin_dir_path( __FILE__ ) . 'cpm-archive-template.php' ) ) {
     33            $archive_template = plugin_dir_path( __FILE__ ) . 'cpm-archive-template.php';
     34        }
     35
     36        return $archive_template;
     37    }
     38
     39    return $archive_template;
    3240}
    3341
  • color-system-visualizer/trunk/readme.txt

    r2077660 r2082430  
    11=== Color System Visualizer ===
    22Contributors: wsmeu
    3 Tags: color, colour, color palette, colour palette, color manager, colour manager, ral, hks, pantone
     3Tags: color, colour, color palette, colour palette, color manager, colour manager, color system, colour system, ral, hks, pantone
    44Requires at least:
    55Tested up to: 5.1.1
    6 Stable tag: 1.0
     6Stable tag: 1.1
    77License: GPLv3
    88License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    26261. Upload the plugin files to the `/wp-content/plugins/color-system-visualizer` directory, or install the plugin through the WordPress plugins screen directly.
    27272. Activate the plugin through the 'Plugins' screen in WordPress.
    28 3. Go to newly created custom post type "Color Palette"
     283. Go to newly created custom post type "Color Palette".
    29294. Add new color palette and colors manually or by uploading a CSV file.
     305. To edit the templates, simply copy `includes/cpm-archive-template.php` and `includes/cpm-single-template.php` into your theme's main folder, e.g. `your-theme/cpm-archive-template.php`.
    3031
    3132== Screenshots ==
     
    3334== Changelog ==
    3435
     36= 1.1 =
     37* Added custom templating functionality
     38* Added german language files
     39
    3540= 1.0 =
    3641* Initial release for WordPress plugin directory.
Note: See TracChangeset for help on using the changeset viewer.