<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic PHP &amp;amp; Media Queries in Archive</title>
    <link>https://business.forums.bt.com/t5/Archive/PHP-amp-Media-Queries/m-p/55834#M15052</link>
    <description>&lt;P&gt;I have this piece of code that imports a font for my navigation and overrides my original default font, I want this font style to stop and revert back to the original default font when the screen goes down to 768px wide.&lt;BR /&gt;&lt;BR /&gt;Every time I try to control this it just defaults to my changes from the off, the control needs to be in this file because of the way this site is set up.&lt;BR /&gt;&lt;BR /&gt;The code of the page is below. No doubt you will need some more information, just let me know what you need and I'll try to supply it.&lt;/P&gt;&lt;PRE&gt;&amp;lt;?php

function fu_output_css() {

echo '&amp;lt;style type="text/css" media="screen"&amp;gt;';
if (get_option('fu_header_font') != 'Choose a font' &amp;amp;&amp;amp; get_option('fu_header_font') != null)
{ echo '
@font-face {
font-family: "header-font";
src: url("'; echo fu_get_font_url( get_option('fu_header_font') ); echo '");
}';
}
if (get_option('fu_body_font') != 'Choose a font' &amp;amp;&amp;amp; get_option('fu_body_font') != null)
{ echo '
@font-face {
font-family: "body-font";
src: url("'; echo fu_get_font_url( get_option('fu_body_font') ); echo '");
}';
}
if (get_option('fu_lists_font') != 'Choose a font' &amp;amp;&amp;amp; get_option('fu_lists_font') != null)
{ echo '
@font-face {
font-family: "lists-font";
src: url("'; echo fu_get_font_url( get_option('fu_lists_font') ); echo '");
}';
}
if (get_option('fu_custom_one_font') != 'Choose a font' &amp;amp;&amp;amp; get_option('fu_custom_one') != null)
{ echo '
@font-face {
font-family: "custom-one";
src: url("'; echo fu_get_font_url( get_option('fu_custom_one_font') ); echo '");
}';
}
if (get_option('fu_custom_two_font') != 'Choose a font' &amp;amp;&amp;amp; get_option('fu_custom_two') != null)
{ echo '
@font-face {
font-family: "custom-two";
src: url("'; echo fu_get_font_url( get_option('fu_custom_two_font') ); echo '");
}';
}
if (get_option('fu_custom_three_font') != 'Choose a font' &amp;amp;&amp;amp; get_option('fu_custom_three') != null)
{ echo '
@font-face {
font-family: "custom-three";
src: url("'; echo fu_get_font_url( get_option('fu_custom_three_font') ); echo '");
}';
}
if (get_option('fu_custom_four_font') != 'Choose a font' &amp;amp;&amp;amp; get_option('fu_custom_four') != null)
{ echo '
@font-face {
font-family: "custom-four";
src: url("'; echo fu_get_font_url( get_option('fu_custom_four_font') ); echo '");
}';
}
if (get_option('fu_custom_five_font') != 'Choose a font' &amp;amp;&amp;amp; get_option('fu_custom_five') != null)
{ echo '
@font-face {
font-family: "custom-five";
src: url("'; echo fu_get_font_url( get_option('fu_custom_five_font') ); echo '");
}';
}
if (get_option('fu_header_font') != 'Choose a font' &amp;amp;&amp;amp; get_option('fu_header_font') != null)
{
echo 'h1, h2, h3, h4, h5, h6, h7 {
font-family: "header-font"!important;
}';
}
if (get_option('fu_body_font') != 'Choose a font' &amp;amp;&amp;amp; get_option('fu_body_font') != null)
{
echo 'p, em, div {
font-family: "body-font"!important;
}';
}
if (get_option('fu_lists_font') != 'Choose a font' &amp;amp;&amp;amp; get_option('fu_lists_font') != null)
{
echo '
li {
font-family: "lists-font"!important;
}';
}

if (get_option('fu_custom_one_font') != 'Choose a font' &amp;amp;&amp;amp; get_option('fu_custom_one') != null)
{
echo get_option('fu_custom_one'); echo ' {
font-family: "custom-one"!important;
}';
}
if (get_option('fu_custom_two_font') != 'Choose a font' &amp;amp;&amp;amp; get_option('fu_custom_two') != null)
{
echo get_option('fu_custom_two'); echo ' {
font-family: "custom-two"!important;
}';
}
if (get_option('fu_custom_three_font') != 'Choose a font' &amp;amp;&amp;amp; get_option('fu_custom_three') != null)
{
echo get_option('fu_custom_three'); echo ' {
font-family: "custom-three"!important;
}';
}
if (get_option('fu_custom_four_font') != 'Choose a font' &amp;amp;&amp;amp; get_option('fu_custom_four') != null)
{
echo get_option('fu_custom_four'); echo ' {
font-family: "custom-four"!important;
}';
}
if (get_option('fu_custom_five_font') != 'Choose a font' &amp;amp;&amp;amp; get_option('fu_custom_five') != null)
{
echo get_option('fu_custom_five'); echo ' {
font-family: "custom-five"!important;
}';
}
echo '

&amp;lt;/style&amp;gt;';

}
add_action('wp_head','fu_output_css');&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Thnaks&lt;IMG border="0" src="http://imagicon.info/cat/12-1/text-smiley.png" /&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 01 Jun 2013 19:25:07 GMT</pubDate>
    <dc:creator>orthohin</dc:creator>
    <dc:date>2013-06-01T19:25:07Z</dc:date>
    <item>
      <title>PHP &amp; Media Queries</title>
      <link>https://business.forums.bt.com/t5/Archive/PHP-amp-Media-Queries/m-p/55834#M15052</link>
      <description>&lt;P&gt;I have this piece of code that imports a font for my navigation and overrides my original default font, I want this font style to stop and revert back to the original default font when the screen goes down to 768px wide.&lt;BR /&gt;&lt;BR /&gt;Every time I try to control this it just defaults to my changes from the off, the control needs to be in this file because of the way this site is set up.&lt;BR /&gt;&lt;BR /&gt;The code of the page is below. No doubt you will need some more information, just let me know what you need and I'll try to supply it.&lt;/P&gt;&lt;PRE&gt;&amp;lt;?php

function fu_output_css() {

echo '&amp;lt;style type="text/css" media="screen"&amp;gt;';
if (get_option('fu_header_font') != 'Choose a font' &amp;amp;&amp;amp; get_option('fu_header_font') != null)
{ echo '
@font-face {
font-family: "header-font";
src: url("'; echo fu_get_font_url( get_option('fu_header_font') ); echo '");
}';
}
if (get_option('fu_body_font') != 'Choose a font' &amp;amp;&amp;amp; get_option('fu_body_font') != null)
{ echo '
@font-face {
font-family: "body-font";
src: url("'; echo fu_get_font_url( get_option('fu_body_font') ); echo '");
}';
}
if (get_option('fu_lists_font') != 'Choose a font' &amp;amp;&amp;amp; get_option('fu_lists_font') != null)
{ echo '
@font-face {
font-family: "lists-font";
src: url("'; echo fu_get_font_url( get_option('fu_lists_font') ); echo '");
}';
}
if (get_option('fu_custom_one_font') != 'Choose a font' &amp;amp;&amp;amp; get_option('fu_custom_one') != null)
{ echo '
@font-face {
font-family: "custom-one";
src: url("'; echo fu_get_font_url( get_option('fu_custom_one_font') ); echo '");
}';
}
if (get_option('fu_custom_two_font') != 'Choose a font' &amp;amp;&amp;amp; get_option('fu_custom_two') != null)
{ echo '
@font-face {
font-family: "custom-two";
src: url("'; echo fu_get_font_url( get_option('fu_custom_two_font') ); echo '");
}';
}
if (get_option('fu_custom_three_font') != 'Choose a font' &amp;amp;&amp;amp; get_option('fu_custom_three') != null)
{ echo '
@font-face {
font-family: "custom-three";
src: url("'; echo fu_get_font_url( get_option('fu_custom_three_font') ); echo '");
}';
}
if (get_option('fu_custom_four_font') != 'Choose a font' &amp;amp;&amp;amp; get_option('fu_custom_four') != null)
{ echo '
@font-face {
font-family: "custom-four";
src: url("'; echo fu_get_font_url( get_option('fu_custom_four_font') ); echo '");
}';
}
if (get_option('fu_custom_five_font') != 'Choose a font' &amp;amp;&amp;amp; get_option('fu_custom_five') != null)
{ echo '
@font-face {
font-family: "custom-five";
src: url("'; echo fu_get_font_url( get_option('fu_custom_five_font') ); echo '");
}';
}
if (get_option('fu_header_font') != 'Choose a font' &amp;amp;&amp;amp; get_option('fu_header_font') != null)
{
echo 'h1, h2, h3, h4, h5, h6, h7 {
font-family: "header-font"!important;
}';
}
if (get_option('fu_body_font') != 'Choose a font' &amp;amp;&amp;amp; get_option('fu_body_font') != null)
{
echo 'p, em, div {
font-family: "body-font"!important;
}';
}
if (get_option('fu_lists_font') != 'Choose a font' &amp;amp;&amp;amp; get_option('fu_lists_font') != null)
{
echo '
li {
font-family: "lists-font"!important;
}';
}

if (get_option('fu_custom_one_font') != 'Choose a font' &amp;amp;&amp;amp; get_option('fu_custom_one') != null)
{
echo get_option('fu_custom_one'); echo ' {
font-family: "custom-one"!important;
}';
}
if (get_option('fu_custom_two_font') != 'Choose a font' &amp;amp;&amp;amp; get_option('fu_custom_two') != null)
{
echo get_option('fu_custom_two'); echo ' {
font-family: "custom-two"!important;
}';
}
if (get_option('fu_custom_three_font') != 'Choose a font' &amp;amp;&amp;amp; get_option('fu_custom_three') != null)
{
echo get_option('fu_custom_three'); echo ' {
font-family: "custom-three"!important;
}';
}
if (get_option('fu_custom_four_font') != 'Choose a font' &amp;amp;&amp;amp; get_option('fu_custom_four') != null)
{
echo get_option('fu_custom_four'); echo ' {
font-family: "custom-four"!important;
}';
}
if (get_option('fu_custom_five_font') != 'Choose a font' &amp;amp;&amp;amp; get_option('fu_custom_five') != null)
{
echo get_option('fu_custom_five'); echo ' {
font-family: "custom-five"!important;
}';
}
echo '

&amp;lt;/style&amp;gt;';

}
add_action('wp_head','fu_output_css');&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Thnaks&lt;IMG border="0" src="http://imagicon.info/cat/12-1/text-smiley.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 01 Jun 2013 19:25:07 GMT</pubDate>
      <guid>https://business.forums.bt.com/t5/Archive/PHP-amp-Media-Queries/m-p/55834#M15052</guid>
      <dc:creator>orthohin</dc:creator>
      <dc:date>2013-06-01T19:25:07Z</dc:date>
    </item>
  </channel>
</rss>

