Enable Shortcode Execution in Text Widgets
add_filter( ‘widget_text’, ‘do_shortcode’ );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter( ‘widget_text’, ‘do_shortcode’ );Continue reading
function sinatra_meta_viewport_567665() { if ( $_GET && isset( $_GET[‘setcookie’] ) ) { setcookie($_GET[‘setcookie’], ‘true’, time() + 3600000, “/”); // 86400 = 1 day } if ( $_COOKIE && isset( $_COOKIE[‘newsletter-off’] ) ) { } else { echo do_shortcode(‘[uikit-modal title=”Join our…Continue reading
add_filter(‘gutenberg_can_edit_post’, ‘__return_false’, 10); add_filter(‘use_block_editor_for_post’, ‘__return_false’, 10);Continue reading
/* Disable WordPress Admin Bar for all users */ add_filter( ‘show_admin_bar’, ‘__return_false’ );Continue reading
// Disable auto-update emails. add_filter( ‘auto_core_update_send_email’, ‘__return_false’ ); // Disable auto-update emails for plugins. add_filter( ‘auto_plugin_update_send_email’, ‘__return_false’ ); // Disable auto-update emails for themes. add_filter( ‘auto_theme_update_send_email’, ‘__return_false’ );Continue reading
add_action(‘admin_init’, function () { // Redirect any user trying to access comments page global $pagenow; if ($pagenow === ‘edit-comments.php’) { wp_safe_redirect(admin_url()); exit; } // Remove comments metabox from dashboard remove_meta_box(‘dashboard_recent_comments’, ‘dashboard’, ‘normal’); // Disable support for comments and trackbacks in…Continue reading
/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading
function visitor_greeting() { $string = ”; // Check if cookie is already set if ( isset( $_COOKIE[‘wpb_visit_time’] ) ) { // Use information stored in the cookie $lastvisit = $_COOKIE[‘wpb_visit_time’]; $string .= ‘You last visited our website ‘ . $lastvisit…Continue reading
/** * Plugin Name: Email Template * Description: Styles the all emails with HTML * Version: 1.2.3 * Author: Thomas Senecal * License: GPL-2.0+ * Text Domain: email-template **/ add_filter( ‘wp_mail_content_type’, ‘eliteweblabs_set_email_content_type’ ); function eliteweblabs_set_email_content_type() { return “text/html”; } add_filter(…Continue reading
/** * Plugin Name: Elite Web Labs Newsletters * Description: A plugin that allows for sending newsletters when publishing posts * Version: 1.0.4 * Author: Thomas Senecal * License: GPL-2.0+ * Text Domain: newsletter */ // If this file is…Continue reading