This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command
$ docker-compose up -d
# To Tear Down
$ docker-compose down --volumes
<?php | |
namespace App\Nova; | |
use App\Nova\Fields\DateTime; | |
use Carbon\CarbonImmutable; | |
use Cron\CronExpression; | |
use Illuminate\Http\Request; | |
use Laravel\Nova\Fields\Boolean; | |
use Laravel\Nova\Fields\Text; |
<?php | |
/** | |
* Returns the primary term for the chosen taxonomy set by Yoast SEO | |
* or the first term selected. | |
* | |
* @link https://www.tannerrecord.com/how-to-get-yoasts-primary-category/ | |
* @param integer $post The post id. | |
* @param string $taxonomy The taxonomy to query. Defaults to category. | |
* @return array The term with keys of 'title', 'slug', and 'url'. | |
*/ |
<?php | |
function create_ACF_meta_in_REST() { | |
$postypes_to_exclude = ['acf-field-group','acf-field']; | |
$extra_postypes_to_include = ["page"]; | |
$post_types = array_diff(get_post_types(["_builtin" => false], 'names'),$postypes_to_exclude); | |
array_push($post_types, $extra_postypes_to_include); | |
foreach ($post_types as $post_type) { | |
register_rest_field( $post_type, 'ACF', [ |
<?php | |
namespace Tests\Feature\SmokeTests; | |
use App\Models\Post; | |
use App\Models\Tutorial; | |
use Illuminate\Routing\Router; | |
use Tests\TestCase; | |
class SmokeGuestTest extends TestCase |
add_filter( 'install_plugins_tabs', 'cmfy_required_plugins_tab' ); | |
function cmfy_required_plugins_tab( $tabs ) { | |
$tabs['cmfy'] = _x( 'Required', 'Plugin Installer', 'cmfy' ); | |
return $tabs; | |
} | |
add_action( 'install_plugins_cmfy', 'cmfy_required_plugins_page' ); | |
function cmfy_required_plugins_page() { | |
$required_plugin_slugs = array( | |
'cmb2', |
######################################################################## | |
# OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2.0.9 - 03/2024 | |
# ---------------------------------------------------------------------- | |
# @Author: Andreas Hecht | |
# @Author URI: https://seoagentur-hamburg.com | |
# License: GNU General Public License v2 or later | |
# License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
######################################################################## | |
In this php example (app/Http/Controllers/Auth/LoginController.php
) my model is called Client
and the custom field for login validation is status
. (Client->status
)
Add in your resources/lang/en/auth.php
file :
'failed_status' => 'Your account is inactive yet. Please confirm your e-mail address.',
The command line, in short…
wget -k -K -E -r -l 10 -p -N -F --restrict-file-names=windows -nH http://website.com/
…and the options explained
# first we download the list of IP ranges from CloudFlare | |
wget https://www.cloudflare.com/ips-v4 | |
# set the security group ID | |
SG_ID="sg-00000000000000" | |
# iterate over the IP ranges in the downloaded file | |
# and allow access to ports 80 and 443 | |
while read p | |
do |