The Code-Bin
Links
Home
Add your code!
All Listings
About
Latest Entry
Featured Scripts
Author's Website
Latest Entries
FFMPEG Thumbnail Scr...
PHP, 0.8KB
Jul. 29, 10:24pm
John
Z80 Assembler, 190 bytes
Feb. 17, 3:36am
John
Z80 Assembler, 176 bytes
Sep. 13, 2:19am
John
Z80 Assembler, 77 bytes
Sep. 13, 2:18am
John
Z80 Assembler, 209 bytes
Sep. 13, 2:17am
untitled PHP Code
Posted by: Builder Frank | September 16, 2010 @ 11:56pm
PHP Code
[
Download
]
<?php function custom_remove_container_width( $fields ) { foreach ( (array) $fields['style'] as $index => $rule ) { if ( preg_match( '/^width:/', $rule ) ) unset( $fields['style'][$index] ); } return $fields; } add_filter( 'builder_filter_container_outer_wrapper_attributes', 'custom_remove_container_width', 20 ); function custom_remove_module_width( $fields ) { /* add module specific rules here */ foreach ( (array) $fields['attributes']['style'] as $index => $rule ) { if ( preg_match( '/^width:/', $rule ) ) unset( $fields['attributes']['style'][$index] ); } return $fields; } add_filter( 'builder_module_filter_outer_wrapper_attributes', 'custom_remove_module_width', 20 ); function custom_add_open_module_wrapper( $fields ) { $width = apply_filters( 'builder_get_container_width', 0 ); echo "<div class='builder-module-limit-width-wrapper clearfix' style='width:{$width}px;margin:0 auto;'>\n"; } function custom_add_close_module_wrapper( $fields ) { echo "</div>\n"; } add_action( 'builder_module_render_contents', 'custom_add_open_module_wrapper', 0 ); add_action( 'builder_module_render_contents', 'custom_add_close_module_wrapper', 20 ); ?>
Syntax Highlighting
[
Open in new window
]
Author Comments
Test code to share for debug
Rating
4.63 / 8
67 Votes