Plugin Directory

Changeset 1391526


Ignore:
Timestamp:
04/10/2016 05:44:39 PM (10 years ago)
Author:
tepelstreel
Message:

RSS Image Feed Version 2.4.5

Location:
rss-image-feed
Files:
10 edited
11 copied

Legend:

Unmodified
Added
Removed
  • rss-image-feed/tags/4.2.5/class-lib/A5_ExcerptClass.php

    r1375602 r1391526  
    66 *
    77 * @ A5 Plugin Framework
    8  * Version: 1.0 beta 20160321
     8 * Version: 1.0 beta 20160408
    99 *
    1010 * Gets the excerpt of a post according to some parameters
  • rss-image-feed/tags/4.2.5/class-lib/A5_FormFieldClass.php

    r1375602 r1391526  
    66 *
    77 * @ A5 Plugin Framework
    8  * Version: 1.0 beta 20160321
     8 * Version: 1.0 beta 20160408
    99 *
    1010 * Gets all sort of input fields for plugins by Atelier 5
     
    1616class A5_FormField {
    1717   
    18     const version = '1.0 beta 20160321 RIF';
     18    const version = '1.0 beta 20160408 RIF';
    1919   
    2020    public $formfield;
  • rss-image-feed/tags/4.2.5/class-lib/A5_ImageClass.php

    r1375602 r1391526  
    66 *
    77 * @ A5 Plugin Framework
    8  * Version: 1.0 beta 20160321
     8 * Version: 1.0 beta 20160408
    99 *
    1010 * Gets the alt and title tag for attachments
  • rss-image-feed/tags/4.2.5/class-lib/A5_OptionPageClass.php

    r1375602 r1391526  
    66 *
    77 * @ A5 Plugin Framework
    8  * Version: 1.0 beta 20160321
     8 * Version: 1.0 beta 20160408
    99 *
    1010 * Gets all sort of containers for the flexible A5 settings pages
     
    420420        foreach ($cache as $key => $value) :
    421421       
    422             $key = 'Post-ID: '.$key;
    423            
     422            $td = '';
     423           
     424            $count = 0;
     425           
     426            foreach ($value as $item => $content) :
     427           
     428                $count++;
     429           
     430                if (is_array($content)) :
     431                   
     432                    $td .= '<span style="text-decoration: underline">Post-ID: '.$item.'</span><br><br>';
     433                   
     434                    foreach ($content as $id => $entry) :
     435                       
     436                        if (is_array($entry)) :
     437                       
     438                            foreach ($entry as $a => $b) :
     439                           
     440                                $a = str_replace('_', ' ',$a);
     441                           
     442                                $td .= ucwords($a).': '.$b.'<br>';
     443                               
     444                            endforeach;
     445                       
     446                        else :
     447                       
     448                            $td .= self::tag_it($entry, 'p', 3);
     449                           
     450                        endif;
     451                       
     452                    endforeach;
     453                   
     454                    $td .= ($count < count($value)) ? '<hr style="border:solid #cccccc 1px;height:1px;">' : '';
     455                   
     456                else :
     457               
     458                    if ('enclosure' == $item || 'media_content' == $item) :
     459                   
     460                        $td .= self::tag_it(htmlentities($content), 'p', 3);
     461                       
     462                    else :
     463                   
     464                        $td .= $content;
     465                       
     466                    endif;
     467                   
     468                endif;
     469           
     470            endforeach;
     471           
     472            $key = (0 != $count) ? 'Widget-ID: '.$key : 'Post-ID: '.$key;
     473       
     474            $key = self::tag_it($key, 'td', 2, array('style' => 'width: 25%; border: solid 1px'));
     475           
     476            $value = self::tag_it($td, 'td', 2, array('style' => 'border: solid 1px; word-wrap: break-word'));
     477           
     478            $opt_str .= self::tag_it($key.$value, 'tr', 1);
     479       
     480        endforeach;
     481       
     482        $postbox .= self::tag_it($opt_str, 'table', 0, array('style' => 'border-collapse: collapse'));
     483       
     484        $postbox .= self::close_postbox();
     485       
     486        return $postbox;
     487       
     488    }
     489   
     490    /**
     491     *
     492     * Output contents of the debug.log file
     493     *
     494     */
     495    static function debug_log_info($label, $section_id) {
     496   
     497        $postbox = self::open_postbox($label, 'error-log-info', true);
     498       
     499        $filename = WP_CONTENT_DIR.'/debug.log';
     500       
     501        $errorlog = file_get_contents($filename);
     502       
     503        if ($errorlog):
     504       
    424505            ob_start();
    425    
    426             var_dump($value);
    427            
    428             $value = ob_get_contents();
    429            
    430             $value = self::tag_it($value, 'pre', 3);
     506       
     507            do_settings_sections($section_id);
     508           
     509            $section = ob_get_contents();
    431510           
    432511            ob_end_clean();
    433        
    434             $value = str_replace(array("\r\n", "\n", "\r"), '<br />', $value);
    435            
    436             $key = self::tag_it($key, 'td', 2, array('style' => 'width: 25%; border: solid 1px'));
    437            
    438             $value = self::tag_it($value, 'td', 2, array('style' => 'border: solid 1px'));
    439            
    440             $opt_str .= self::tag_it($key.$value, 'tr', 1);
    441        
    442         endforeach;
    443        
    444         $postbox .= self::tag_it($opt_str, 'table', 0, array('style' => 'border-collapse: collapse'));
    445        
    446         $postbox .= self::close_postbox();
    447        
    448         return $postbox;
    449        
    450     }
    451    
    452     /**
    453      *
    454      * Output contents of the debug.log file
    455      *
    456      */
    457     static function debug_log_info($label) {
    458    
    459         $postbox = self::open_postbox($label, 'error-log-info', true);
    460        
    461         $filename = WP_CONTENT_DIR.'/debug.log';
    462        
    463         $errorlog = file_get_contents($filename);
    464        
    465         if ($errorlog):
     512           
     513            $postbox .= self::tag_it($section, 'div');
    466514           
    467515            $postbox .= self::tag_it(nl2br($errorlog), 'div', 0, array('style' => 'border: 2px solid #cc0000; padding: 0.5em'));
  • rss-image-feed/tags/4.2.5/class-lib/RIF_AdminClass.php

    r1375602 r1391526  
    121121            if (count(self::$options['cache']) > 0) self::sortable('cache-info', self::cache_info(self::$options['cache'], __('Cache', 'rss-image-feed')));
    122122           
    123             if (true == WP_DEBUG_DISPLAY) self::sortable('errorlog-info', self::debug_log_info(__('Error Log', 'rss-image-feed')));
     123            if (true == WP_DEBUG_LOG) self::sortable('errorlog-info', self::debug_log_info(__('Error Log', 'rss-image-feed'), 'rss_debug_settings'));
    124124       
    125125            self::close_tab();
     
    164164        if ($cachesize > 0) add_settings_field('reset_cache', sprintf(__('Empty cache (%d %s):', 'rss-image-feed'), count(self::$options['cache']), $entry), array($this, 'reset_field'), 'new_image_settings', 'image_rss_settings', array(__('You can empty the plugin&#39;s cache here, if necessary.', 'rss-image-feed')));
    165165       
    166         if (true == WP_DEBUG && true == WP_DEBUG_DISPLAY) :
     166        if (true == WP_DEBUG && true == WP_DEBUG_LOG) :
    167167       
    168168            $filename = WP_CONTENT_DIR.'/debug.log';
     
    174174            $entry = ($logsize > 1) ? __('entries', 'rss-image-feed') : __('entry', 'rss-image-feed');
    175175           
    176             if ($logsize > 0) add_settings_field('reset_debug_log', sprintf(__('Empty debug log (%d %s):', 'rss-image-feed'), count($errorlog), $entry), array($this, 'reset_debug_field'), 'new_image_settings', 'image_rss_settings', array(__('You can empty the debug log here, if necessary.', 'rss-image-feed')));
     176            if ($logsize > 0) :
     177           
     178                add_settings_section('image_rss_settings', sprintf(__('Empty debug log (%d %s):', 'rss-image-feed'), count($errorlog), $entry), array($this, 'display_reset_section'), 'rss_debug_settings');
     179               
     180                add_settings_field('reset_debug_log', __('You can empty the debug log here, if necessary.', 'rss-image-feed'), array($this, 'reset_debug_field'), 'rss_debug_settings', 'image_rss_settings');
     181               
     182            endif;
    177183           
    178184        endif;
     
    218224    function display_notext() {
    219225       
    220         a5_checkbox('notext', 'rss_options[notext]', self::$options['notext'], __('Click, to not show post content.', 'rss-image-feed'));
     226        a5_checkbox('notext', 'rss_options[notext]', @self::$options['notext'], __('Click, to not show post content.', 'rss-image-feed'));
    221227       
    222228    }
     
    240246    }
    241247   
    242     function reset_debug_field($labels) {
    243        
    244         a5_checkbox('reset_debug_log', 'rss_options[reset_debug_log]', @self::$options['reset_debug_log'], $labels[0]);
     248    function display_reset_section() {
     249       
     250        self::tag_it(__('Empty the debug log.', 'rss-image-feed'), 'p');
     251   
     252    }
     253   
     254    function reset_debug_field() {
     255       
     256        submit_button(__('OK', 'rss-image-feed'), 'secondary', 'rss_options[reset_debug_log]', true, array('id' => 'reset_debug_log'));
    245257       
    246258    }
  • rss-image-feed/tags/4.2.5/image-rss.php

    r1375602 r1391526  
    44Plugin URI: http://wasistlos.waldemarstoffel.com/plugins-fur-wordpress/image-feed
    55Description: RSS Image Feed is not literally producing a feed of images but it adds the first image of the post to the normal feeds of your blog. Those images display even if you have the summary in the feed and not the content.
    6 Version: 4.2.4
     6Version: 4.2.5
    77Author: Stefan Crämer
    88Author URI: http://www.stefan-craemer.com
     
    139139        endif;
    140140       
    141         if (self::$options['media_content'] || self::$options['enclosure']) :
     141        if (@self::$options['media_content'] || @self::$options['enclosure']) :
    142142       
    143143            add_action( "rss2_ns", array( $this, 'set_feed_NameSpace') );
     
    196196            'enclosure' => false,
    197197            'media_content' => false,
    198             'cache' => array(),
     198            'notext' => false,
     199            'cache' => array(),
     200            'css' => false,
    199201            'image_number' => false
    200202        );
     
    314316                $rif_height = ($rif_image_info[2]) ? ' height="'.$rif_image_info[2].'"' :'';
    315317               
    316                 $rif_image_size = '" width="'.$rif_width.'" '.$rif_height;
    317                
    318                 if (!isset(self::$options['responsive']) || !self::$options['responsive']) $rif_image_size .= '" style="max-width: 100%; height: auto;"';
     318                $rif_image_size = '" width="'.$rif_width.'"'.$rif_height;
     319               
     320                if (isset(self::$options['responsive']) && self::$options['responsive']) $rif_image_size .= ' style="max-width: 100%; height: auto;"';
    319321           
    320322                $eol = "\n";
  • rss-image-feed/tags/4.2.5/languages/rss-image-feed-de_DE.po

    r1375602 r1391526  
    22msgstr ""
    33"Project-Id-Version: RSS Image Feed\n"
    4 "POT-Creation-Date: 2016-03-21 13:59+0200\n"
    5 "PO-Revision-Date: 2016-03-21 14:00+0200\n"
     4"POT-Creation-Date: 2016-04-10 20:42+0200\n"
     5"PO-Revision-Date: 2016-04-10 20:42+0200\n"
    66"Last-Translator: Stefan Crämer <translate@atelier-fuenf.de>\n"
    77"Language-Team: Waldemar Stoffel <stoffel@atelier-fuenf.de>\n"
     
    113113msgstr "Falls nötig, kannst du hier den Cache des Plugins leeren."
    114114
    115 #: class-lib/RIF_AdminClass.php:176
     115#: class-lib/RIF_AdminClass.php:178
    116116#, php-format
    117117msgid "Empty debug log (%d %s):"
    118118msgstr "Debug Log leeren (%d %s):"
    119119
    120 #: class-lib/RIF_AdminClass.php:176
     120#: class-lib/RIF_AdminClass.php:180
    121121msgid "You can empty the debug log here, if necessary."
    122122msgstr "Falls nötig, kannst du hier das Debug Log leeren."
    123123
    124 #: class-lib/RIF_AdminClass.php:184
     124#: class-lib/RIF_AdminClass.php:190
    125125msgid "Change the size of the image and the excerpt here."
    126126msgstr "Ändere die Größe des Bildes und des Auszuges hier."
    127127
    128 #: class-lib/RIF_AdminClass.php:190
     128#: class-lib/RIF_AdminClass.php:196
    129129msgid ""
    130130"Give here only the longest side of the image. The smaller side will be "
     
    134134"erstellen des Feed berechnet. Die Bilder werden nicht beschnitten."
    135135
    136 #: class-lib/RIF_AdminClass.php:196
     136#: class-lib/RIF_AdminClass.php:202
    137137msgid ""
    138138"Click, to make image size relativ and not static. This might make the feed "
     
    142142"deinen Feed mehr responsive machen."
    143143
    144 #: class-lib/RIF_AdminClass.php:202
     144#: class-lib/RIF_AdminClass.php:208
    145145msgid "Click, to include the &#34;media:content&#34; tag in the feed."
    146146msgstr "Anklicken, um das &#34;media:content&#34; Tag zu setzen."
    147147
    148 #: class-lib/RIF_AdminClass.php:208
     148#: class-lib/RIF_AdminClass.php:214
    149149msgid "Click, to include the &#34;enclosure&#34; tag in the feed."
    150150msgstr "Anklicken, um das &#34;enclosure&#34; Tag zu setzen."
    151151
    152 #: class-lib/RIF_AdminClass.php:214
     152#: class-lib/RIF_AdminClass.php:220
    153153#, php-format
    154154msgid ""
     
    159159"des Bildes an. Das Wort %s wird das letzte Bild des Artikels anzeigen."
    160160
    161 #: class-lib/RIF_AdminClass.php:220
     161#: class-lib/RIF_AdminClass.php:226
    162162msgid "Click, to not show post content."
    163163msgstr "Anklicken, um keinen Text anzuzeigen."
    164164
    165 #: class-lib/RIF_AdminClass.php:226
     165#: class-lib/RIF_AdminClass.php:232
    166166msgid ""
    167167"Click, to limit the post content to a summary if the post doesn&#39;t have "
     
    171171"Auszug hat."
    172172
    173 #: class-lib/RIF_AdminClass.php:232
     173#: class-lib/RIF_AdminClass.php:238
    174174msgid ""
    175175"How long should the summary of the article be? Enter the number of sentences "
     
    179179"ein."
    180180
    181 #: class-lib/RIF_AdminClass.php:261
     181#: class-lib/RIF_AdminClass.php:250
     182msgid "Empty the debug log."
     183msgstr "Debug Log leeren."
     184
     185#: class-lib/RIF_AdminClass.php:256
     186msgid "OK"
     187msgstr "OK"
     188
     189#: class-lib/RIF_AdminClass.php:273
    182190msgid "Please enter a numeric value for the image size."
    183191msgstr "Bitte einen numerischen Wert für die Bildgröße eingeben."
    184192
    185 #: class-lib/RIF_AdminClass.php:269
     193#: class-lib/RIF_AdminClass.php:281
    186194msgid "Please enter a numeric value for the excerpt length."
    187195msgstr "Bitte einen numerischen Wert für die Länge des Auszugs eingeben."
    188196
    189 #: class-lib/RIF_AdminClass.php:279
     197#: class-lib/RIF_AdminClass.php:291
    190198msgid "Imagesize too large. Please choose a value smaller than 10000."
    191199msgstr "Bildgröße zu groß. Bitte wähle einen Wert kleiner als 10.000."
    192200
    193 #: class-lib/RIF_AdminClass.php:304
     201#: class-lib/RIF_AdminClass.php:316
    194202msgid "Cache emptied."
    195203msgstr "Cache geleert."
    196204
    197 #: class-lib/RIF_AdminClass.php:314
     205#: class-lib/RIF_AdminClass.php:326
    198206msgid "Debug Log emptied."
    199207msgstr "Debug Log geleert."
  • rss-image-feed/tags/4.2.5/languages/rss-image-feed.pot

    r1375602 r1391526  
    33msgstr ""
    44"Project-Id-Version: RSS Image Feed\n"
    5 "POT-Creation-Date: 2016-03-21 13:59+0200\n"
     5"POT-Creation-Date: 2016-04-10 20:41+0200\n"
    66"PO-Revision-Date: 2016-02-22 21:44+0200\n"
    77"Last-Translator: Stefan Crämer <translate@atelier-fuenf.de>\n"
     
    114114msgstr ""
    115115
    116 #: class-lib/RIF_AdminClass.php:176
     116#: class-lib/RIF_AdminClass.php:178
    117117#, php-format
    118118msgid "Empty debug log (%d %s):"
    119119msgstr ""
    120120
    121 #: class-lib/RIF_AdminClass.php:176
     121#: class-lib/RIF_AdminClass.php:180
    122122msgid "You can empty the debug log here, if necessary."
    123123msgstr ""
    124124
    125 #: class-lib/RIF_AdminClass.php:184
     125#: class-lib/RIF_AdminClass.php:190
    126126msgid "Change the size of the image and the excerpt here."
    127127msgstr ""
    128128
    129 #: class-lib/RIF_AdminClass.php:190
     129#: class-lib/RIF_AdminClass.php:196
    130130msgid ""
    131131"Give here only the longest side of the image. The smaller side will be "
     
    133133msgstr ""
    134134
    135 #: class-lib/RIF_AdminClass.php:196
     135#: class-lib/RIF_AdminClass.php:202
    136136msgid ""
    137137"Click, to make image size relativ and not static. This might make the feed "
     
    139139msgstr ""
    140140
    141 #: class-lib/RIF_AdminClass.php:202
     141#: class-lib/RIF_AdminClass.php:208
    142142msgid "Click, to include the &#34;media:content&#34; tag in the feed."
    143143msgstr ""
    144144
    145 #: class-lib/RIF_AdminClass.php:208
     145#: class-lib/RIF_AdminClass.php:214
    146146msgid "Click, to include the &#34;enclosure&#34; tag in the feed."
    147147msgstr ""
    148148
    149 #: class-lib/RIF_AdminClass.php:214
     149#: class-lib/RIF_AdminClass.php:220
    150150#, php-format
    151151msgid ""
     
    154154msgstr ""
    155155
    156 #: class-lib/RIF_AdminClass.php:220
     156#: class-lib/RIF_AdminClass.php:226
    157157msgid "Click, to not show post content."
    158158msgstr ""
    159159
    160 #: class-lib/RIF_AdminClass.php:226
     160#: class-lib/RIF_AdminClass.php:232
    161161msgid ""
    162162"Click, to limit the post content to a summary if the post doesn&#39;t have "
     
    164164msgstr ""
    165165
    166 #: class-lib/RIF_AdminClass.php:232
     166#: class-lib/RIF_AdminClass.php:238
    167167msgid ""
    168168"How long should the summary of the article be? Enter the number of sentences "
     
    170170msgstr ""
    171171
    172 #: class-lib/RIF_AdminClass.php:261
     172#: class-lib/RIF_AdminClass.php:250
     173msgid "Empty the debug log."
     174msgstr ""
     175
     176#: class-lib/RIF_AdminClass.php:256
     177msgid "OK"
     178msgstr ""
     179
     180#: class-lib/RIF_AdminClass.php:273
    173181msgid "Please enter a numeric value for the image size."
    174182msgstr ""
    175183
    176 #: class-lib/RIF_AdminClass.php:269
     184#: class-lib/RIF_AdminClass.php:281
    177185msgid "Please enter a numeric value for the excerpt length."
    178186msgstr ""
    179187
    180 #: class-lib/RIF_AdminClass.php:279
     188#: class-lib/RIF_AdminClass.php:291
    181189msgid "Imagesize too large. Please choose a value smaller than 10000."
    182190msgstr ""
    183191
    184 #: class-lib/RIF_AdminClass.php:304
     192#: class-lib/RIF_AdminClass.php:316
    185193msgid "Cache emptied."
    186194msgstr ""
    187195
    188 #: class-lib/RIF_AdminClass.php:314
     196#: class-lib/RIF_AdminClass.php:326
    189197msgid "Debug Log emptied."
    190198msgstr ""
  • rss-image-feed/tags/4.2.5/readme.txt

    r1375602 r1391526  
    55Requires at least: 2.7
    66Tested up to: 4.5
    7 Stable tag: 4.2.4
     7Stable tag: 4.2.5
    88
    99The RSS Image Feed adds the first image of a post to your feeds, even in firefox and even if you only display the excerpt.
     
    3232
    3333== Changelog ==
     34
     35= 4.2.5 =
     36
     37* added some debug options to the frame work
     38* some minor bugfixes
    3439
    3540= 4.2.4 =
     
    220225
    221226Made downwards compatible with versions prior to WP 4.4 again; some minor bugfixes
     227
     228= 4.2.5 =
     229
     230some minor bugfixes; debug options added to framework
  • rss-image-feed/trunk/class-lib/A5_ExcerptClass.php

    r1375602 r1391526  
    66 *
    77 * @ A5 Plugin Framework
    8  * Version: 1.0 beta 20160321
     8 * Version: 1.0 beta 20160408
    99 *
    1010 * Gets the excerpt of a post according to some parameters
  • rss-image-feed/trunk/class-lib/A5_FormFieldClass.php

    r1375602 r1391526  
    66 *
    77 * @ A5 Plugin Framework
    8  * Version: 1.0 beta 20160321
     8 * Version: 1.0 beta 20160408
    99 *
    1010 * Gets all sort of input fields for plugins by Atelier 5
     
    1616class A5_FormField {
    1717   
    18     const version = '1.0 beta 20160321 RIF';
     18    const version = '1.0 beta 20160408 RIF';
    1919   
    2020    public $formfield;
  • rss-image-feed/trunk/class-lib/A5_ImageClass.php

    r1375602 r1391526  
    66 *
    77 * @ A5 Plugin Framework
    8  * Version: 1.0 beta 20160321
     8 * Version: 1.0 beta 20160408
    99 *
    1010 * Gets the alt and title tag for attachments
  • rss-image-feed/trunk/class-lib/A5_OptionPageClass.php

    r1375602 r1391526  
    66 *
    77 * @ A5 Plugin Framework
    8  * Version: 1.0 beta 20160321
     8 * Version: 1.0 beta 20160408
    99 *
    1010 * Gets all sort of containers for the flexible A5 settings pages
     
    420420        foreach ($cache as $key => $value) :
    421421       
    422             $key = 'Post-ID: '.$key;
    423            
     422            $td = '';
     423           
     424            $count = 0;
     425           
     426            foreach ($value as $item => $content) :
     427           
     428                $count++;
     429           
     430                if (is_array($content)) :
     431                   
     432                    $td .= '<span style="text-decoration: underline">Post-ID: '.$item.'</span><br><br>';
     433                   
     434                    foreach ($content as $id => $entry) :
     435                       
     436                        if (is_array($entry)) :
     437                       
     438                            foreach ($entry as $a => $b) :
     439                           
     440                                $a = str_replace('_', ' ',$a);
     441                           
     442                                $td .= ucwords($a).': '.$b.'<br>';
     443                               
     444                            endforeach;
     445                       
     446                        else :
     447                       
     448                            $td .= self::tag_it($entry, 'p', 3);
     449                           
     450                        endif;
     451                       
     452                    endforeach;
     453                   
     454                    $td .= ($count < count($value)) ? '<hr style="border:solid #cccccc 1px;height:1px;">' : '';
     455                   
     456                else :
     457               
     458                    if ('enclosure' == $item || 'media_content' == $item) :
     459                   
     460                        $td .= self::tag_it(htmlentities($content), 'p', 3);
     461                       
     462                    else :
     463                   
     464                        $td .= $content;
     465                       
     466                    endif;
     467                   
     468                endif;
     469           
     470            endforeach;
     471           
     472            $key = (0 != $count) ? 'Widget-ID: '.$key : 'Post-ID: '.$key;
     473       
     474            $key = self::tag_it($key, 'td', 2, array('style' => 'width: 25%; border: solid 1px'));
     475           
     476            $value = self::tag_it($td, 'td', 2, array('style' => 'border: solid 1px; word-wrap: break-word'));
     477           
     478            $opt_str .= self::tag_it($key.$value, 'tr', 1);
     479       
     480        endforeach;
     481       
     482        $postbox .= self::tag_it($opt_str, 'table', 0, array('style' => 'border-collapse: collapse'));
     483       
     484        $postbox .= self::close_postbox();
     485       
     486        return $postbox;
     487       
     488    }
     489   
     490    /**
     491     *
     492     * Output contents of the debug.log file
     493     *
     494     */
     495    static function debug_log_info($label, $section_id) {
     496   
     497        $postbox = self::open_postbox($label, 'error-log-info', true);
     498       
     499        $filename = WP_CONTENT_DIR.'/debug.log';
     500       
     501        $errorlog = file_get_contents($filename);
     502       
     503        if ($errorlog):
     504       
    424505            ob_start();
    425    
    426             var_dump($value);
    427            
    428             $value = ob_get_contents();
    429            
    430             $value = self::tag_it($value, 'pre', 3);
     506       
     507            do_settings_sections($section_id);
     508           
     509            $section = ob_get_contents();
    431510           
    432511            ob_end_clean();
    433        
    434             $value = str_replace(array("\r\n", "\n", "\r"), '<br />', $value);
    435            
    436             $key = self::tag_it($key, 'td', 2, array('style' => 'width: 25%; border: solid 1px'));
    437            
    438             $value = self::tag_it($value, 'td', 2, array('style' => 'border: solid 1px'));
    439            
    440             $opt_str .= self::tag_it($key.$value, 'tr', 1);
    441        
    442         endforeach;
    443        
    444         $postbox .= self::tag_it($opt_str, 'table', 0, array('style' => 'border-collapse: collapse'));
    445        
    446         $postbox .= self::close_postbox();
    447        
    448         return $postbox;
    449        
    450     }
    451    
    452     /**
    453      *
    454      * Output contents of the debug.log file
    455      *
    456      */
    457     static function debug_log_info($label) {
    458    
    459         $postbox = self::open_postbox($label, 'error-log-info', true);
    460        
    461         $filename = WP_CONTENT_DIR.'/debug.log';
    462        
    463         $errorlog = file_get_contents($filename);
    464        
    465         if ($errorlog):
     512           
     513            $postbox .= self::tag_it($section, 'div');
    466514           
    467515            $postbox .= self::tag_it(nl2br($errorlog), 'div', 0, array('style' => 'border: 2px solid #cc0000; padding: 0.5em'));
  • rss-image-feed/trunk/class-lib/RIF_AdminClass.php

    r1375602 r1391526  
    121121            if (count(self::$options['cache']) > 0) self::sortable('cache-info', self::cache_info(self::$options['cache'], __('Cache', 'rss-image-feed')));
    122122           
    123             if (true == WP_DEBUG_DISPLAY) self::sortable('errorlog-info', self::debug_log_info(__('Error Log', 'rss-image-feed')));
     123            if (true == WP_DEBUG_LOG) self::sortable('errorlog-info', self::debug_log_info(__('Error Log', 'rss-image-feed'), 'rss_debug_settings'));
    124124       
    125125            self::close_tab();
     
    164164        if ($cachesize > 0) add_settings_field('reset_cache', sprintf(__('Empty cache (%d %s):', 'rss-image-feed'), count(self::$options['cache']), $entry), array($this, 'reset_field'), 'new_image_settings', 'image_rss_settings', array(__('You can empty the plugin&#39;s cache here, if necessary.', 'rss-image-feed')));
    165165       
    166         if (true == WP_DEBUG && true == WP_DEBUG_DISPLAY) :
     166        if (true == WP_DEBUG && true == WP_DEBUG_LOG) :
    167167       
    168168            $filename = WP_CONTENT_DIR.'/debug.log';
     
    174174            $entry = ($logsize > 1) ? __('entries', 'rss-image-feed') : __('entry', 'rss-image-feed');
    175175           
    176             if ($logsize > 0) add_settings_field('reset_debug_log', sprintf(__('Empty debug log (%d %s):', 'rss-image-feed'), count($errorlog), $entry), array($this, 'reset_debug_field'), 'new_image_settings', 'image_rss_settings', array(__('You can empty the debug log here, if necessary.', 'rss-image-feed')));
     176            if ($logsize > 0) :
     177           
     178                add_settings_section('image_rss_settings', sprintf(__('Empty debug log (%d %s):', 'rss-image-feed'), count($errorlog), $entry), array($this, 'display_reset_section'), 'rss_debug_settings');
     179               
     180                add_settings_field('reset_debug_log', __('You can empty the debug log here, if necessary.', 'rss-image-feed'), array($this, 'reset_debug_field'), 'rss_debug_settings', 'image_rss_settings');
     181               
     182            endif;
    177183           
    178184        endif;
     
    218224    function display_notext() {
    219225       
    220         a5_checkbox('notext', 'rss_options[notext]', self::$options['notext'], __('Click, to not show post content.', 'rss-image-feed'));
     226        a5_checkbox('notext', 'rss_options[notext]', @self::$options['notext'], __('Click, to not show post content.', 'rss-image-feed'));
    221227       
    222228    }
     
    240246    }
    241247   
    242     function reset_debug_field($labels) {
    243        
    244         a5_checkbox('reset_debug_log', 'rss_options[reset_debug_log]', @self::$options['reset_debug_log'], $labels[0]);
     248    function display_reset_section() {
     249       
     250        self::tag_it(__('Empty the debug log.', 'rss-image-feed'), 'p');
     251   
     252    }
     253   
     254    function reset_debug_field() {
     255       
     256        submit_button(__('OK', 'rss-image-feed'), 'secondary', 'rss_options[reset_debug_log]', true, array('id' => 'reset_debug_log'));
    245257       
    246258    }
  • rss-image-feed/trunk/image-rss.php

    r1375602 r1391526  
    44Plugin URI: http://wasistlos.waldemarstoffel.com/plugins-fur-wordpress/image-feed
    55Description: RSS Image Feed is not literally producing a feed of images but it adds the first image of the post to the normal feeds of your blog. Those images display even if you have the summary in the feed and not the content.
    6 Version: 4.2.4
     6Version: 4.2.5
    77Author: Stefan Crämer
    88Author URI: http://www.stefan-craemer.com
     
    139139        endif;
    140140       
    141         if (self::$options['media_content'] || self::$options['enclosure']) :
     141        if (@self::$options['media_content'] || @self::$options['enclosure']) :
    142142       
    143143            add_action( "rss2_ns", array( $this, 'set_feed_NameSpace') );
     
    196196            'enclosure' => false,
    197197            'media_content' => false,
    198             'cache' => array(),
     198            'notext' => false,
     199            'cache' => array(),
     200            'css' => false,
    199201            'image_number' => false
    200202        );
     
    314316                $rif_height = ($rif_image_info[2]) ? ' height="'.$rif_image_info[2].'"' :'';
    315317               
    316                 $rif_image_size = '" width="'.$rif_width.'" '.$rif_height;
    317                
    318                 if (!isset(self::$options['responsive']) || !self::$options['responsive']) $rif_image_size .= '" style="max-width: 100%; height: auto;"';
     318                $rif_image_size = '" width="'.$rif_width.'"'.$rif_height;
     319               
     320                if (isset(self::$options['responsive']) && self::$options['responsive']) $rif_image_size .= ' style="max-width: 100%; height: auto;"';
    319321           
    320322                $eol = "\n";
  • rss-image-feed/trunk/languages/rss-image-feed-de_DE.po

    r1375602 r1391526  
    22msgstr ""
    33"Project-Id-Version: RSS Image Feed\n"
    4 "POT-Creation-Date: 2016-03-21 13:59+0200\n"
    5 "PO-Revision-Date: 2016-03-21 14:00+0200\n"
     4"POT-Creation-Date: 2016-04-10 20:42+0200\n"
     5"PO-Revision-Date: 2016-04-10 20:42+0200\n"
    66"Last-Translator: Stefan Crämer <translate@atelier-fuenf.de>\n"
    77"Language-Team: Waldemar Stoffel <stoffel@atelier-fuenf.de>\n"
     
    113113msgstr "Falls nötig, kannst du hier den Cache des Plugins leeren."
    114114
    115 #: class-lib/RIF_AdminClass.php:176
     115#: class-lib/RIF_AdminClass.php:178
    116116#, php-format
    117117msgid "Empty debug log (%d %s):"
    118118msgstr "Debug Log leeren (%d %s):"
    119119
    120 #: class-lib/RIF_AdminClass.php:176
     120#: class-lib/RIF_AdminClass.php:180
    121121msgid "You can empty the debug log here, if necessary."
    122122msgstr "Falls nötig, kannst du hier das Debug Log leeren."
    123123
    124 #: class-lib/RIF_AdminClass.php:184
     124#: class-lib/RIF_AdminClass.php:190
    125125msgid "Change the size of the image and the excerpt here."
    126126msgstr "Ändere die Größe des Bildes und des Auszuges hier."
    127127
    128 #: class-lib/RIF_AdminClass.php:190
     128#: class-lib/RIF_AdminClass.php:196
    129129msgid ""
    130130"Give here only the longest side of the image. The smaller side will be "
     
    134134"erstellen des Feed berechnet. Die Bilder werden nicht beschnitten."
    135135
    136 #: class-lib/RIF_AdminClass.php:196
     136#: class-lib/RIF_AdminClass.php:202
    137137msgid ""
    138138"Click, to make image size relativ and not static. This might make the feed "
     
    142142"deinen Feed mehr responsive machen."
    143143
    144 #: class-lib/RIF_AdminClass.php:202
     144#: class-lib/RIF_AdminClass.php:208
    145145msgid "Click, to include the &#34;media:content&#34; tag in the feed."
    146146msgstr "Anklicken, um das &#34;media:content&#34; Tag zu setzen."
    147147
    148 #: class-lib/RIF_AdminClass.php:208
     148#: class-lib/RIF_AdminClass.php:214
    149149msgid "Click, to include the &#34;enclosure&#34; tag in the feed."
    150150msgstr "Anklicken, um das &#34;enclosure&#34; Tag zu setzen."
    151151
    152 #: class-lib/RIF_AdminClass.php:214
     152#: class-lib/RIF_AdminClass.php:220
    153153#, php-format
    154154msgid ""
     
    159159"des Bildes an. Das Wort %s wird das letzte Bild des Artikels anzeigen."
    160160
    161 #: class-lib/RIF_AdminClass.php:220
     161#: class-lib/RIF_AdminClass.php:226
    162162msgid "Click, to not show post content."
    163163msgstr "Anklicken, um keinen Text anzuzeigen."
    164164
    165 #: class-lib/RIF_AdminClass.php:226
     165#: class-lib/RIF_AdminClass.php:232
    166166msgid ""
    167167"Click, to limit the post content to a summary if the post doesn&#39;t have "
     
    171171"Auszug hat."
    172172
    173 #: class-lib/RIF_AdminClass.php:232
     173#: class-lib/RIF_AdminClass.php:238
    174174msgid ""
    175175"How long should the summary of the article be? Enter the number of sentences "
     
    179179"ein."
    180180
    181 #: class-lib/RIF_AdminClass.php:261
     181#: class-lib/RIF_AdminClass.php:250
     182msgid "Empty the debug log."
     183msgstr "Debug Log leeren."
     184
     185#: class-lib/RIF_AdminClass.php:256
     186msgid "OK"
     187msgstr "OK"
     188
     189#: class-lib/RIF_AdminClass.php:273
    182190msgid "Please enter a numeric value for the image size."
    183191msgstr "Bitte einen numerischen Wert für die Bildgröße eingeben."
    184192
    185 #: class-lib/RIF_AdminClass.php:269
     193#: class-lib/RIF_AdminClass.php:281
    186194msgid "Please enter a numeric value for the excerpt length."
    187195msgstr "Bitte einen numerischen Wert für die Länge des Auszugs eingeben."
    188196
    189 #: class-lib/RIF_AdminClass.php:279
     197#: class-lib/RIF_AdminClass.php:291
    190198msgid "Imagesize too large. Please choose a value smaller than 10000."
    191199msgstr "Bildgröße zu groß. Bitte wähle einen Wert kleiner als 10.000."
    192200
    193 #: class-lib/RIF_AdminClass.php:304
     201#: class-lib/RIF_AdminClass.php:316
    194202msgid "Cache emptied."
    195203msgstr "Cache geleert."
    196204
    197 #: class-lib/RIF_AdminClass.php:314
     205#: class-lib/RIF_AdminClass.php:326
    198206msgid "Debug Log emptied."
    199207msgstr "Debug Log geleert."
  • rss-image-feed/trunk/languages/rss-image-feed.pot

    r1375602 r1391526  
    33msgstr ""
    44"Project-Id-Version: RSS Image Feed\n"
    5 "POT-Creation-Date: 2016-03-21 13:59+0200\n"
     5"POT-Creation-Date: 2016-04-10 20:41+0200\n"
    66"PO-Revision-Date: 2016-02-22 21:44+0200\n"
    77"Last-Translator: Stefan Crämer <translate@atelier-fuenf.de>\n"
     
    114114msgstr ""
    115115
    116 #: class-lib/RIF_AdminClass.php:176
     116#: class-lib/RIF_AdminClass.php:178
    117117#, php-format
    118118msgid "Empty debug log (%d %s):"
    119119msgstr ""
    120120
    121 #: class-lib/RIF_AdminClass.php:176
     121#: class-lib/RIF_AdminClass.php:180
    122122msgid "You can empty the debug log here, if necessary."
    123123msgstr ""
    124124
    125 #: class-lib/RIF_AdminClass.php:184
     125#: class-lib/RIF_AdminClass.php:190
    126126msgid "Change the size of the image and the excerpt here."
    127127msgstr ""
    128128
    129 #: class-lib/RIF_AdminClass.php:190
     129#: class-lib/RIF_AdminClass.php:196
    130130msgid ""
    131131"Give here only the longest side of the image. The smaller side will be "
     
    133133msgstr ""
    134134
    135 #: class-lib/RIF_AdminClass.php:196
     135#: class-lib/RIF_AdminClass.php:202
    136136msgid ""
    137137"Click, to make image size relativ and not static. This might make the feed "
     
    139139msgstr ""
    140140
    141 #: class-lib/RIF_AdminClass.php:202
     141#: class-lib/RIF_AdminClass.php:208
    142142msgid "Click, to include the &#34;media:content&#34; tag in the feed."
    143143msgstr ""
    144144
    145 #: class-lib/RIF_AdminClass.php:208
     145#: class-lib/RIF_AdminClass.php:214
    146146msgid "Click, to include the &#34;enclosure&#34; tag in the feed."
    147147msgstr ""
    148148
    149 #: class-lib/RIF_AdminClass.php:214
     149#: class-lib/RIF_AdminClass.php:220
    150150#, php-format
    151151msgid ""
     
    154154msgstr ""
    155155
    156 #: class-lib/RIF_AdminClass.php:220
     156#: class-lib/RIF_AdminClass.php:226
    157157msgid "Click, to not show post content."
    158158msgstr ""
    159159
    160 #: class-lib/RIF_AdminClass.php:226
     160#: class-lib/RIF_AdminClass.php:232
    161161msgid ""
    162162"Click, to limit the post content to a summary if the post doesn&#39;t have "
     
    164164msgstr ""
    165165
    166 #: class-lib/RIF_AdminClass.php:232
     166#: class-lib/RIF_AdminClass.php:238
    167167msgid ""
    168168"How long should the summary of the article be? Enter the number of sentences "
     
    170170msgstr ""
    171171
    172 #: class-lib/RIF_AdminClass.php:261
     172#: class-lib/RIF_AdminClass.php:250
     173msgid "Empty the debug log."
     174msgstr ""
     175
     176#: class-lib/RIF_AdminClass.php:256
     177msgid "OK"
     178msgstr ""
     179
     180#: class-lib/RIF_AdminClass.php:273
    173181msgid "Please enter a numeric value for the image size."
    174182msgstr ""
    175183
    176 #: class-lib/RIF_AdminClass.php:269
     184#: class-lib/RIF_AdminClass.php:281
    177185msgid "Please enter a numeric value for the excerpt length."
    178186msgstr ""
    179187
    180 #: class-lib/RIF_AdminClass.php:279
     188#: class-lib/RIF_AdminClass.php:291
    181189msgid "Imagesize too large. Please choose a value smaller than 10000."
    182190msgstr ""
    183191
    184 #: class-lib/RIF_AdminClass.php:304
     192#: class-lib/RIF_AdminClass.php:316
    185193msgid "Cache emptied."
    186194msgstr ""
    187195
    188 #: class-lib/RIF_AdminClass.php:314
     196#: class-lib/RIF_AdminClass.php:326
    189197msgid "Debug Log emptied."
    190198msgstr ""
  • rss-image-feed/trunk/readme.txt

    r1375602 r1391526  
    55Requires at least: 2.7
    66Tested up to: 4.5
    7 Stable tag: 4.2.4
     7Stable tag: 4.2.5
    88
    99The RSS Image Feed adds the first image of a post to your feeds, even in firefox and even if you only display the excerpt.
     
    3232
    3333== Changelog ==
     34
     35= 4.2.5 =
     36
     37* added some debug options to the frame work
     38* some minor bugfixes
    3439
    3540= 4.2.4 =
     
    220225
    221226Made downwards compatible with versions prior to WP 4.4 again; some minor bugfixes
     227
     228= 4.2.5 =
     229
     230some minor bugfixes; debug options added to framework
Note: See TracChangeset for help on using the changeset viewer.