Saturday, January 13, 2024
HomeMobile MarketingWordPress Plugin: Login Simply With Teleport

WordPress Plugin: Login Simply With Teleport


WordPress gives a variety of keyboard shortcuts to reinforce its customers’ productiveness. These shortcuts are tailor-made for Home windows and MacOS working methods and cater to WordPress utilization, from content material modifying to remark administration. Let’s discover these shortcuts:

WordPress Block Editor Shortcuts

MacOS

  • Possibility + Management + o: Opens the block navigation menu.
  • Possibility + Management + n: Navigates to the following a part of the editor.
  • Possibility + Management + p: Navigates to the earlier a part of the editor.
  • fn + Possibility + F10: Navigates to the closest toolbar.
  • Command + Possibility + Shift + m: Switches between Visible and Code Editor.

Home windows

  • Ctrl + Shift + o: Opens the block navigation menu.
  • Ctrl + Shift + n: Navigates to the following a part of the editor.
  • Ctrl + Shift + p: Navigates to the earlier a part of the editor.
  • Fn + Ctrl + F10: Navigates to the closest toolbar.
  • Ctrl + Shift + Alt + m: Switches between Visible and Code Editor.

WordPress Traditional Editor Keyboard Shortcuts

MacOS

  • Command + y: Redoes the final motion.
  • Command + Possibility + [number]: Inserts heading sizes (e.g., Command + Possibility + 1 for h1).
  • Command + Possibility + l: Aligns textual content to the left.
  • Command + Possibility + j: Justifies textual content.
  • Command + Possibility + c: Facilities textual content.
  • Command + Possibility + d: Applies strikethrough.
  • Command + Possibility + r: Aligns textual content to the best.
  • Command + Possibility + u: Creates an unordered checklist.
  • Command + Possibility + a: Inserts a hyperlink.
  • Command + Possibility + o: Creates a numbered checklist.
  • Command + Possibility + s: Removes a hyperlink.
  • Command + Possibility + q: Codecs textual content as a quote.
  • Command + Possibility + m: Inserts a picture.
  • Command + Possibility + t: Inserts the ‘Extra’ tag.
  • Command + Possibility + p: Inserts a web page break tag.
  • Command + Possibility + w: Toggles fullscreen mode within the visible editor.
  • Command + Possibility + f: Toggles fullscreen mode in textual content editor.

Home windows

  • Ctrl + y: Redoes the final motion.
  • Alt + Shift + [number]: Inserts heading sizes (e.g., Alt + Shift + 1 for ).
  • Alt + Shift + l: Aligns textual content to the left.
  • Alt + Shift + j: Justifies textual content.
  • Alt + Shift + c: Facilities textual content.
  • Alt + Shift + d: Applies strikethrough.
  • Alt + Shift + r: Aligns textual content to the best.
  • Alt + Shift + u: Creates an unordered checklist.
  • Alt + Shift + a: Inserts a hyperlink.
  • Alt + Shift + o: Creates a numbered checklist.
  • Alt + Shift + s: Removes a hyperlink.
  • Alt + Shift + q: Codecs textual content as a quote.
  • Alt + Shift + m: Inserts a picture.
  • Alt + Shift + t: Inserts the ‘Extra’ tag.
  • Alt + Shift + p: Inserts a web page break tag.
  • Alt + Shift + w: Toggles fullscreen mode within the visible editor.
  • Alt + Shift + f: Toggles fullscreen mode in textual content editor.

Years in the past, we constructed a plugin to cover the admin bar when viewing your web site and use popup navigation as an alternative. We known as it Teleport. After testing, we seen that it slowed down the location load occasions with the strategies we deployed, so we not up to date the plugin.

Keyboard Shortcut to Conceal or Present The WordPress Admin Bar

I like WordPress’s built-in admin bar while you’re logged into your web site, however not when attempting to view the location. So, I wrote a modification that you just would possibly want to deploy by yourself… a keyboard shortcut that may conceal or present the WordPress Admin bar while you view your web site, and also you’re logged in!

MacOS

  • Possibility + Management + x: Toggle the admin menu bar.

Home windows

  • Ctrl + Shift + x: Toggle the admin menu bar.

When the admin bar hundreds, it slides up. Toggling it can slide the web page up or down.

Add this code to your little one theme’s features.php:

add_action('wp_enqueue_scripts', 'enqueue_adminbar_shortcut_script');
perform enqueue_adminbar_shortcut_script() {
    if (is_user_logged_in()) {
        wp_enqueue_script('jquery');
        add_action('wp_footer', 'add_inline_admin_bar_script');
    }
}

perform add_inline_admin_bar_script() {
    ?>
    <script kind="textual content/javascript">
        jQuery(doc).prepared(perform(jQuery) {
            var adminBar = jQuery('#wpadminbar');
            var physique = jQuery('physique');

            // Examine if the admin bar exists and set the preliminary styling
            if (adminBar.size) {
                var adminBarHeight = adminBar.peak();
                // Conceal the admin bar and regulate the physique's prime margin
                adminBar.conceal();
                physique.css('margin-top', '-' + adminBarHeight + 'px');

                jQuery(doc).keydown(perform(occasion) {
                    // Toggle performance on particular key mixture
                    if ((occasion.ctrlKey || occasion.metaKey) && occasion.shiftKey && occasion.which === 88) {
                        if (adminBar.is(':seen')) {
                            adminBar.slideUp();
                            physique.animate({'margin-top': '-' + adminBarHeight + 'px'}, 300);
                        } else {
                            adminBar.slideDown();
                            physique.animate({'margin-top': '0px'}, 300);
                        }
                    }
                });
            }
        });
    </script>
    <?php
}

Rationalization

  • This script initially checks if the admin bar (#wpadminbar) is current. Whether it is, the script calculates its peak.
  • It then hides the admin bar and units the margin-top of the physique ingredient to the unfavourable worth of the admin bar’s peak utilizing jQuery. This makes the admin bar invisible initially and shifts the web page content material up.
  • The keydown occasion listener toggles the visibility of the admin bar and adjusts the margin-top of the physique to point out or conceal the admin bar easily.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments