Skip to content

Instantly share code, notes, and snippets.

View Codevz's full-sized avatar
🎯
Focusing

Codevz Codevz

🎯
Focusing
View GitHub Profile
@1naveengiri
1naveengiri / class-sd-admin-pointer.php
Created January 10, 2018 04:05
Create WordPress Pointer Tutorial For New Users
<?php
/**
* Adds and controls pointers for contextual help/tutorials
*
* @author WooThemes
* @category Admin
* @package WooCommerce/Admin
* @version 2.4.0
*/
@ontiuk
ontiuk / php-get-remote-image-dimensions-curl
Created August 18, 2017 19:58
Get Remote Image Dimensions With PHP and cURL - GetImageSize Alternative
<?php
/** 
* Retrieve remote image dimensions 
* - getimagesize alternative 
*/
/**
* Get Image Size 
@slushman
slushman / customizer-links.php
Last active September 23, 2023 13:03
How to link into the WordPress Customizer
@DomenicF
DomenicF / get_current_post_type.php
Last active December 5, 2022 07:11 — forked from bradvin/get_current_post_type.php
Get the current post_type context in the WordPress admin.
<?php
/**
* gets the current post type in the WordPress Admin
*/
function get_current_post_type() {
global $post, $typenow, $current_screen;
//we have a post so we can just get the post type from that
if ( $post && $post->post_type ) {
return $post->post_type;
@SantiagoInteractive
SantiagoInteractive / gist:eb533bb8a39ddc51b7a0
Last active February 20, 2020 16:55
Visual Render & Editor from WP TinyMCE on Codestar Framework Shortcodes
<?php
/*
* Editor Visual Shortcode Extension
* Version: 1.0.0
*/
// if this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
@johnregan3
johnregan3 / schedule-event-tutorial.php
Last active December 29, 2015 21:30
Code for a wp_schedule_single_event Tutorial.
<?php
/**
* Plugin Name: Schedule Event Tutorial
* Description: Schedules single event to uncheck a checkbox on a custom Menu page
* Version: 0.1
* Author: John Regan
* Author URI: http://johnregan3.me
* Text Domain: setjr3
* License: GPLv2+
@peterwilsoncc
peterwilsoncc / index.php
Created October 17, 2011 03:51
WordPress - output page title on is_home() when displaying news on a sub page
<?php
if ( (is_home()) && (get_option('show_on_front') == 'page') && (get_option('page_for_posts') != 0) ) {
echo '<h1>' . esc_html(get_the_title(get_option('page_for_posts'))) . '</h1>';
}
?>