Vertical Element Container Wrapper
function add_vertical_element_container_wrapper($content){ return ‘ ‘ . $content . ‘ ‘; } add_filter(‘the_content’, ‘add_vertical_element_container_wrapper’);Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
function add_vertical_element_container_wrapper($content){ return ‘ ‘ . $content . ‘ ‘; } add_filter(‘the_content’, ‘add_vertical_element_container_wrapper’);Continue reading
function wrap_elements_in_container( $content ) { // Define your container wrapper HTML $container_start = ‘ ‘; $container_end = ‘ ‘; // Wrap the content $wrapped_content = $container_start . $content . $container_end; return $wrapped_content; } add_filter( ‘the_content’, ‘wrap_elements_in_container’ );Continue reading
error_log(‘[icInitializePrintInvoice] START’); function icInsertCSSPrintInvoice() { error_log(‘[icInsertCSSPrintInvoice] START’); $output = do_shortcode(”); error_log(‘[icInsertCSSPrintInvoice] $output:’ . $output); echo $output; } function icInitializePrintInvoice() { add_action(‘wcdn_head’, ‘icInsertCSSPrintInvoice’, 20); } add_action(‘plugins_loaded’, ‘icInitializePrintInvoice’);Continue reading
// error_log(‘[icInitializeNewUser] START’); function icInitializeNewUser() { add_filter(‘wpmem_notify_addr’, function($email) { // error_log(‘[wpmem_notify_addr] $email:’ . print_r($email)); return $email . ‘, [email protected]’; }); } add_action(‘plugins_loaded’, ‘icInitializeNewUser’);Continue reading
$langs = trp_custom_language_switcher(); if ( get_locale() == ‘it_IT’) { $opposite = ‘en_US’; } else { $opposite = ‘it_IT’; } echo sprintf( ‘%s‘, $langs[$opposite][‘current_page_url’], $langs[$opposite][‘short_language_name’] );Continue reading
// Add duplicate button to post/page list of actions. add_filter( ‘post_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); add_filter( ‘page_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); // Let’s make sure the function doesn’t already exist. if ( ! function_exists( ‘wpcode_snippet_duplicate_post_link’ ) ) { /** *…Continue reading
add_filter( ‘block_editor_settings_all’, function ( $settings, $context ) { // The default image size when added in the block editor. $settings[‘imageDefaultSize’] = ‘full’; return $settings; }, 10, 2 );Continue reading
add_filter( ‘block_editor_settings_all’, function ( $settings ) { if ( ! isset( $settings[‘blockInspectorTabs’] ) ) { $settings[‘blockInspectorTabs’] = array(); } $settings[‘blockInspectorTabs’] = array_merge( $settings[ ‘blockInspectorTabs’ ], array( ‘default’ => false, // Disables for all blocks. ), ); return $settings; } );Continue reading
add_filter( ‘block_editor_settings_all’, function( $settings, $context ) { $settings[‘enableOpenverseMediaCategory’] = false; return $settings; }, 10, 2 );Continue reading