PHP
fieldtype_dropdown_phpcode
Copy plugins/my/ includes/classes/fields_types
How to Redirect from HTTP to HTTPS
Set up your redirects in your .htaccess file: <IfModule mod_rewrite.c>RewriteEngine OnRewriteCond %{HTTPS} offRewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI}[L,R=301]</IfModule> Look confusing? Here’s the breakdown: You can also solve this from within PHP in case your provider has disabled .htaccess (which is unlikely since you asked for it, but anyway)
A Quick and Easy Guide To Creating WordPress Admin Pages
https://wpmudev.com/blog/creating-wordpress-admin-pages/ Creating a Top-Level Admin Page The first step is to create a menu entry with the add_menu_page() function. Here’s a full example, explanation ensues: add_action( ‘admin_menu’, ‘my_admin_menu’ ); function my_admin_menu() { add_menu_page( ‘My Top Level Menu Example’, ‘Top Level Menu’, ‘manage_options’, ‘myplugin/myplugin-admin-page.php’, ‘myplguin_admin_page’, ‘dashicons-tickets’, 6 ); } view rawtop level hosted with ❤ by GitHub The function takes seven arguments. … Read more
Install via Composer
Create a file named composer.json in the root of your project and add the following code to it: { “require”: { “microsoft/windowsazure”: “^0.5” } } Download composer.phar in your project root. Open a command prompt and execute this in your project root php composer.phar install If you are using the PHP version 8, some of … Read more
Azure Key Vault Library
This library allows easy integration of Azure Key Vault in PHP applications. https://github.com/wapacro/az-keyvault-php
FuzzyWuzzy
Fuzzy string matching for PHP, based on the python library of the same name. https://github.com/wyndow/fuzzywuzzy Requirements Installation Using Composer Usage use FuzzyWuzzy\Fuzz; use FuzzyWuzzy\Process; $fuzz = new Fuzz(); $process = new Process($fuzz); // $fuzz is optional here, and can be omitted. Simple Ratio >>> $fuzz->ratio(‘this is a test’, ‘this is a test!’) => 96 Partial Ratio >>> $fuzz->partialRatio(‘this … Read more
How to Run a Python Script in PHP
https://www.linuxshelltips.com/run-python-script-in-php/
Lean Architecture (PHP, Python)
Lean Architecture is the ongoing process of rethinking and improving architectural methodology. It is the pursuit of better work by applying Lean principles to every aspect of practice. It is about smarter information flow and understanding how we perceive and process information in order to be better communicators amongst ourselves and to the users of … Read more