Note that there are some explanatory texts on larger screens.

plurals
  1. POStrict Standards: Only variables should be passed by reference in wordpress/wp-includes/class-oembed.php on line 116
    primarykey
    data
    text
    <p>I've had a look at a lot of the similar questions and I'm not getting it, with regards to my code.</p> <p>The Error : <code> Strict Standards: Only variables should be passed by reference in wordpress/wp-includes/class-oembed.php on line 116 </code></p> <p>and here is my code....</p> <pre><code>// Get Ready Display the Audio $embedCheck = array("&lt;embed", "&lt;ifram");// only checking against the first 6 $mykey_values = get_post_custom_values('_format_audio_embed'); $content_oembed = ''; // check if the audio metabox is used if ( isset($mykey_values) &amp;&amp; !empty($mykey_values) ) { // iterate over values passed foreach ( $mykey_values as $key =&gt; $value ) { $url = $value; $wtf = wp_oembed_get($url); if ( !empty($url) ) { $firstCar = substr($url, 0, 6); // get the first 6 char. // if its a http(s). if ( strpos($firstCar, "http:/" ) !== false || strpos($firstCar, "https:" ) !== false ) { // send it to wp_oembed to see if the link is oembed enabled. $content_oembed = ($wtf !==false) ? ('"&lt;div class="audio" style="width:100%; overflow:hidden;"&gt;' .$wtf.'&lt;/div&gt;') : ('&lt;audio src="'.$url.'" preload="none" type="audio/mpeg"&gt;&lt;/audio&gt;'); } // if its the embed code that matches our array defined above. else if ( audio_strpos_arr($firstCar, $embedCheck ) !== false ) { $content_oembed = '&lt;div class="video" style="width:100%; overflow:hidden;"&gt;' .$url. '&lt;/div&gt;'; } } }; // end foreach } // end conditional </code></pre> <p>If I remove the section in the conditional below the comment "send it to wp_oembed to see if the link is oembed enabled.", but stranger still if I pass it a soundcloud link - no error, but if its a locally hosted file it goes tits up.</p> <p>Any Help would be greatly appreciated.</p> <p>after a bit of fidling - seems the problem is related to this function <a href="http://codex.wordpress.org/Function_Reference/wp_oembed_get" rel="nofollow">http://codex.wordpress.org/Function_Reference/wp_oembed_get</a></p> <p>and what thats referencing in the incldued class-oembed.php says the following on line 116</p> <pre><code>112 function discover( $url ) { 113 $providers = array(); 114 115 // Fetch URL content 116 if ( $html = wp_remote_retrieve_body( wp_safe_remote_get( $url ) ) ) { </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload