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 # -*- coding: utf-8 -*- | |
/** | |
* Plugin Name: T5 Temporary Internal Links | |
* Description: Changes the URLs from the Internal Link dialog to /?p=123. | |
* Plugin URI: | |
* Version: 2012.09.16 | |
* Author: Thomas Scholz | |
* Author URI: http://toscho.de | |
* License: MIT | |
* License URI: http://www.opensource.org/licenses/mit-license.php |
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: | |
* Plugin Author: | |
* Plugin URI: | |
*/ | |
require_once realpath(dirname(__FILE__) . '/google-api-php-client/src/Google/autoload.php'); | |
session_start(); | |
global $analytica_db_version; |
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: | |
* Plugin Author: | |
* Plugin URI: | |
*/ | |
require_once realpath(dirname(__FILE__) . '/google-api-php-client/src/Google/autoload.php'); | |
session_start(); | |
global $analytica_db_version; |
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: | |
* Plugin Author: | |
* Plugin URI: | |
*/ | |
require_once realpath(dirname(__FILE__).'/google-api-php-client/src/Google/autoload.php'); | |
session_start(); |
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 | |
/** Bootstrap WordPress */ | |
include('./wp-load.php'); | |
/** | |
* Generate some random data | |
*/ | |
$data = array(); | |
$iterations = 10; |
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 Database | |
{ | |
private $conn; | |
private $handle; | |
public function __construct() | |
{ | |
$dbhost = "localhost"; | |
$dbname = "pdo_test"; |
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
Introducing pre_get_posts :- | |
------------------------------ | |
class WP_Query{ | |
function &get_posts(){ | |
$this->parse_query(); | |
//pre_get_posts() | |
do_action_ref_array( 'pre_get_posts', array( &$this ) ); | |
} | |
} |
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 widgetsite_template_manage($wp_customize){ | |
$wp_customize->add_section('theme_template_manage', array( | |
'title' => __('Layouts', 'widgetsite'), | |
'description' => '', | |
'priority' => 120, | |
)); | |
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 | |
// Define your keys here | |
define( 'RECAPTCHA_SITE_KEY', 'XXX' ); | |
define( 'RECAPTCHA_SECRET_KEY', 'XXX' ); | |
// Enqueue Google reCAPTCHA scripts | |
add_action( 'wp_enqueue_scripts', 'recaptcha_scripts' ); | |
function recaptcha_scripts() { | |
wp_enqueue_script( 'recaptcha', 'https://www.google.com/recaptcha/api.js' ); |
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
/* add new tab called "mytab" */ | |
add_filter('um_account_page_default_tabs_hook', 'my_custom_tab_in_um', 100 ); | |
function my_custom_tab_in_um( $tabs ) { | |
$tabs[800]['mytab']['icon'] = 'um-faicon-pencil'; | |
$tabs[800]['mytab']['title'] = 'My Custom Tab'; | |
$tabs[800]['mytab']['custom'] = true; | |
return $tabs; | |
} | |