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 | |
| function my_custom_shortcode($params) { | |
| echo 'Hello World! You specified the following parameters: ' . $params['param1'] . ' and ' . $params['param2']; | |
| } | |
| add_shortcode('hello_world', 'my_custom_shortcode'); | |
| ?> |
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 | |
| function my_custom_shortcode() { | |
| echo 'Hello World!'; | |
| } | |
| add_shortcode('hello_world', 'my_custom_shortcode'); | |
| ?> |
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 Mon_Widget extends WP_Widget { | |
| // Définit le constructeur | |
| function __construct() { | |
| $widget_ops = array( | |
| 'classname' => 'mon_widget', | |
| 'description' => 'Affiche le titre du site Web.' | |
| ); | |
| parent::__construct( 'mon_widget', 'Mon Widget', $widget_ops ); |
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 | |
| /** | |
| * Add a 1% surcharge to your cart / checkout based on delivery country | |
| * Taxes, shipping costs and order subtotal are all included in the surcharge amount | |
| */ | |
| add_action( 'woocommerce_cart_calculate_fees',' woocommerce_custom_surcharge' ); | |
| function woocommerce_custom_surcharge() { | |
| global $woocommerce; | |
| if ( is_admin() && ! defined( 'DOING_AJAX' ) ) |
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 WeAreWP_Add_Blog_Order { | |
| public static function init() { | |
| $class = __CLASS__ ; | |
| if ( empty( $GLOBALS[ $class ] ) ) | |
| $GLOBALS[ $class ] = new $class; | |
| } | |
| public function __construct() { | |
| add_filter( 'wpmu_blogs_columns', array( $this, 'get_id' ) ); | |
| add_action( 'manage_sites_custom_column', array( $this, 'add_columns' ), 10, 2 ); |
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 | |
| function check_url($url) { | |
| $ch = curl_init(); | |
| curl_setopt($ch, CURLOPT_URL, $url); | |
| curl_setopt($ch, CURLOPT_HEADER, 1); | |
| curl_setopt($ch , CURLOPT_RETURNTRANSFER, 1); | |
| $data = curl_exec($ch); | |
| $headers = curl_getinfo($ch); | |
| curl_close($ch); |
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 | |
| // [jour] => mardi | |
| add_shortcode( 'jour', 'waw_shortcode_jour' ); | |
| function waw_shortcode_jour() { | |
| return date_i18n('l'); | |
| } | |
| // [mois] => mars | |
| add_shortcode( 'mois', 'waw_shortcode_mois' ); | |
| function waw_shortcode_mois() { |
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
| (function($) { | |
| jQuery( document ).ready(function($) { | |
| // external links to new window | |
| add_target_blank_to_external_links(); | |
| // force PDF Files to open in new window | |
| add_target_blank_to_pdf_links(); | |
| }); |
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 | |
| function is_beaver_builder_layout() { | |
| if( class_exists( 'FLBuilderModel' ) && FLBuilderModel::is_builder_enabled() ) { | |
| return true; | |
| } else { | |
| return false; | |
| } | |
| } | |
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' ) ) { | |
| exit; // Silence is golden. | |
| } | |
| ?> | |
| <?php get_header(); ?> | |
| <div class="fl-archive <?php FLLayout::container_class(); ?>"> | |
| <div class="<?php FLLayout::row_class(); ?>"> |