By

WordPress Visual Editor Broken

It appears a recent upgrade to WordPress 3.5 is causing the Visual or Text Editor to break. I found errors with the JavaScript within post.php and tinymce. The console in Chrome shows the errors below:

tinymce-error

 

 

Installing the plugin use-google-libraries http://wordpress.org/extend/plugins/use-google-libraries/ seems to resolve the issue.

 

By

The uploaded file could not be moved

If you are experiencing issues uploading files with the Media uploader in WordPress, the upload may be failing due to one of the following:

  1. Uploaded file is too large- By default the upload limit for WordPress is controlled by the upload_max_filesize/post_max_size limits in your php.ini file. If the file you are trying to upload is bigger than those limits, the upload will fail. You can increase those limits to increase the upload limit for WordPress.
  2. Upload path for WordPress is incorrect or unwritable - The default upload directory for WordPress is wp-content/uploads. If the directory is incorrect or it is unwritable you will be an error similar to the one in the screenshot below:
    failedupload
    To correct the upload path, navigate to Settings >> Media from your WordPress dashboard for the “Store uploads in this folder” field enter wp-content/uploads then click Save Changes.
    wpupload
    If that does not correct the issue then wp-content/uploads or the currently upload path is not writable. The permissions for the folder should be set to 755. I do not suggest 777 since that makes the directory writable by group and that could make your WordPress site vulnerable. You can change the permissions using any FTP client or from SSH with the command chmod -Rv 755 wp-content/uploads

By

This file is too big. Files must be less than 1500 KB in size.

When installing a theme or plugin for WordPress Multisite you may run into the error “This file is too big. Files must be less than 1500 KB in size.”. By default the maximum upload file limit for WordPress Multisite is set to 1500 KB. To increase this setting navigate to Network Admin -> Settings -> Network Settings and under Uploads Settings, change the “Max upload file size” limit.

By

Add a color Picker with JSColor to your WordPress plugin

WordPress comes with the color picker Farbtastic , however I find JScolor simpler and easier to use.
To use JSColor , first head over to http://jscolor.com/download.php to download it.

To include the javascript , jscolor.js you can use admin_enqueue_scripts (if you want the color picker to load on the admin side) or use wp_enqueue_scripts (if you want the color picker on the client side). In the example below , I have this loading on the admin side.

[code]
//Load Color Picker JS
function jscolor(){
$path = plugins_url('/my-plugin/');
wp_enqueue_script('jscolor',$path. 'jscolor/jscolor.js');
}
add_action('admin_enqueue_scripts','jscolor');[/code]

Note that you have to replace my-plugin with the name of the folder for your plugin.
Also the other files for jscolor should be in the same folder as the jscolor.js file.

Now add an input field,

[code]
<input class="color {adjust:false}" type="text" name="my_plugin_colorpicker" value="&lt;?php echo $options['my_plugin_colorpicker']; ?>" />
[/code]

You can download a sample plugin with color picker options here

A screenshot of the colorpicker is below:

For more examples of how to use jscolor, check demo page.













Contact Us