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 | |
// .../wp-content/plugins/buddypress/bp-activity/classes/class-bp-activity-activity.php | |
// ... | |
/** | |
* Database interaction class for the BuddyPress activity component. | |
* Instance methods are available for creating/editing an activity, | |
* static methods for querying activities. |
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
import React, { Component } from 'react'; | |
class Answer extends Component { | |
constructor(){ | |
super(); | |
// Binding handleChange to 'this' | |
this.handleChange = this.handleChange.bind(this); | |
} | |
handleChange(e) { | |
// Using the passed method setAnswer to set the answer. |
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 | |
// ... | |
class WC_Product_Type_Plugin { | |
/** | |
* Build the instance | |
*/ | |
public function __construct() { |
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 | |
namespace MySettingsFramework; | |
abstract class Settings { | |
/** | |
* Setting ID. Prefixes all options. | |
* @var string | |
*/ |
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
/** | |
* ReactDOM v15.3.0 | |
* | |
* Copyright 2013-present, Facebook, Inc. | |
* All rights reserved. | |
* | |
* This source code is licensed under the BSD-style license found in the | |
* LICENSE file in the root directory of this source tree. An additional grant | |
* of patent rights can be found in the PATENTS file in the same directory. | |
* |
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 | |
class WPQR { | |
/** | |
* Enqueue Public Scripts | |
* @return void | |
*/ | |
public function enqueue() { | |
if ( is_singular( array( 'post', 'page' ) ) ) { | |
global $post; |
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 | |
/** | |
* This class can be used as an installer class to install tables and such. | |
* And it can be also used to make updates. | |
*/ | |
class My_Plugin_Installer() { | |
/** | |
* Update functions for versions. |
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 | |
class IBenic_WordPress_Metabox extends WordPressSettings { | |
protected $title = ''; | |
protected $slug = ''; | |
protected $post_types = array(); |
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 | |
abstract class WordPressSettings { | |
/** | |
* ID of the settings | |
* @var string | |
*/ | |
public $settings_id = ''; | |
/** | |
* Tabs for the settings page |
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 | |
function rewriting_resources($wp_rewrite) { | |
$rules = array(); | |
$terms = get_terms( array( | |
'taxonomy' => 'resource_type', | |
'hide_empty' => false, | |
) ); | |
$post_type = 'resources'; |