Fix for WordPress stripping iFrames and Script Tags from Editor

If you’re frustrated with WordPress’s TinyMCE Editor stripping out your iFrame or script tags within your posts add the following line of code to your functions file:
[cc lang=”php” tab_size=”4″]
// allow script & iframe tag within posts
function allow_post_tags( $allowedposttags ){
$allowedposttags[‘script’] = array(
‘type’ => true,
‘src’ => true,
‘height’ => true,
‘width’ => true,
);
$allowedposttags[‘iframe’] = array(
‘src’ => true,
‘width’ => true,
‘height’ => true,
‘class’ => true,
‘frameborder’ => true,
‘webkitAllowFullScreen’ => true,
‘mozallowfullscreen’ => true,
‘allowFullScreen’ => true
);
return $allowedposttags;
}
add_filter(‘wp_kses_allowed_html’,’allow_post_tags’, 1);
[/cc]
I’m not sure when this became an issue, but I’m running WordPress 3.9 and I didn’t notice this until now.

Posted in PHP / MySQL, WordPress | Comments Off on Fix for WordPress stripping iFrames and Script Tags from Editor

Web Development / Code Editing with Aptana Studio

I have made several recent entries about code development for the web. I recently stumbled upon a new studio for programming on the web. It’s called “Aptana Studio“. I have yet to use it extensively, but I’m looking forward to using the tool. It seems like there are more plug-in features than eclipse and it seems to be based of the eclipse IDE.

Aptana Studio Community Edition is the free, open source Ajax and PHP development environment with over a million downloads that makes developing web pages fun again. This edition comes with optional packages to support Adobe AIR, iPhone, and Ruby on Rails development to integrate Ajax applications with emerging technologies.

If anyone is currently using it, be sure to let me know what you think of it.

PHP code editing in Dreamweaver

I know dreamweaver isn’t the best choice for editing PHP code by hand, but it’s worked relatively well for me over the past 2 years. There are better tools out there that offer code/syntax validation such as the Eclipse IDE with php, and even simple text editors like textmate. But for those of you that do use dreamweaver and use include files, it has always been a bother that Dreamweaver doesn’t color-code include files. Well here’s how:I found an article on adobe about this:http://kb.adobe.com. Basically find your file titled MMDocumentTypes.xml… on a mac just use spotlight to find this, otherwise you have to dig through the application package. After locating the file and opening it, just add inc to the XML where the documenttype is listed as PHP_MySQL:

<documenttype id=”PHP_MySQL” servermodel=”PHP MySQL” internaltype=”Dynamic” winfileextension=”php,php3,php4,php5,inc” macfileextension=”php,php3,php4,php5,inc” file=”Default.php” writebyteordermark=”false”>

And Voila. A simple code-coloring solution for editing include files with the .inc extension in dreamweaver.

Midwest Lynx Content Management System and Camping

I’m looking forward to wrapping up the new “2.0” version of the content management system I’ve been working on with Marky at Midwest Love. It should be a good release of it. I think our clients are going to really enjoy it.

On top of finishing that, I’m going camping this weekend with all my friends from The Autumn View. I’m excited. I hope I get to see some of the leaves turning colors already, but who knows.

Wii and PHP Content Management!

Mario Strikers Charged with 3 other friends in the same room is amazing! I’ve been looking into Drupal: I’m not sold.It has some great features, but still it doesn’t compare to starting from scratch. I know there’s a lot of technology now that “makes our lives easier”, but I believe most just add clutter. Open Source is the way to go for a lot of stuff, but I still like getting down to the very core of everything and building from the ground up. I’m interested in what will come of Wombat CMS.I started on the inital designs of an Admin 2.0 version. Midwest Lynx! One day it will have a cute little logo. NetNewt was taken!

MAMP… is it a disease?

I just started using MAMP (Macintosh, Apache, Mysql and PHP) today at work.. amazing. Simple to install and easy to use. I strongly suggest anyone who codes with PHP and MySQL to use this program. I haven’t ever wanted to turn my computer into a web server by installing PHP and MySQL with the fear of updating configuration files and what not. I know I’m not as knowledgeable in the installation of this stuff as I should be. What I do know is this program is great and easy to install!

Check it out: www.mamp.info