Skip to content

Best Clipboard Manager for Mac

I have checked a couple of tool s but this free and open source tool seems the best so far: "Maccy". Just install and it saves your clipboard elementd such as text or images. You can pin them and easily…

Mehr Lesen

Create Admin USer with PHP

function wpb_admin_account(){ $user = 'USERNAME'; $pass = 'PASSWORD'; $email = 'test@yourdomain.com'; if ( !username_exists( $user ) && !email_exists( $email ) ) { $user_id = wp_create_user( $user, $pass, $email ); $user = new WP_User( $user_id ); $user->set_role( 'administrator' ); } }…

Mehr Lesen

Rebrand Admin Menu Items

function enym_rebrand_plugins() { global $menu; 
foreach ($menu as $key => $item) {
if ($item[0] === 'WPvivid Plugin') { $menu[$key][0] = __('Backup', 'textdomain'); $menu[$key][5] = __('toplevel_page_backwpup2', 'textdomain'); $menu[$key][6] = __('dashicons-archive', 'textdomain'); }
} return false; } add_action('admin_menu', 'enym_rebrand_plugins', 10001); 
function enym_rebrand_plugins() { global…

Mehr Lesen

Diabale mobile View for CLients during development with CSS

@media (max-width: 768px) { html:before { content: 'DIE MOBILANSICHT IST DERZEIT NICHT FREIGESCHALTET!!!'; width: 200px; /* height: 200px; */ top: 50%; left: 50%; transform: translate(-50%, -50%); margin: 0 auto; position: absolute; padding: 20px; background-color: yellow; font-family: sans-serif; } body:not(.role-administrator )…

Mehr Lesen

No logout COnfirmation

//========== //NO LOGOUT CONFIRMATION /* add_action('check_admin_referer', 'logout_without_confirm', 10, 2); function logout_without_confirm($action, $result) { if ($action == "log-out" && !isset($_GET['_wpnonce'])) { $redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : home_url(); //'/beta/'; $location = str_replace('&', '&', wp_logout_url($redirect_to)); header("Location: $location"); die; } }*/

Mehr Lesen

No Admin Bar for Non Admins

//========== //REMOVE ADMIN BAR FOR NON ADMIN /* add_action('after_setup_theme', 'remove_admin_bar'); function remove_admin_bar() { if (!current_user_can('administrator') && !is_admin()) { show_admin_bar(false); } } */

Mehr Lesen

Split Menu

At first register a new menu location: function register_user_menu() { register_nav_menu('main_menu_right',__( 'Right Menu', 'total' )." (".__( 'Right', 'total' ).")"); } add_action( 'init', 'register_user_menu' ); Then in your child theme directory add a new directory "partials/header" with a "header-menu.php" file in…

Mehr Lesen

Cleaning a large posmeta database

To clean a large wp_postmeta table in WordPress, you must identify and delete orphaned or unused metadata left behind by deactivated plugins, imported content, or unused themes. The safest approach involves auditing the database to find high-volume keys, verifying they are no…

Mehr Lesen

WooCommerce: Products with Images first

//============================================================================== //WOOCOMMERCE - ARCHIVES - products with image first function custom_woocommerce_images_first_ordering_args( $q ) { $orderby_value = isset( $_GET['orderby'] ) ? wc_clean( $_GET['orderby'] ) : apply_filters( 'woocommerce_default_catalog_orderby', get_option( 'woocommerce_default_catalog_orderby' ) ); if ( 'images_first' == $orderby_value ) { $q->get( 'meta_key', '_thumbnail_id'…

Mehr Lesen
An den Anfang scrollen