Skip to content

Instantly share code, notes, and snippets.

View waqashassan98's full-sized avatar

Waqas Hassan waqashassan98

View GitHub Profile
@max-kk
max-kk / pilotpress.php
Created August 1, 2020 13:53
LRM :: pilotpress redirect fix
<?php
add_action('pilotpress_post_user_login', function () {
$user_signon = wp_get_current_user();
if ( !$user_signon ) {
return;
}
do_action('lrm/login_successful', $user_signon);
$message = lrm_setting('general/registration/reload_after_login', true) ?
@mastef
mastef / functions.php
Last active January 31, 2022 06:50
Pods : How to add Custom Admin Table Columns to a Pods ACT
<?php
/*
only important name is the filter name :
pods_admin_ui_PODNAME
if your pods is called "client" then call it
pods_admin_ui_client
you can rename all functions to your liking
*/
add_filter( 'pods_admin_ui_PODNAME', 'custom_admin_table_columns_for_PODNAME' );
@cjsteel
cjsteel / Staging&ProductionUsingGit.md
Last active April 10, 2024 16:23 — forked from mediabeastnz/Staging&ProductionUsingGit
Staging and Production Server using Git.

If you are running a large project such as a website or ansible server you will want to test new features before pushing them into production then something like the following setup may work for you.

For this example imagine your url is mysite.ca and you want a development/staging site on a subdomain which is dev.mysite.ca

Setup

For websites

Create the website's domain and subdomain

@Shelob9
Shelob9 / 1-pods-loop-general-example.php
Last active April 14, 2023 12:23
Pods Looping Examples.
<?php
//set up pods::find parameters to limit to 5 items
$param = array(
'limit' => 5,
);
//create pods object
$pods = pods('pod_name', $params );
//check that total values (given limit) returned is greater than zero
if ( $pods->total() > 0 ) {