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 List Table Example | |
Plugin URI: http://www.mattvanandel.com/ | |
Description: A highly documented plugin that demonstrates how to create custom List Tables using official WordPress APIs. | |
Version: 1.3 | |
Author: Matt Van Andel | |
Author URI: http://www.mattvanandel.com | |
License: GPL2 | |
*/ |
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 | |
/** | |
* @since ming 1.0.0 | |
**/ | |
get_header(); ?> | |
<div id="content"> | |
<div class="container"> | |
<div id="main"> | |
<div id="breadcrumb" itemprop="breadcrumb"><a href="<?php echo esc_url( home_url() ); ?>" rel="nofollow"><?php _e( 'Home', 'ming' ); ?></a> / <?php the_category(' | ') ?> |
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
/** | |
* Show some info about movies in post view. | |
* | |
* Add a filter on the_content hook to display infos selected in options | |
* about the movie: year, director, actors... | |
* | |
* @since 1.0.0 | |
* | |
* @param string $content The original post content |
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 | |
/** | |
* WPMovieLibrary Utils Class extension. | |
* | |
* This class contains various tools needed by WPML such as array manipulating | |
* filters, terms ordering methods or permalinks creation. | |
* | |
* @package WPMovieLibrary | |
* @author Charlie MERLAND <charlie@caercam.org> | |
* @license GPL-3.0 |
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
function wpmoly_suffix( $post_link, $post, $leavename, $sample ) { | |
if ( 'movie' != get_post_type( $post ) ) | |
return $post_link; | |
$post_link = str_replace( $post->post_name, $post->post_name . '-value', $post_link ); | |
return $post_link; | |
} | |
add_filter( 'post_type_link', 'wpmoly_suffix', 10, 4 ); |
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 release date to a movie's title | |
* | |
* Add this at then end of your theme's functions.php file | |
* | |
* @deprecated since WordPress 4.4 | |
* | |
* @param string Current, unfiltered movie title |
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 | |
/** | |
* Update all movie titles to include movie date. | |
* | |
* @package WordPress | |
*/ | |
require( dirname( __FILE__ ) . '/wp-blog-header.php' ); | |
$query = new WP_Query( |
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 | |
/** | |
* Restore all movie titles including movie date to simple movie title. | |
* | |
* @package WordPress | |
*/ | |
require( dirname( __FILE__ ) . '/wp-blog-header.php' ); | |
$query = new WP_Query( |
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
function wpmoly_remove_headbox_tabs( $tabs ) { | |
unset( $tabs['meta'], $tabs['details'] ); | |
return $tabs; | |
} | |
add_filter( 'wpmoly_filter_headbox_menu_link', 'wpmoly_remove_headbox_tabs', 10, 1 ); | |
add_filter( 'wpmoly_filter_headbox_menu_tabs', 'wpmoly_remove_headbox_tabs', 10, 1 ); |
OlderNewer