Skip to content

Instantly share code, notes, and snippets.

View AlKov's full-sized avatar

Alexander AlKov

View GitHub Profile
@AlKov
AlKov / Preven acces to plugin
Created October 6, 2017 09:05
Prevent direct acces to plugin file
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
@AlKov
AlKov / Plugin header
Created October 6, 2017 09:03
Tutorial on how to create simple plugin in Wordpress
<?php
/*
Plugin Name: Display user shortcode
Plugin URI: https://vitorials.net/
Description: Display name and avatar of the logged in users
Version: 1.0
Author: Alex Kovalenko
Author URI: https://vitorials.net/
Text Domain: Display user shortcode
Domain Path: /languages