Looking for a reliable partner to bring your project to the next level? Whether it’s development, design, security, or ongoing support—I’d love to chat and see how I can help.
There are many variations of these out there, SSilence/php-imap-client is a lib with a nice set of methods, clean integration and pretty good documentation.Adding it to my goto essentials ! GitHub Enjoy coding … Default IMAP Search Criteria
Visual Composer shortcodes are normally not converted within the WordPress REST API rendered output. This can be accomplished by calling WPBMap::addAllMappedShortcodes(); add_action( ‘rest_api_init’, function () { register_rest_field( ‘page’, ‘content’, array( ‘get_callback’ => ‘convert_do_shortcodes’, ‘update_callback’ => null, ‘schema’ => null, ) ); }); function convert_do_shortcodes( $object, $field_name, $request ) { WPBMap::addAllMappedShortcodes(); // This does all the work global […]
START SESSION ON INIT add_action(‘init’, ‘pluginStartSession’, 1); function pluginStartSession() { if(!session_id()) { session_start(); } } NEW SESSION ON LOGIN / LOGOUT add_action(‘wp_logout’, ‘pluginEndSession’); add_action(‘wp_login’, ‘pluginEndSession’); function pluginEndSession() { session_destroy (); } Now go ahead and use $_SESSION freely in your plugin. Here a nice additional class to encrypt session data. Enjoy coding ….
Simple little snippet, that can easily be used in conjunction with wp_update_user() /* Generate Unique User Nicename */ function generate_unique_user_nicename( $x ) { // set up args to query $args = array( ‘search’ => sanitize_title( $x ), ‘search_columns’ => array( ‘user_nicename’ ) ); // query for user $user_url_exists = new WP_User_Query( $args ); $results = $user_url_exists->get_results(); […]
Logstalgia is a website traffic visualization tool that replays or streams web-server access logs as a pong-like battle between the web server and an never ending torrent of requests. Requests appear as colored balls (the same color as the host) which travel across the screen to arrive at the requested location. Successful requests are hit […]
CodeCombat is a multiplayer programming game for learning how to code. The ultimate goal of CodeCombat is to bring more users into the field of computer programming by making the logic and syntax more accessible and enjoyable to learn. The end game is to educate a whole new generation of computer programmers that started their […]
Quickly draw a leader line in your web page. <div id=”start”>start</div> <div id=”end”>end</div> // Add new leader line from `start` to `end` (HTML/SVG elements, basically). new LeaderLine( document.getElementById(‘start’), document.getElementById(‘end’) ); Leaderline @ Github
We often have some posts that we would like to promote and keep at the first page of the blog. When you are using pagination, the sticky posts will be added to the standard posts, making the post count per page uneven. If you want to keep your posts per page count consistent, there is […]
Font Face Observer is a fast and simple web font loader. You can use it to load fonts and customise your browser’s font loading behaviour. Font Face Observer gives you control over web font loading using a simple promise based interface. It doesn’t matter where your fonts come from: host them yourself, or use a […]
Fun Fun Fun :) var sql = require(‘sql.js’); // or sql = window.SQL if you are in a browser // Create a database var db = new sql.Database(); // NOTE: You can also use new sql.Database(data) where // data is an Uint8Array representing an SQLite database file // Execute some sql sqlstr = “CREATE TABLE […]
PORTALZINE® NMN
Alexander Gräf
Stettiner Str. Nord 20
DE-49624 Löningen