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 | |
/** | |
* Supply a user id and an access token | |
* Jelled explains how to obtain a user id and access token in the link provided | |
* @link http://jelled.com/instagram/access-token | |
*/ | |
$userid = ""; | |
$accessToken = ""; | |
// Get our data | |
function fetchData($url){ |
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 | |
// Creating tables in Single site installations | |
function on_activate() { | |
create_table(); | |
} | |
function create_table() { | |
global $wpdb; | |
$table_name = $wpdb->prefix . 'table_name'; |
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 | |
/** | |
* @package Faiyaz_Custom_WC_Status | |
* @version 1.6 | |
*/ | |
/* | |
Plugin Name: Custom WooCommerce Status | |
Description: This is a custom plugin for woocommerce. This will add some custom bulk action in order listing. | |
Author: Faiyaz Alam | |
Version: 1.0 |
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
//For Primary Blog | |
UPDATE `wp_options` SET `option_value`='http://www.test.com' WHERE `option_name`='siteurl'; | |
UPDATE `wp_options` SET `option_value`='http://www.test.com' WHERE `option_name`='home'; | |
//For Secondary Blog | |
UPDATE `wp_2_options` SET `option_value`='http://www.test.com/blog_2' WHERE `option_name`='siteurl'; | |
UPDATE `wp_2_options` SET `option_value`='http://www.test.com/blog_2' WHERE `option_name`='home'; | |
//Repeat the above codes for all the remaining blogs | |
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: EDD Heartbeat API test plugin | |
* Description: Demonstrates how to use the Heartbeat API to update the payments count on the dashboard | |
*/ | |
// Load the heartbeat JS | |
function edd_heartbeat_enqueue( $hook_suffix ) { | |
// Make sure the JS part of the Heartbeat API is loaded. | |
wp_enqueue_script( 'heartbeat' ); |
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: WordPress - WP_List_Table - Custom | |
*/ | |
add_action( 'admin_menu','register_my_custom_menu_page'); | |
function register_my_custom_menu_page(){ | |
global $new_menu_page; | |
// creating admin menu |
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
//In service file: /var/www/html/pimcore/src/AppBundle/Resources/config/services.yml | |
AppBundle\EventListener\TestListener: | |
tags: | |
- { name: kernel.event_listener, event: kernel.request } | |
//In listner file: /var/www/html/pf/src/AppBundle/EventListener/UserListener.php | |
use Symfony\Component\HttpKernel\Event\GetResponseEvent; | |
class TestListener { |
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
use Pimcore\Db; | |
$sql = "SELECT * from table_name where`id` = ?"; | |
$stmt = Db::get()->prepare($sql); | |
$stmt->bindParam(1, 101, \PDO::PARAM_INT); | |
$stmt->execute(); | |
$result = $stmt->fetchAll(); |
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
<VirtualHost *:80> | |
ServerName pim553bundle.local | |
DocumentRoot /var/www/html/pimcore/web | |
<Directory /var/www/html/pimcore/web/> | |
Options FollowSymLinks MultiViews | |
AllowOverride All | |
Order allow,deny | |
allow from all | |
</Directory> | |
</VirtualHost> |
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 | |
/** | |
* Insert a value or key/value pair after a specific key in an array. If key doesn't exist, value is appended | |
* to the end of the array. | |
* | |
* @param array $array | |
* @param string $key | |
* @param array $new | |
* |
OlderNewer