Skip to content

Instantly share code, notes, and snippets.

View vicsimental's full-sized avatar

Víctor Manuel vicsimental

View GitHub Profile
@vicsimental
vicsimental / wp_plugin_ajax.php
Created June 20, 2020 03:57 — forked from iwek/wp_plugin_ajax.php
Ajax in Wordpress
<?php
/**
* @package Quick Contact
* @version 0.1
*/
/*
Plugin Name: Quick Contact
Plugin URI: http://techslides.com/
Description: Quick Contact WordPress Plugin to make an Ajax form submission, store it in the database, and show it in a Admin backend page.
Version: 0.1
@vicsimental
vicsimental / plugin_admin_page.php
Created June 20, 2020 03:57 — forked from iwek/plugin_admin_page.php
Building a WordPress Plugin Admin Menu Page
<?php
add_action('admin_menu', 'plugin_admin_add_page');
function plugin_admin_add_page() {
//http://codex.wordpress.org/Function_Reference/add_menu_page
add_menu_page( 'custom menu title', 'custom menu', 'manage_options', 'dbexplorer/adminpage.php');
}
function my_enqueue($hook) {
//only for our special plugin admin page
if( 'dbexplorer/adminpage.php' != $hook )
@vicsimental
vicsimental / AZ-Template-Page.php
Created June 20, 2020 04:00 — forked from iwek/AZ-Template-Page.php
AZ Category Index Template Page
<?php
/*
Template Name: Page Template for AZ Categories Index
Author URI: http://techslides.com/
*/
?>
<?php get_header(); ?>
<div id="content" class="widecolumn">
<?php
@vicsimental
vicsimental / wp-config.php
Created November 8, 2021 15:47 — forked from MikeNGarrett/wp-config.php
All those damned wp-config constants you can never remember.
<?php
// PHP memory limit for this site
define( 'WP_MEMORY_LIMIT', '128M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M' ); // Increase admin-side memory limit.
// Database
define( 'WP_ALLOW_REPAIR', true ); // Allow WordPress to automatically repair your database.
define( 'DO_NOT_UPGRADE_GLOBAL_TABLES', true ); // Don't make database upgrades on global tables (like users)
// Explicitely setting url