• Resolved pascalwacker

    (@pascalwacker)


    Hi

    If you go on mixcloud.com, hit share on one of the posts and then the WordPress button you get a code like: [mixcloud https://www.mixcloud.com/TechnoLiveSets/dubfire-enter-main-week-2-space-ibiza-10-07-2014/ width=660 height=180 /] unfortunately that code is wrong and the plugin doesn’t work with it (I know it’s an error at mixcloud but still you should adjust the plugin).

    I fixed this issue on my site by adding a few lines to the file /wp-content/plugins/mixcloud-embed/mixcloud-embed-core.php on line 376 I’ve added:

    // check for wrong formating and fix it
        	if (empty($content) && is_array($options) && count($options) > 0) {
        		foreach ($options as $o) {
        			if (is_string($o) && preg_match('~^http(s)?://(www\.)?mixcloud\.com/~', $o) == 1 && empty($content)) {
        				$content = $o;
        			}
        		}
        	}

    That has fixed this issue for me.

    Hope this helps someone else and you may could include it in an update.

    Btw. I’ve also mage a “hack” to always have width=”100%” maybee that would be a nice option for developers to be able to allways overwrite the width of the iframe to 100%

    https://www.ads-software.com/plugins/mixcloud-embed/

  • The topic ‘Fix for new Mixcloud Embed’ is closed to new replies.