Finding your next read
Practical craft for people building for the web.
Explore DevelopmentFinding your next read
THE FINDERPRESS TOOL DIRECTORY
Explore this tool and check the official listing for its latest features and requirements.
01 / SOURCE DETAILS
Slash Admin gathers some common functions that you probably need in most of your websites. The plugin lets you change various different options in a WordPress website, keeps them active even if you switch your theme and helps you create a friendlier Admin Panel for you and your editors. If you are lost with the many options, here’s a presentation of the plugin’s best features . Features Frontend Option to point to a static splash page. Option to convert email addresses characters to HTML entities to block spam bots. Show EU Cookie Law consent message (check screenshots about available options). Since v.3.0 it also supports WPML for different message per language. Add a “Loading” animation which hides itself when the page is fully loaded Enqueue your own Google Web Fonts, with option to load it locally for better performance and privacy Get rid of the word “Category:” in front of the Archive title (usually needed if your theme uses the_archive_title()). Add excerpt support to pages. Enable the use of shortcodes in widgets. Display a warning for users of old versions of Internet Explorer (IE8 or older). Yes, sadly there are still people who use Internet Explorer 8… Administration Insert Google Analytics tracking code (so as you don’t have to remember re-entering it in case you switch themes in the future) Hide Site Health from everyone except from a selected Admin ( read more ) Hide ACF options from everyone except from the selected Admin Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email. By default, it will be sent to the admin email. Slash Admin allows you to override it (you can also add multiple recipients if you like). Read more Change the address that receives the Plugin and Theme auto-update email notifications Make WordPress respect the order of the tags you insert in a post ( read more ) Limit the number of revisions that WordPress keeps for each post (keeps the database cleaner) Prevent Post Updates and Deletion After a Set Period. Useful if you have many editors or in cases where an editor’s account is compromised, adding spam code to the posts (by disallowing editing of older posts you limit the damage) Enable Jetpack development mode Move Jetpack share and like buttons Maintenance mode. If checked, non-Admins will not be able to acess the WordPress backend and they will see a customizable message instead. Useful if you want to perform some maintenance work to your website and you don’t want your Editors to add or modify the content before you finish. Admins are not affected and they can always login as usual. Login screen Add your custom logo at the WordPress log-in screen Make the login screen logo (custom or default) linking to your website’s homepage instead of wordpress.org After login, redirect users at the homepage instead of their profile page Disable the Admin Bar for all users except Administrators. Applies only to the front-end. It’s useful if you want your site to be visible only to logged-in users (e.g. during developement phase), but you don’t want them to access the dashboard or get confused with the admin bar Add your custom CSS to the login screen to completely change its appearance Non-admins Hide unnecessary options from the Admin menu for non admins (so editors won’t get overwhelmed with options that have no meaning for the current website). Disable tags and categories Hide specific pages from non admins. For example, you might not want your editors to have access to the static frontpage, the blog page or pages that you use as page templates. Allow editors to manage Menus and Widgets and access some other appearance settings previously acessible only to admins (for example, you might want to give your client the option to modify the website’s menu, but you would rather avoid making him/her an administrator). Hide notices about updating WordPress and other plugins for all users except from Admins (sometimes clients get confused with those notices and think that there is something wrong with the website). White label backend Change the “Howdy” message at the top right corner of the admin (both backend and logged-in frontend) Change the default footer text at the admin Replace the WordPress logo at the top left corner of the admin bar with your own (both backend and logged-in frontend) Replace the default Welcome message at the Dashboard with your own Add a Dashboard Widget to provide general or commercial information to your clients (for example: your contact info or links to support documentation) Add your own custom CSS for the Admin area Performance Disable Emojis Disable wp-embed script from the frontend or load it conditionally DNS prefetching notifies the client that there are assets we’ll need later from a specific URL (outside our website’s domain) so the browser can resolve the DNS as quickly as possible. Link prefetching and prerendering. Link prefetching is a browser mechanism, which utilizes browser idle time to download or prefetch documents that the user might visit in the near future. A web page provides a set of prefetching hints to the browser, and after the browser is finished loading the page, it begins silently prefetching specified documents and stores them in its cache. When the user visits one of the prefetched documents, it can be served up quickly out of the browser’s cache. Prerendering downloads and renders the entire page and hides it from the user until it is requested, therefore, it should be used with caution. Shortcodes If you manually include email addresses in your posts, you should consider disguising them in order to “fool” e-mail harvesters (check FAQ for details). Show a telephone number in a way that it is clickable. When clicked, if you are on a mobile device it opens the phone’s dialer and if you are on a desktop computer it prompts to make a call via a related program (e.g. Skype). If you develop your site on localhost or on a temporary URL, you might want to avoid absolute URLs inside posts and pages. That way you don’t need to update your links after migrating to your actual domain (check FAQ for details). Development functions Using slash_dump() instead of var_dump() will wrap the output in <pre></pre> tags, for better readability. slash_admin_dump() does the same thing, only this time the output is only visible to admins (can be handy if you want to debug a live site). Show warnings if the site is on air and debug mode is still on and if the site is on localhost and debug mode is off. Also, show warning if the website is on air and you have chosen to hide it from Search Engines. Notifications Slash Admin displays the following notifications: A list with the users who logged in during the past 15 minutes (except from you, obviously) A warning when debug mode is enabled (you should enable it when developing, but disable it when the site goes live) A warning when your site is hidden from search engines
02 / SOURCE DETAILS
Upload the Slash Admin plugin to your WordPress plugins directory and activate it. Go to Tools / Slash Admin and set your preferred options.
03 / SOURCE DETAILS
Which shortcodes are available? You can enable the following shortcodes: [slash_mail address=”yourmail@mail.com”] – disguises the email address to make it unreadable from mail harvesters and displays it as plain text. [slash_mailto address=”yourmail@mail.com”] – does the exact same thing, but it also transforms the text to a “mailto” link as well. [slash_mail] and [slash_mailto] (same as above but with no parameters given) automatically retrieve the email address of the author of a post/page. All the above shortcodes use the WordPress’ antispambot() function. [slash_phone number=”PHONE_NUMBER” prefix=”COUNTRY_PREFIX” text=”ANCHOR_TEXT”] – Shows a telephone number in a way that it is clickable. When clicked, if you are on a mobile device it opens the phone’s dialer and if you are on a desktop computer it prompts to make a call via a related program (e.g. Skype). The “number” parameter is the only one that is absolutelly required. Here are some usage examples: [slash_phone number=”999999″] would output a link “999999” which would make a phone call to 999999. [slash_phone number=”999999″ prefix=”+30″] would output a link “999999” which would make a phone call to +30999999. [slash_phone number=”999999″ prefix=”+30″ text=”Call us”] would output a link “Call us” which would make a phone call to +30999999. [slash_home] – retrieves the home URI for the current site. It is the equivalent of echoing the home_url(). [slash_theme] – retrieves the template directory URI for the current theme. It is the equivalent of echoing the get_template_directory_uri(). [slash_child] – retrieves the stylesheet directory URI for the current theme/child theme. It is the equivalent of echoing the get_stylesheet_directory_uri(). Which special functions are available? Slash Admin includes the following functions which you can use in your code: slash_dump() – You can use it instead of var_dump() to wrap the output in <pre></pre> tags, for better readability. My theme also supports some of this plugin’s features. Which one should I choose? It is up to you to decide whether you will use your theme’s options or those provided by this plugin. It is recommended, though, that you keep those settings separated from your theme and the reason is simple: If at some point you decide to switch themes, those options will be lost and you have to remember to re-enter them. Keeping them in a plugin maintains the options between themes. Is it wise to hide update notices from my users? Generally speaking, no. WordPress’ default behaviour is probably the best, that’s why the specific option is disabled by default. In some cases, though, users might get confused with those notifications or think that something is wrong with the website. In cases like that, you might want to keep the update notifications visible only for those who can apply them – namely the administrators. Keep in mind that, technically, selecting this option won’t remove the notifications for the non-admins – it will just hide them with CSS. What does hiding options for non-admins means? Sometimes you only use certain features of WordPress. For example, your website might have comments disabled or not using the Links feature. Also, for better usability you might want to show your users only the options that concern them. Hiding those options won’t remove them. You, as an administrator, will always see the full list of all the available options. An editor, though, won’t see the hidden options, which helps him focus to only those that concern him. How does allowing access to appearance settings work? You can allow editors access to one or more of the following sub-sections of the “Appearance” section: Customize Widgets Menus Background Technically, by selecting even one of the above options you give editors access to the Appearance section. To prevent them from accessing unwanted subsections (e.g. you want them to see the Menus but not the Widgets) the plugin hides their links via CSS/JavaScript from both the backend and the frontend. If an editor knew the link for the Widgets subsection he/she could access it. By default the plugin respects the WordPress’ default behavior, keeping those options disabled (users have no access at all to the Appearance section). Old browser warning behaves strangely with W3TC plugin This is a known issue. When Page Caching is activated in the W3 Total Cache plugin, the old browser warning becomes unpredictable and it may appear not only in Internet Explorer 8 but in newer IE versions as well as in Chrome. To deal with the problem you need to disable either the old IE warning or the W3TC Page Cache option.
KEEP EXPLORING