- Google's Clean Code Talks
- http://blog.gordon-oheim.biz/2011-01-17-Why-Singletons-have-no-use-in-PHP/
- http://sebastian-bergmann.de/archives/882-Testing-Code-That-Uses-Singletons.html
- http://eamann.com/tech/making-singletons-safe-in-php/
- http://hakre.wordpress.com/2012/06/10/the-missing-patterns-of-the-php-manual/#p2
- http://blogs.msdn.com/b/scottdensmore/archive/2004/05/25/140827.aspx
- http://www.phptherightway.com/pages/Design-Patterns.html "You should be wary when using the singleton pattern, as by its very natureit introduces global state into your application, reducing testability."
- http://www.practicaldesignpatternsinphp.com/ *"The Singleton Pattern is perhaps the most well known - and most often misused - pattern in all of PHP design pattern development. Its simplicity, combined with its seeming benefits makes it a widely-used (and overused) pattern. The Singleton is not so much a recommended pattern, as a pattern I recommend you shy away from
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 | |
/** | |
* Adds more display options to the ical feeds | |
* | |
* This will show recently published events, up to 40 of them: | |
* events-slug/?ical=1&tribe_display=recently-published&tribe_posts_amount=40 | |
* | |
* This will show all events in the year 2012 | |
* events-slug/?ical=1&tribe_display=year&eventDate=2012 |
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 | |
/** | |
* Changes the recurrent events see all page to a different URL | |
*/ | |
Class Tribe__Snippet__Change_All_Link { | |
public $all_link_text; | |
public function __construct( $foo = 'all' ) { |
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 | |
/** | |
* Moved to https://github.com/danieliser/WP-Product-In-Dash-Review-Requests | |
*/ |
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
array( | |
// Require WordPress version 4.6.2 or higher. | |
'wordpress' => array( | |
'version' => '4.6.2' | |
), | |
// Require PHP version 5.3 or higher. | |
'php' => array( | |
'version' => '5.3', | |
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 | |
/** | |
* Sets the status of Community Events to the default status after they have been edited | |
* | |
* When you set Community submitted events to a status like "Pending Review" and a | |
* user submits a new event, it will be marked Pending Review and will not be visible | |
* until an admin publishes it. However if a user edits this event after it has been | |
* published, it will stay published. With this code it will instead go to Pending Review | |
* and will again be removed from public view until an admin republishes the event. |
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
.btn > .caret, .gform_button > .caret, | |
.dropup > .btn > .caret, | |
.dropup > .gform_button > .caret { | |
border-top-color: #000 !important; | |
} | |
.gform_fields { | |
padding-left: 0; | |
list-style: none; | |
margin-left: -15px; |
Paprika doesn't have their API documented, so this is me reverse-engineering it from an Android device
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 | |
/** | |
* Make sure the function does not exist before defining it | |
*/ | |
if( ! function_exists( 'remove_class_filter' ) ){ | |
/** | |
* Remove Class Filter Without Access to Class Object | |
* | |
* In order to use the core WordPress remove_filter() on a filter added with the callback |