[BuyNowShop]BNS Login Updated to 2.1

= Version 2.1 =
* Released May 2013
* Added plugin version data dynamically to enqueue calls
* Added (enqueued) ‘BNS Login Form Style’ to style the form
* Added `bns_login_form` (`wp_login_form` wrapper) for use as the shortcode output
* Updated for version compatibility and minor code formatting
BNS Login Changelog

© 2013, Edward Caissie. All rights reserved.

[BuyNowShop]BNS Inline Asides Updates to 1.0

Lots of improvements and a brand new aside type: the Hat Tip … but you will have to give credit to someone (or however you want to use this new type) to see what it looks like.

= Version 1.0 Changelog =
* Released <:3()~~~ 2013
* Added code block termination comments
* Added ‘hat.png’ image for “Hat Tip” type
* Added missing `bnsia` class to theme elements other than default
* Added style definitions for “Hat Tip” type
* Minor documentation improvements
* Moved stylesheet into its own directory
* Moved images into their own directory
* Moved JavaScript into its own directory
* Refactored $bnsia_element to simply $element
* Removed direct jQuery enqueue (called as a dependency of ‘bnsia-script.js’)
* Removed unused style definitions
* Use an array of elements rather than a convoluted if statement to sort out if an accepted container is being used
BNS Inline Asides changelog

Enjoy!

© 2013, Edward Caissie. All rights reserved.

[BuyNowShop]BNS Early Adopter Updated to 0.6.1

= 0.6.1 =
* Released April 2013
* Fixed conditional logic used to display plugin
* Refactored where $ea_display Boolean value is set
BNS Early Adopter Changelog

© 2013, Edward Caissie. All rights reserved.

[BuyNowShop]BNS Body Classes Updated to 0.5.1

= 0.5.1 =
* Released April 2013
* Fixed wrong function being called by action hook

= 0.5 =
* Released April 2013
* Added additional related tags to header block
* Added Christian Calendars for the years 2013 and 2014
* Added Jewish Calendars for the years 2013 and 2014
* Code formatting and code block termination comments
BNS Body Classes Changelog

© 2013, Edward Caissie. All rights reserved.

[WP First Aid]Filtering The Comment Required Field Symbol

A few days ago, I submitted a ticket to the WordPress core trac to Filter Glyph for Comment Required Fields. The idea behind the patch I submitted being:

Currently the comment-template.php file uses an asterisk (*) as the default glyph for required fields used in the comment_form() function. This glyph is not easily manipulated without having to essentially over-write the entire comment_form() function.

I suggest the glyph be filtered. Therefore if one wants to change it, for example, to a hash (#) symbol then they can simply filter the output; or, if for any other reason one might want to enhance the glyph visibility or utility the filter would then allow for this while minimizing the impact on the default comment form.

A response was made to the ticket providing an example snippet to accomplish the basics of the ticket description but not the entire idea as I envisioned it. Here is Sergey’s snippet:

function change_required_fields_glyph_23870( $defaults ) {
	$defaults['fields']['author']     = str_replace( '*', '#', $defaults['fields']['author'] );
	$defaults['fields']['email']      = str_replace( '*', '#', $defaults['fields']['email'] );
	$defaults['comment_notes_before'] = str_replace( '*', '#', $defaults['comment_notes_before'] );
	return $defaults;
}
add_filter( 'comment_form_defaults', 'change_required_fields_glyph_23870' );

I replied (twice) with the second response providing some modifications to Sergey’s snippet that does complete the idea if the patch I submitted does not get included. Here is what I would suggest to make the Comment Required Field symbol, or glyph, filterable:

function required_fields_glyph_23870() {
	$glyph = apply_filters( 'comment_required_glyph_23870', '*' );
	return $glyph;
}
function change_required_fields_glyph_23870( $defaults ) {
	$defaults['fields']['author']     = str_replace( '*', required_fields_glyph_23870(), $defaults['fields']['author'] );
	$defaults['fields']['email']      = str_replace( '*', required_fields_glyph_23870(), $defaults['fields']['email'] );
	$defaults['comment_notes_before'] = str_replace( '*', required_fields_glyph_23870(), $defaults['comment_notes_before'] );
	return $defaults;
}
add_filter( 'comment_form_defaults', 'change_required_fields_glyph_23870' );

You will find a version of this code being used by Opus Primus version 1.2 and later …

… and here’s a plugin idea for this code: link the comment required field glyph, via the filter, to a privacy policy.

[WP First Aid]Local Jetpack

Although I use Jetpack on many sites, to be quite honest it still leaves something to be desired in some areas. Fortunately the Jetpack developers are very responsive and make great efforts to improve the plugin with every release.

The latest improvement (at least in the current development version) is the ability to add a definition to the wp-config.php file allowing developers to work with Jetpack in their local test/development environments.

To develop with Jetpack in a local environment is now easy to do.

  1. Add define('JETPACK_DEV_DEBUG', true); to wp-config.php (I like to add it right underneath the define('WP_DEBUG', true); definition for consistency.
  2. Download the Jetpack Development Version from WordPress Extend Plugins and install via the Plugins > Add New > Upload method.
  3. Activate the module(s) you want to work with.
To see the Hat Tip click here.To hide the Hat Tip click here.

[WP First Aid]WordPress Permalinks and WAMP

Just a quick note, if you find changing your default permalinks to something prettier is not working in your WAMP environment you may need to make an edit in your httpd.conf file.

Open the httpd.conf file with a text editor and search for rewrite. You will be looking for the following line:

#LoadModule rewrite_module modules/mod_rewrite.so

Just remove the leading # and save the file. (The # makes the line read as a comment.) You may need to restart your WAMP services, I suggest simply exiting the program and re-starting it no matter the case if configuration files are modified.

To see the Hat Tip click here.To hide the Hat Tip click here.
wordpress.org/support/topic/how-to-change-permalinks-under-wamp

[WPMU Tutorials]Domain Mapping for WP 3.5

The development version of Domain Mapping is ready for testing with installs where WordPress is installed in its own folder.

The development version also has a number of warnings fixed in it. The required WP version has been updated to 3.1. The development version above has had no feature changes.


© Ron for WordPress "Must-Use" Tutorials, 2013. | Permalink | 2 comments | Add to del.icio.us
Post tags: domain mapping, multisite, network plugins

Check out WPeBooks.com for multisite plugins & ebooks.

Feed enhanced by Better Feed from Ozh

[BuyNowShop]All Current BNS Plugins Updated

Just a quick note … all of the current BNS plugins found in the WordPress Extend Plugins repository have been updated over the last few weeks. Instead of multiple posts (this time) to cover each, please feel free to check the appropriate page found on the Plugins page.

© 2013, Edward Caissie. All rights reserved.

[WP First Aid]Full Width Post-Format Video

Although there are great jQuery plugins available, sometimes a simple little script will do the job just as well. In this case, I would like to share the JavaScript that is being used in the WordPress framework theme Opus Primus for displaying videos that fill the entire width of the content area.

Here is the code:

jQuery( document ).ready( function( $ ) {
    /** Note: $() will work as an alias for jQuery() inside of this function */

    var video_selector = $('.format-video embed, .format-video iframe');

    /** Get the initial width and height values */
    var embed_width = video_selector.attr('width');
    var embed_height = video_selector.attr('height');

    /**
     * Find the ratio between the height and the width to recalculate the height
     * of the embedded video
     */
    var embed_ratio = embed_height / embed_width;

    /**
     * Change the embed / iframe video to use the full width of the post content
     */
    video_selector.attr('width','100%');

    /** Get the new width value as a number and replace the 100% value */
    var new_width = video_selector.width();
    video_selector.attr('width', new_width );

    /**
     * Calculate the new height by multiplying the new width times the original
     * ratio. Then change the embed / iframe video height to the new height.
     */
    var new_height =  new_width * embed_ratio;
    video_selector.attr('height', new_height);

} );

The comments fairly explain the ideas being applied. Simply stated:

  • Get the width and height of the original video
  • Calculate the aspect ratio based on those values
  • Find the HTML class container width and apply it to the video
  • Apply the calculated aspect ratio to the video height

In general this will work under most any circumstance, although the sample above is specifically used for WordPress Post-Format: Video posts; the key is the value(s) used in the video_selector variable.

Planet WordPress Canada theme by WPDesigner, syndication by Pipes, FeedWordPress, and Feedburner, powered by ?