Sunday, January 14, 2024
HomeMobile MarketingWordPress Plugin: Login Simply With Teleport

WordPress Plugin: Login Simply With Teleport


WordPress provides a spread of keyboard shortcuts to boost 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 Basic 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 proper.
  • Command + Possibility + u: Creates an unordered listing.
  • Command + Possibility + a: Inserts a hyperlink.
  • Command + Possibility + o: Creates a numbered listing.
  • 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 proper.
  • Alt + Shift + u: Creates an unordered listing.
  • Alt + Shift + a: Inserts a hyperlink.
  • Alt + Shift + o: Creates a numbered listing.
  • 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 website and use popup navigation as a substitute. We known as it Teleport. After testing, we observed that it slowed down the location load instances 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 once you’re logged into your website, however not when making an attempt to view the location. So, I wrote a modification that you simply may want to deploy by yourself… a keyboard shortcut that may cover or present the WordPress Admin bar once you view your website, 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 masses, it slides up. Toggling it can slide the web page up or down.

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

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

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

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

                jQuery(doc).keydown(operate(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
}

Clarification

  • 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 aspect to the destructive 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 cover the admin bar easily.



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments