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
var gulp = require('gulp'), | |
browserify = require('browserify'), | |
babel = require('babelify'), | |
source = require('vinyl-source-stream'), | |
rename = require('gulp-rename'); | |
function executeBundle(bundle) { | |
return bundle | |
.bundle() | |
.on("error", function (err) { console.log("Error : " + err.message); }) |
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 Saleh_Submit_Ticket_Form_Shortcode extends Incsub_Support_Shortcode { | |
public function __construct() { | |
add_action( 'template_redirect', array( $this, 'process_form' ) ); | |
add_shortcode( 'support-system-submit-ticket-form', array( $this, 'render' ) ); | |
} |
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: React Plugin | |
*/ | |
class React_Plugin { | |
private $page_id; | |
public 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
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import App from './App'; | |
ReactDOM.render(<App />, document.getElementById('app') ); |
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
import React from 'react'; | |
export default class App extends React.Component { | |
render() { | |
return <div>Hello WordPress</div>; | |
} | |
} |
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: React Plugin | |
*/ | |
class React_Plugin { | |
private $page_id; | |
public 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
<?php | |
if ( $is_divi_builder_loaded ) { | |
// This won't activate minification while Divi builder is loaded in front | |
add_filter( 'wp_hummingbird_is_active_module_minify', '__return_false', 50 ); | |
} | |
// Don't minify Divi assets in any case | |
add_filter( 'wphb_minify_resource', function( $minify, $handle, $type ) { |
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 Jetpack_Mandatory_Modules { | |
public function __construct() { | |
$active_plugins = get_option( 'active_plugins' ); | |
if ( ! in_array( 'jetpack/jetpack.php', $active_plugins ) ) { | |
// Jetpack está desactivado pero lo vamos a cargar y ocultar |
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 Jetpack_Mandatory_Modules { | |
public function __construct() { | |
add_action( 'plugins_loaded', array( $this, 'load_base_jetpack' ) ); | |
// Este hook marcará los módulos obligatorios como activados | |
// aquellos obligatorios que nosotros queremos |
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 My_Form_Submit_Ticket_Form_Shortcode extends Incsub_Support_Shortcode { | |
public function __construct() { | |
add_action( 'template_redirect', array( $this, 'process_form' ) ); | |
add_shortcode( 'support-system-submit-ticket-form', array( $this, 'render' ) ); | |
} | |
public function process_form() { | |
if ( isset( $_POST['support-system-submit-ticket'] ) && incsub_support_current_user_can( 'insert_ticket' ) ) { |