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
<textarea style="width: 100%; height: 299px;" onclick="select();"> | |
<?php | |
$args = array( | |
'post_type' => array( 'post', 'page', 'media', 'news' ), | |
'posts_per_page' => -1, | |
); | |
echo 'Title of page, URL of Page'. PHP_EOL; | |
$dump = new WP_Query($args); | |
if($dump->have_posts()){ | |
while($dump->have_posts()){ |
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
// ==UserScript== | |
// @name Easy Browse freedownloadbd.com | |
// @namespace http://facebook.com/kudratullah/ | |
// @version 9.80 | |
// @description Script for Easy Category Browsing in freedownloadbd.com | |
// @match *.freedownloadbd.com/* | |
// @include *.freedownloadbd.com/* | |
// @exclude *.freedownloadbd.com/index.php/component/search/* | |
// @require http://code.jquery.com/jquery-2.1.4.min.js | |
// @require http://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.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
/** | |
* See: https://gist.github.com/1847816 | |
* See: http://stackoverflow.com/questions/736513/how-do-i-parse-a-url-into-hostname-and-path-in-javascript | |
* Parse a URI, returning an object similar to Location | |
* Usage: var uri = parseUri("hello?search#hash") | |
*/ | |
function parseUri(url) { | |
var result = {}; |
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 | |
/** | |
* This will copy all terms from country taxonomy to area taxonomy | |
* this will also include the child terms, but will not place them in right hierarchy | |
* for this please check the wp_insert_term() [ https://codex.wordpress.org/Function_Reference/wp_insert_term ] argument in codex and modify the loop | |
* @uses wp_insert_term() | |
* @return boolean | |
*/ | |
function CopyTermsToOtherTaxonomy(){ | |
static $done; |
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 | |
global $current_user; | |
$ThisMonthArgs = array( | |
'post_type' => 'post', | |
'author'=> $current_user->ID, | |
'posts_per_page' => -1, | |
'date_query' => array( | |
array( | |
'column' => 'post_modified_gmt', | |
'after' => array( |
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(!function_exists("redirect_non_admin_users")): | |
/** | |
* Redirect non-admin users to home page | |
*/ | |
function redirect_non_admin_users() { | |
global $currentUser; | |
if ( is_admin() && ! current_user_can( 'manage_options' ) | |
&& '/wp-admin/admin-ajax.php' != $_SERVER['PHP_SELF'] | |
&& ! ( defined( 'DOING_AJAX' ) && 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 | |
if(!function_exists('sekaiju_login_page')): | |
/** | |
* Change Default Login Url Regurned by wp_login_url() | |
* @param string $login_url | |
* @param string $redirect | |
* @return string | |
*/ | |
add_filter( 'login_url', 'custom_login_url', 10, 2 ); | |
function custom_login_url( $login_url, $redirect ) { |
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 | |
//issue: cmb2 metabox form getting wrong object_id for user edit form, so it's can't display the meta values stored in database. | |
//cmb2 veriosn 2.2.1 | |
add_action( 'cmb2_init', 'UserMetabox' ); | |
function UserMetabox(){ | |
$cmb_user_fields = new_cmb2_box( array( | |
'id' => '_user_info', | |
'title' => 'User Extras', | |
'object_types' => array( 'user' ), // Tells CMB2 to use user_meta vs post_meta | |
'show_names' => true, |
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
// ==UserScript== | |
// @name LolipopWebmail | |
// @namespace github.com/Kudratullah | |
// @version 1.1.9 | |
// @description Some Tweaks and English Translation for Lolipop Webmail UI | |
// @author Kudratullah <[email protected]> | |
// @updateURL https://gist.githubusercontent.com/Kudratullah/83c57ea87c1c0aaf81968c7db83bba1a/raw/LolipopWebmail.user.js | |
// @downloadURL https://gist.githubusercontent.com/Kudratullah/83c57ea87c1c0aaf81968c7db83bba1a/raw/LolipopWebmail.user.js | |
// @match https://tools.lolipop.jp/mail/mail* | |
// @icon https://tools.lolipop.jp/mail/mail/img/title.png |
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
/** | |
* Extend Core UI Button Style And Size for custom dashboard | |
* @version 1.0.0 | |
* @copyright KD <[email protected]> | |
* @license MIT | |
* @see https://github.com/markjaquith/WordPress/blob/master/wp-admin/css/colors/_admin.scss | |
* @see https://github.com/markjaquith/WordPress/blob/master/wp-admin/css/colors/_mixins.scss | |
* @todo input styles | |
*/ | |
@mixin button( $button-color, $text-color: #fff ) { |