function custom_dashboard_widget() { echo ‘ Për cdo pytje rreth webfaqes ju lutem na kontaktoni. Website: Mjellma.al Email: [email protected] Phone Number: +383 49 844 249 ‘; } function add_custom_dashboard_widget() { wp_add_dashboard_widget( ‘custom_dashboard_widget’, ‘Shërbimi i ndihmës.’, ‘custom_dashboard_widget’ ); } add_action(‘wp_dashboard_setup’, ‘add_custom_dashboard_widget’);Continue reading
// legacy – for CPT-based orders add_filter( ‘manage_edit-shop_order_columns’, ‘misha_order_items_column’ ); // for HPOS-based orders add_filter( ‘manage_woocommerce_page_wc-orders_columns’, ‘misha_order_items_column’ ); function misha_order_items_column( $columns ) { // let’s add our column before “Total” $columns = array_slice( $columns, 0, 4, true ) // 4…Continue reading
function add_user_role_to_body_classes( $classes ) { global $current_user; foreach ( $current_user->roles as $user_role ) { if ( is_admin() ) { $classes .= ‘ role-‘ . $user_role; } else { $classes[] = ‘role-‘ . $user_role; } } return $classes; } add_filter( ‘body_class’,…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_action( ‘pre_ping’, function( &$links ) { $home = get_option( ‘home’ ); foreach ( $links as $l => $link ) { if ( 0 === strpos( $link, $home ) ) { unset( $links[ $l ] ); } } } );Continue reading
remove_action(‘wp_head’, ‘wlwmanifest_link’);Continue reading
// Register Custom Taxonomy function register_custom_foodtype() { $labels = array( ‘name’ => _x( ‘Food Types’, ‘Taxonomy General Name’, ‘text_domain’ ), ‘singular_name’ => _x( ‘Food Type’, ‘Taxonomy Singular Name’, ‘text_domain’ ), ‘menu_name’ => __( ‘Food Type’, ‘text_domain’ ), ‘all_items’ => __(…Continue reading
add_filter( ‘yith_system_status_enable_phpinfo’, ‘__return_false’ );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