Thema: Tech
-

Remove „Private:“ from the titles of private WordPress pages
# add to functions.php of your theme function the_title_trim($title) { $title = attribute_escape($title); $findthese = array( ‚#Protected:#‘, ‚#Private:#‘ ); $replacewith = array( “, // What to replace „Protected:“ with “ //What to replace „Private:“ with ); $title = preg_replace($findthese, $replacewith, $title); return $title; } add_filter(‚the_title‘, ‚the_title_trim‘);
-
JavaScript Knowlege Links
Master the JavaScript Interview: What is Functional Programming? Master the JavaScript Interview: Soft Skills Top JavaScript Frameworks & Topics to Learn in 2017 Master the JavaScript Interview: What is a Closure? Eloquent JavaScript Common Misconceptions about JavaScript Advice on OOP in JavaScript
-
TabrisJS
https://tabrisjs.com/
-
WordPress RTE Keyboard Shortcuts
-
WordPress Debugging
Debug Bar Debug Bar Taxonomies Debug Bar Post Types Debug Bar Shortcodes Kint Debugger
-
You might not need JavaScript
http://youmightnotneedjs.com/
-
Quoted of the Web: „PHPs badness is its advantage“
I love Python, I think JavaScript is sort of OK and I did a lot of serious programming in ActionScript 2&3, both of which are quite simular to JS. I was basically forced into doing PHP by the market. I never really liked PHP but I really never hated it either. The thing about PHP…
-
WordPress Path to actual active theme / Pfad zum eigentlich aktiven Theme
preg_replace(„/\/\w*?\.css/“, „/“, get_stylesheet_uri()); Gibt den Pfad des aktiven Themes zurück, auch wenn dies ein Child-Theme ist. Vorrausgesetzt, das Child Stylesheet ist mit WordPress Bordmitteln im Theme eingebunden und aktiviert. Returns the path of the actual active theme, even if this is a child theme. This only works if the child themes stylesheet is included with…
-
Clear Scrollback History in iTerm2
printf ‚\e]50;ClearScrollback\a‘
-
jQuery Spreadsheets Overview / Tabellenwidgets Übersicht
http://jspreadsheets.com/
-
Show Active Web VHosts on Linux
List all active apache web vhosts on Ubuntu/Debian Linux / Liste alle aktiven Apache Web VHosts auf einem Ubuntu/Linux Server auf: ls /etc/apache2/sites-enabled | sed ’s,\s,\n,g‘ | sed ’s,^,/etc/apache2/sites-enabled/,g‘ | xargs cat | grep -v „#“ | grep ServerName | sed ’s,ServerName,,g‘ | sed ’s,\s,,g‘
-
Adding a user to a group on Mac OS X
Auf Mac OX X einen User einer Gruppe hinzufügen: sudo dseditgroup -o edit -a [UserNameToAdd] -t user [Groupname]
-
World Map
jVectorMap
-
WordPress Updates ohne/without FTP
Disable FTP requirement for Pluing Installations and Updates / FTP Anforderung für Plugin und Updateinstallation deaktivieren: //add to wp-config.php define(‚FS_METHOD‘,’direct‘);
-
WordPress – Does Author have Posts or not? / Hat der User Posts oder nicht?
<?php if (count(query_posts(‚author=‘.get_current_user_id().’&posts_per_page=5′)) > 0) { //User hat posts / User has posts } else { //User hat KEINE posts / User has NO posts } ?>
-
Freakin‘ Cool JavaScript ’n‘ jQuery Stuff
Gridstack.js Midnight.js Animisition Material Design Preloader Youtube Background Video jPanel Menu Countable.js Simple DropDown List Effects Scrollpath Questionmark.js ifvisible.js Offline.js Pace.js Pongstragr.am
-
WordPress Plugin Pfad/Path
Pfad zum Plugin in WordPress / Path to plugin in WordPress plugins_url().“/[PluginDirectoryName]“
-
URLs in WordPress
site_url(); bloginfo(„wpurl“); //check this! Returns Root Domain URL without trailing slash. home_url(); Returns URL of the WordPress Home target without trailing slash. Usually is the same as the root domain, but needn’t be! admin_url(); Returns the URL leading to the WP Admin directory including trailing slash.
-
Letztes URL Element mit Inhalt / Last URL Segment with content
array_pop(array_filter(explode(„/“, $_SERVER[‚REQUEST_URI‘]), function ($val){return (strlen($val) > 0);})); (Das ist PHP / This is PHP) is_int($thisValue = array_pop(array_filter(explode(„/“, $_SERVER[‚REQUEST_URI‘]), function ($val){return (strlen($val) > 0);}))) ? $thisValue : false; This command only returns a value if the snippet retrieved is an Integer (better for grabbing IDs) – otherwise it returns false / Dieser Befehl gibt den Wert…
-
WordPress Template Hierarchy Diagram
WordPress Template Hierarchy Diagram
-
Sprachupdates in WordPress deaktivieren / Disable WordPress language updates
Das hier in die functions.php des aktiven Themes eintragen / Add this to the active themes functions.php: add_filter( ‚auto_update_translation‘, ‚__return_false‘ );