Skip to content

Instantly share code, notes, and snippets.

View asharirfan's full-sized avatar

Ashar Irfan asharirfan

View GitHub Profile
@asharirfan
asharirfan / dbtest.php
Last active May 2, 2019 08:58
💾 DB Connectivity Tests
<?php
/**
* DB Connectivity Tests
*
* @package dbtest
*/
// Define database constants.
define( 'DBTEST_HOST', 'localhost' ); // REPLACE THE CONSTANT VALUE WITH YOUR HOST.
define( 'DBTEST_USER', 'root' ); // REPLACE THE CONSTANT VALUE WITH YOUR USERNAME.
@asharirfan
asharirfan / wfcm-clear-notifications.php
Last active June 3, 2019 09:52
Clear the file changes notifications of WFCM plugin on activation.
<?php
/**
* Plugin Name: WFCM Clear Notifications
* Plugin URI: http://www.wpwhitesecurity.com/
* Description: Clear the file changes notifications of WFCM plugin.
* Author: mrasharirfan
* Contributors: WP White Security, mrasharirfan
* Version: 1.0
* Text Domain: wfcm-clear-notifications
* Author URI: https://asharirfan.com/
@asharirfan
asharirfan / SampleSensor.php
Created September 11, 2019 11:28
Template for a new sensor for WP Security Audit Log (WordPress) plugin.
<?php
/**
* Sample sensor.
*
* @package wsal
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
@asharirfan
asharirfan / guq-view-export-users.php
Last active February 11, 2020 07:59
GUQ Drupal View Export Source Users
$view = new view();
$view->name = 'users_data';
$view->description = 'List, add, and edit users.';
$view->tag = 'admin';
$view->base_table = 'users';
$view->human_name = 'Users Data';
$view->core = 0;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
@asharirfan
asharirfan / guq-view-export-content.php
Created February 8, 2020 13:50
GUQ Drupal View Export Source Content
$view = new view();
$view->name = 'clone_of_administration_nodes';
$view->description = 'Find and manage content.';
$view->tag = 'admin';
$view->base_table = 'node';
$view->human_name = 'Content';
$view->core = 0;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
@asharirfan
asharirfan / guq-featured-images-query.sql
Created February 8, 2020 14:25
GUQ Featured Images Query
@asharirfan
asharirfan / guq-meta-data-academic-calender.php
Created February 10, 2020 09:08
GUQ Drupal View Export Source Academic Calendar Meta Data
$view = new view();
$view->name = 'meta_data_academic_calendar';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'Meta Data Academic Calendar';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
@asharirfan
asharirfan / guq-meta-data-event.php
Created February 10, 2020 09:17
GUQ Drupal View Export Source Event Meta Data
$view = new view();
$view->name = 'meta_data_event';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'Meta Data Event';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
@asharirfan
asharirfan / guq-meta-data-news-item.php
Created February 10, 2020 09:33
GUQ Drupal View Export Source News Item Meta Data
$view = new view();
$view->name = 'meta_data_news_item';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'Meta Data News Item';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
@asharirfan
asharirfan / guq-meta-data-news-item-in-the-media.php
Created February 10, 2020 09:42
GUQ Drupal View Export Source News Item In the Media Meta Data
$view = new view();
$view->name = 'meta_data_news_item_in_the_media';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'Meta Data News Item In the Media';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */