This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
$page = 9; | |
$max = 16; | |
$pages = range( 1, $max ); | |
echo "Current page: {$page}\n"; | |
// Case 1 (7 or less pages) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# Based on BackspaceBack.py https://github.com/riclc/nautilus_backspace | |
# originally by Ricardo Lenz riclc@hotmail.com | |
# | |
import os, gi | |
gi.require_version('Nautilus', '3.0') | |
from gi.repository import GObject, Nautilus, Gtk, Gio, GLib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'init', function() { | |
if ( class_exists( 'AcfFieldMultipleCategories' ) || ! class_exists( 'acf_field_taxonomy' ) ) { | |
return; | |
} | |
/** | |
* Class for ACF field. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( ! class_exists( 'AcfFieldMultipleCategories' ) && class_exists( 'acf_field' ) ) { | |
class AcfFieldMultipleCategories extends acf_field { | |
/** | |
* This function will setup the field type data. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* acf.newSelect2 | |
* | |
* description | |
* | |
* @date 13/1/18 | |
* @since 5.6.5 | |
* | |
* @param type $var Description. Default. | |
* @return type Description. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |