Skip to content

Instantly share code, notes, and snippets.

@michaelmcandrew
michaelmcandrew / civicrm_user_fields.php
Last active November 22, 2018 02:26
Proof of concept WP shortcode to display fields from logged in and other contacts
<?php
/*
This is very much WIP / proof of concept / scratching an itch. Lots of stuff missing, like ACL.
Just sharing some early attempts at WP plugin development. Feedback welcome.
For example...
@frenck
frenck / hassio_ubuntu_install_commands.sh
Last active February 1, 2023 05:38
Simple install command for installing Hass.io on a Generic Ubuntu/Debian machine
Unbuntu is no longer support by the Home Assistant project.
The installation commands previous listed here, are not up 2 date, not recommended, not supported and, therefore, removed.
@morgyface
morgyface / social.php
Last active April 11, 2024 22:37
WordPress | ACF | Social Media Links using Advanced Custom Fields and FontAwesome
<?php
if( have_rows('social_media', 'option') ):
echo '<div class="container social my-4">';
echo '<p class="follow mb-0 align-middle">Follow us</p>';
echo '<ul class="nav align-middle">';
while ( have_rows('social_media', 'option') ) : the_row();
$socialchannel = get_sub_field('social_channel', 'option');
$socialurl = get_sub_field('social_url', 'option');
echo '<li class="nav-item">';
echo '<a class="nav-link" rel="nofollow noopener noreferrer" href="' . $socialurl . '" target="_blank">';
@kcristiano
kcristiano / Hooks-CiviCRM-WP.md
Last active August 29, 2015 14:19
List of Hooks used in WordPress CiviCRM. WordPress hooks used by CiviCRM and hooks created in CiviCRM for WordPress use

WordPress Hooks used in CiviCRM

add_action();

CiviCRM_For_WordPress::wp();

CiviCRM_For_WordPress::wp_loaded();

CiviCRM_For_WordPress::plugins_loaded();

CiviCRM_For_WordPress::admin_menu();

CiviCRM_For_WordPress::admin_notices();

CiviCRM_For_WordPress::load_{$menu_page}();

@eteubert
eteubert / wordpress-passwort-reset-unmultisite.php
Last active July 10, 2024 22:46
Multisite: Passwort Reset on Local Blog
<?php
/**
* Plugin Name: Multisite: Passwort Reset on Local Blog
* Plugin URI: https://gist.github.com/eteubert/293e07a49f56f300ddbb
* Description: By default, WordPress Multisite uses the main blog for passwort resets. This plugin enables users to stay in their blog during the whole reset process.
* Version: 1.0.0
* Author: Eric Teubert
* Author URI: http://ericteubert.de
* License: MIT
*/