Skip to content

Instantly share code, notes, and snippets.

View mradulovic988's full-sized avatar
:octocat:
Focusing

Marko Radulovic mradulovic988

:octocat:
Focusing
View GitHub Profile
@mradulovic988
mradulovic988 / example-wp-list-table.php
Created February 7, 2022 18:02 — forked from paulund/example-wp-list-table.php
An example code of using the WP_List_Table class. With Pagination.
<?php
/*
* Plugin Name: Paulund WP List Table Example
* Description: An example of how to use the WP_List_Table class to display data in your WordPress Admin area
* Plugin URI: http://www.paulund.co.uk
* Author: Paul Underwood
* Author URI: http://www.paulund.co.uk
* Version: 1.0
* License: GPL2
*/
@mradulovic988
mradulovic988 / wp-admin-table-markup.html
Created August 8, 2020 07:32 — forked from EvanHerman/wp-admin-table-markup.html
WordPress Dashboard Admin Table Markup
<table class="widefat fixed" cellspacing="0">
<thead>
<tr>
<th id="cb" class="manage-column column-cb check-column" scope="col"></th> <!-- this column contains checkboxes -->
<th id="columnname" class="manage-column column-columnname" scope="col"></th>
<th id="columnname" class="manage-column column-columnname num" scope="col"></th> <!-- "num" added because the column contains numbers -->
</tr>
</thead>
@tinotriste
tinotriste / breadcrumbs-functions.php
Last active April 20, 2024 05:36
Wordpress: Breadcrumbs function
<?php
/*=============================================
= BREADCRUMBS =
=============================================*/
// to include in functions.php
function the_breadcrumb() {
$sep = ' > ';
@mnmldave
mnmldave / reverse-nav-menu.php
Created October 17, 2011 03:59
Reverse wordpress nav menu
/**
* Enables a 'reverse' option for wp_nav_menu to reverse the order of menu
* items. Usage:
*
* wp_nav_menu(array('reverse' => TRUE, ...));
*/
function my_reverse_nav_menu($menu, $args) {
if (isset($args->reverse) && $args->reverse) {
return array_reverse($menu);
}