Plugin Directory

Changeset 1823214


Ignore:
Timestamp:
02/16/2018 06:40:27 AM (8 years ago)
Author:
newsplugin.com
Message:

... this would be better way to do it.

Location:
newsplugin
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • newsplugin/tags/1.0.16/news-plugin-widget.php

    r1778364 r1823214  
    446446                $style = '';
    447447                if(isset($style_news['article_headline'])) {
    448                     $style = ' style="font-size:'.$style_news['article_headline']['size'].'px;color:#'.$style_news['article_headline']['color'].';font-family:'.$style_news['article_headline']['font_family'].'"';
     448                    $style = ' style="font-size:'.$style_news['article_headline']['size'].'px;color:#'.$style_news['article_headline']['color'].';';
     449                    if($style_news['article_headline']['font_family']) {
     450                        $style = $style . 'font-family:'.$style_news['article_headline']['font_family'].'"';
     451                    }
    449452                }
    450453                echo '<span class="news-plugin-title"' . $style . '>';
     
    456459                    $style = '';
    457460                    if(isset($style_news['article_date'])) {
    458                         $style = ' style="font-size:'.$style_news['article_date']['size'].'px;color:#'.$style_news['article_date']['color'].';font-family:'.$style_news['article_date']['font_family'].'"';
     461                        $style = ' style="font-size:'.$style_news['article_date']['size'].'px;color:#'.$style_news['article_date']['color'].';';
     462                        if($style_news['article_date']['font_family']) {
     463                            $style = $style . 'font-family:'.$style_news['article_date']['font_family'].'"';
     464                        }
    459465                    }
    460466                    echo '<span class="news-plugin-date"' . $style . '>';
     
    471477                        $style = '';
    472478                        if(isset($style_news['article_sources'])) {
    473                             $style = ' style="font-size:'.$style_news['article_sources']['size'].'px;color:#'.$style_news['article_sources']['color'].';font-family:'.$style_news['article_sources']['font_family'].'"';
     479                            $style = ' style="font-size:'.$style_news['article_sources']['size'].'px;color:#'.$style_news['article_sources']['color'].';';
     480                            if($style_news['article_sources']['font_family']) {
     481                                $style = $style . 'font-family:'.$style_news['article_sources']['font_family'].'"';
     482                            }
    474483                        }
    475484                        echo '<span class="news-plugin-source"' . $style . '>';
     
    482491                    $style = '';
    483492                    if(isset($style_news['article_abstract'])) {
    484                         $style = ' style="font-size:'.$style_news['article_abstract']['size'].'px;color:#'.$style_news['article_abstract']['color'].';font-family:'.$style_news['article_abstract']['font_family'].'"';
     493                        $style = ' style="font-size:'.$style_news['article_abstract']['size'].'px;color:#'.$style_news['article_abstract']['color'].';';
     494                        if($style_news['article_abstract']['font_family']) {
     495                            $style = $style . 'font-family:'.$style_news['article_abstract']['font_family'].'"';
     496                        }
    485497                    }
    486498                    echo '<span class="news-plugin-abstract"' . $style . '>';
  • newsplugin/trunk/news-plugin-widget.php

    r1778364 r1823214  
    446446                $style = '';
    447447                if(isset($style_news['article_headline'])) {
    448                     $style = ' style="font-size:'.$style_news['article_headline']['size'].'px;color:#'.$style_news['article_headline']['color'].';font-family:'.$style_news['article_headline']['font_family'].'"';
     448                    $style = ' style="font-size:'.$style_news['article_headline']['size'].'px;color:#'.$style_news['article_headline']['color'].';';
     449                    if($style_news['article_headline']['font_family']) {
     450                        $style = $style . 'font-family:'.$style_news['article_headline']['font_family'].'"';
     451                    }
    449452                }
    450453                echo '<span class="news-plugin-title"' . $style . '>';
     
    456459                    $style = '';
    457460                    if(isset($style_news['article_date'])) {
    458                         $style = ' style="font-size:'.$style_news['article_date']['size'].'px;color:#'.$style_news['article_date']['color'].';font-family:'.$style_news['article_date']['font_family'].'"';
     461                        $style = ' style="font-size:'.$style_news['article_date']['size'].'px;color:#'.$style_news['article_date']['color'].';';
     462                        if($style_news['article_date']['font_family']) {
     463                            $style = $style . 'font-family:'.$style_news['article_date']['font_family'].'"';
     464                        }
    459465                    }
    460466                    echo '<span class="news-plugin-date"' . $style . '>';
     
    471477                        $style = '';
    472478                        if(isset($style_news['article_sources'])) {
    473                             $style = ' style="font-size:'.$style_news['article_sources']['size'].'px;color:#'.$style_news['article_sources']['color'].';font-family:'.$style_news['article_sources']['font_family'].'"';
     479                            $style = ' style="font-size:'.$style_news['article_sources']['size'].'px;color:#'.$style_news['article_sources']['color'].';';
     480                            if($style_news['article_sources']['font_family']) {
     481                                $style = $style . 'font-family:'.$style_news['article_sources']['font_family'].'"';
     482                            }
    474483                        }
    475484                        echo '<span class="news-plugin-source"' . $style . '>';
     
    482491                    $style = '';
    483492                    if(isset($style_news['article_abstract'])) {
    484                         $style = ' style="font-size:'.$style_news['article_abstract']['size'].'px;color:#'.$style_news['article_abstract']['color'].';font-family:'.$style_news['article_abstract']['font_family'].'"';
     493                        $style = ' style="font-size:'.$style_news['article_abstract']['size'].'px;color:#'.$style_news['article_abstract']['color'].';';
     494                        if($style_news['article_abstract']['font_family']) {
     495                            $style = $style . 'font-family:'.$style_news['article_abstract']['font_family'].'"';
     496                        }
    485497                    }
    486498                    echo '<span class="news-plugin-abstract"' . $style . '>';
Note: See TracChangeset for help on using the changeset viewer.