This file contains hidden or 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 | |
| interface ISingleton { | |
| public static function getInstance(): ISingleton; | |
| } | |
| abstract class Singleton implements ISingleton { | |
| private static $_instances = []; | |
| final private function __construct () {} |
This file contains hidden or 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
| $wp_customize->add_setting( 'themecheck_checkbox_setting_id', array( | |
| 'capability' => 'edit_theme_options', | |
| 'sanitize_callback' => 'themeslug_sanitize_checkbox', | |
| ) ); | |
| $wp_customize->add_control( 'themeslug_checkbox_setting_id', array( | |
| 'type' => 'checkbox', | |
| 'section' => 'custom_section', // Add a default or your own section | |
| 'label' => __( 'Custom Checkbox' ), | |
| 'description' => __( 'This is a custom checkbox input.' ), |
This file contains hidden or 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 | |
| /* | |
| * Problem | |
| * ------- | |
| * | |
| * I needed a set of undefined size of card layouts on a 5x5 grid that were | |
| * rotationally unique from each other. This data had to be as CSV lines in a | |
| * file. | |
| * |
This file contains hidden or 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 | |
| namespace storyteller; | |
| /** | |
| * This is a class designed to be used in WordPress Plugins and Themes where for | |
| * whatever reason, the designer wishes to track a huge ammount of per-user data | |
| * and keep it well ordered and accessable. | |
| * | |
| * I am posting this in an incomplete state; in the hope that further developers | |
| * might have ideas that will finish the project for the good of the community. |
OlderNewer