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 | |
| class Singleton { | |
| private static $instance; | |
| private function __construct() { | |
| // Private constructor to prevent instantiation. | |
| } | |
| public static function getInstance() { |
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
| class Car { | |
| private string $model; | |
| public static function createSportsCar() { | |
| $car = new Car(); | |
| $car->setModel('Sports Car'); | |
| return $car; | |
| } | |
| private function setModel(string $model) |
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 | |
| // The Query. | |
| $the_query = new WP_Query([ | |
| 'category_name' => 'news', | |
| 'posts_per_page' => 5, | |
| 'ignore_sticky_posts' => true | |
| ]); | |
| // The Loop. | |
| if ( $the_query->have_posts() ) { |
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 | |
| /* | |
| Plugin Name: R Debug | |
| Description: Set of dump helpers for debug. | |
| Author: Andrey "Rarst" Savchenko | |
| Author URI: https://www.rarst.net/ | |
| License: MIT | |
| */ |
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 | |
| /** | |
| * Created by PhpStorm. | |
| * User: e.kvasnyi | |
| * Date: 26.05.17 | |
| * Time: 19:02 | |
| */ | |
| class ZohoCrm { | |
| public $authtoken = 'e62981dc61f27a44b89a5a4a910833ea'; |
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 if ( ! defined( 'ABSPATH' ) ) { die( 'Tranquility - the highest manifestation of power!' ); } | |
| class Widget_Online_Support extends WP_Widget { | |
| /** | |
| * Widget constructor. | |
| */ | |
| private $options; | |
| private $prefix; | |
| 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
| if ( ! function_exists( 'theme_slug_get_post_option' ) ) : | |
| function theme_slug_get_post_option($post_id, $name, $default = false ) { | |
| if (defined('FW')) { | |
| $options = fw_get_db_post_option($post_id, $name ); | |
| if ( isset( $options ) ) { | |
| return $options; | |
| }else{ | |
| return $default; | |
| } | |
| } else { |
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
| if ( ! function_exists( 'theme_prefix_get_option' ) ) : | |
| function theme_prefix_get_option( $name, $default = false ) { | |
| if (defined('FW')) { | |
| $options = fw_get_db_settings_option( $name ); | |
| if ( isset( $options ) ) { | |
| return $options; | |
| }else{ | |
| return $default; | |
| } | |
| } else { |
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 | |
| /** | |
| * Create Permalink Setting. | |
| * | |
| * @package at_helpdesk | |
| * @copyright Copyright (c) 2015, Cvasnii Evghenii | |
| * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License | |
| * @since 1.0.0 | |
| */ |
NewerOlder