Plugin Directory

Changeset 1684692


Ignore:
Timestamp:
06/24/2017 11:09:22 AM (9 years ago)
Author:
ntm
Message:
  • initialization of the plugin: the languages files will load again coorectly
Location:
custom-field-list-widget/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • custom-field-list-widget/trunk/readme.txt

    r854324 r1684692  
    33Tags: custom field, meta information, guest list, widget, multiple widgets
    44Requires at least: 2.7
    5 Tested up to: 3.8.1
    6 Stable tag: 1.2.7
     5Tested up to: 4.8
     6Stable tag: 1.2.8
    77
    88This plugin creates lists of custom field information in the form of sidebar widgets.
     
    4343   
    4444    * widget\_custom\_field\_list.php
    45     * widget\_custom\_field\_list\_js.php
    4645    * widget\_custom\_field\_list\_individual\_href.php
    4746    * widget\_custom\_field\_list\_individual\_href\_advice.php
    4847    * widget\_custom\_field\_list\_individual\_href\_save\_data.php
     48    * widget\_custom\_field\_list\_js.php
    4949    * widget\_custom\_field\_list\_long\_selectbox.php
    5050    * widget\_custom\_field\_list.css
    51     * widget\_custom\_field\_list\_widgetsettings.css
    52     * customfieldlist-de\_DE.mo (German localization file)
    53     * customfieldlist-de\_DE.po (German localization file)
    54     * customfieldlist-bg\_BG.mo (Bulgarian localization file)
    55     * customfieldlist-bg\_BG.po (Bulgarian localization file)
    56     * customfieldlist-hi\_IN.mo (Hindi localization file)
    57     * customfieldlist-hi\_IN.po (Hindi localization file)
    58     * customfieldlist-dk\_DK.mo (Danish localization file)
    59     * customfieldlist-dk\_DK.po (Danish localization file)
    60     * customfieldlist-ru\_RU.mo (Russian localization file)
    61     * customfieldlist-ru\_RU.po (Russian localization file)
    62     * customfieldlist-uz\_UZ.mo (Uzbek localization file)
    63     * customfieldlist-uz\_UZ.po (Uzbek localization file)
     51    * style\\widget_custom_field_list.css
     52    * style\\widget\_custom\_field\_list\_widgetsettings.css
     53    * languages\\customfieldlist-de\_DE.mo (German localization file)
     54    * languages\\customfieldlist-de\_DE.po (German localization file)
     55    * languages\\customfieldlist-bg\_BG.mo (Bulgarian localization file)
     56    * languages\\customfieldlist-bg\_BG.po (Bulgarian localization file)
     57    * languages\\customfieldlist-hi\_IN.mo (Hindi localization file)
     58    * languages\\customfieldlist-hi\_IN.po (Hindi localization file)
     59    * languages\\customfieldlist-dk\_DK.mo (Danish localization file)
     60    * languages\\customfieldlist-dk\_DK.po (Danish localization file)
     61    * languages\\customfieldlist-ru\_RU.mo (Russian localization file)
     62    * languages\\customfieldlist-ru\_RU.po (Russian localization file)
     63    * languages\\customfieldlist-uz\_UZ.mo (Uzbek localization file)
     64    * languages\\customfieldlist-uz\_UZ.po (Uzbek localization file)
    6465    * uninstall.php
    6566   
     
    148149
    149150== Changelog ==
     151
     152= v1.2.8 =
     153* minor improvement
    150154
    151155= v1.2.7 =
  • custom-field-list-widget/trunk/widget_custom_field_list.php

    r854324 r1684692  
    55Description: This plugin creates sidebar widgets with lists of the values of a custom field (name). The listed values can be (hyper-)linked in different ways.
    66Author: Tim Berger
    7 Version: 1.2.7
     7Version: 1.2.8
    88Author URI: http://undeuxoutrois.de/
    99Min WP Version: 2.7
    10 Max WP Version: 3.8.1
     10Max WP Version: 4.8
    1111License: GNU General Public License
     12Text Domain: customfieldlist
    1213
    1314Requirements:
     
    2728For detailed information about the usage of this plugin, please read the readme.txt.   
    2829
    29 Copyright 2014  Tim Berger  (email : be.tim.info@web.de)
     30Copyright 2017  Tim Berger  (email : be.tim.info@web.de)
    3031
    3132    This program is free software; you can redistribute it and/or modify
     
    4647
    4748*/
    48 
     49function my_plugin_load_plugin_textdomain() {
     50    load_plugin_textdomain( 'my-plugin', FALSE, basename( dirname( __FILE__ ) ) . '/languages/' );
     51}
     52add_action( 'plugins_loaded', 'my_plugin_load_plugin_textdomain' );
    4953
    5054add_action('plugins_loaded', 'customfieldlist_init');
    5155function customfieldlist_init() {
     56    global $wp_version;
    5257    // #######################################################################################
    5358    // max. number of hierarchy steps resp. number of
     
    6267    if ( ! defined( 'CUSTOM_FIELD_LIST_WIDGET_DIR' ) ) { define( 'CUSTOM_FIELD_LIST_WIDGET_DIR', WP_PLUGIN_DIR.'/'.dirname(plugin_basename(__FILE__)) ); }
    6368    if ( ! defined( 'CUSTOM_FIELD_LIST_WIDGET_URL' ) ) { define( 'CUSTOM_FIELD_LIST_WIDGET_URL', WP_PLUGIN_URL.'/'.dirname(plugin_basename(__FILE__)) ); }
    64    
     69
    6570    // load the translation file
    66     if (function_exists('load_plugin_textdomain')) {
    67         load_plugin_textdomain( 'customfieldlist', false, str_replace(WP_PLUGIN_DIR.'/languages', '', CUSTOM_FIELD_LIST_WIDGET_DIR) );
     71    if ( function_exists('load_plugin_textdomain') ) {
     72        if ( version_compare( $wp_version, '2.7', '>=' ) ) {
     73            load_plugin_textdomain( 'customfieldlist', FALSE, str_replace(WP_PLUGIN_DIR.'/', '', CUSTOM_FIELD_LIST_WIDGET_DIR.'/languages/') );
     74        } else {
     75            load_plugin_textdomain( 'customfieldlist', FALSE, CUSTOM_FIELD_LIST_WIDGET_DIR.'/languages/' );
     76        }
    6877    }
    6978}
     
    370379
    371380// helper function - only for development purposes
    372 function customfieldlist_var_dump($var) {
     381/*function customfieldlist_var_dump($var) {
    373382    // write the out put to the log file
    374383    $filename = CUSTOM_FIELD_LIST_WIDGET_DIR.'/widget_custom_field_list_cronlog.dat';
     
    382391    if (is_file($filename)) {chmod ($filename, 0644);}
    383392}
     393*/
    384394
    385395function customfieldlist_get_parts_of_strings($output_array=array(), $list_part_nr_type='1Lfront') {
Note: See TracChangeset for help on using the changeset viewer.