Per Søderlind

I code for fun

  1. WordPress

Tag: WordPress (Page 1 of 2)

WordPress and Pow

Apple + WordPress = POW!

Here is my second take on running WordPress and WordPress Multisite locally on my Mac (first is here). I just discovered Pow; “Pow is a zero-config Rack server for Mac OS X. Have it serving your apps locally in under a minute”, and my first thought was “can I run WordPress on Pow?”.  Well, here’s how I did it (I’ll also show you how to install MySQL, PHP 5.4 and Ruby 1.93 on Mac OS X Mountain Lion):

Read More

An alternative “Hide ACF Menu from Clients”

Here’s an alternative to Hide ACF Menu from Clients, add it to your functions.php:

[php]
add_action( ‘admin_menu’, function() {
if (! current_user_can(‘administrator’)) {
remove_menu_page(‘edit.php?post_type=acf’);
}
});
[/php]
Note, remove_menu_page() needs WordPress 3.1 or newer

Date and Time Picker field for Advanced Custom Fields

 

This is an add-on for the Advanced Custom Fields (ACF) WordPress plugin, that allows you to add a Date and Time Picker field type. Works with ACF v3 and v4. ACF PRO 5.0+ is no longer supported, ACF PRO has its own date and time picker.

Read More

WordPress and WebPutty


I’ve written a simple plugin that allows you to modify your WordPress sites using WebPutty.

Read More

Front-end editor in WordPress 3.3 is easy

Update: Things will have to change, TinyMCE 4.0 is in core:

  • New UI and UI API.
  • New theme.
  • Revamped events system/API.
  • Better code quality, readability and build process.
  • Lots of (inline) documentation.
  • And generally many improvements everywhere.

TinyMCE 4.0

  1. Highlights
  2. Demos

Thanks to sushkov, WordPress 3.4 adds support for DFW (Distraction Free Writing) on the front-end. See the example below.

Thanks to the work done by Andrew Ozz et al., adding a front-end editor in WordPress 3.3 is very simple. If you’re not into creating your own plugins, head over to wpmu.org, they have a great list of 10 front-end editing plugins.

Syntax:

[php]
wp_editor( $content, $editor_id, $settings = array() );

// default settings
$settings = array(
‘wpautop’ => true, // use wpautop?
‘media_buttons’ => true, // show insert/upload button(s)
‘textarea_name’ => $editor_id, // set the textarea name to something different, square brackets [] can be used here
‘textarea_rows’ => get_option(‘default_post_edit_rows’, 10), // rows=”…”
‘tabindex’ => ”,
‘editor_css’ => ”, // intended for extra styles for both visual and HTML editors buttons, needs to include the <style> tags, can use “scoped”.
‘editor_class’ => ”, // add extra class(es) to the editor textarea
‘teeny’ => false, // output the minimal editor config used in Press This
‘dfw’ => false, // replace the default fullscreen with DFW (supported on the front-end in WordPress 3.4)
‘tinymce’ => true, // load TinyMCE, can be used to pass settings directly to TinyMCE using an array()
‘quicktags’ => true // load Quicktags, can be used to pass settings directly to Quicktags using an array()
);
[/php]

Read More

Page 1 of 2

Powered by WordPress & Theme by Anders Norén