Skip to content
This repository was archived by the owner on Aug 19, 2022. It is now read-only.

Commit

Permalink
updated to version 1.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
josantonius committed Mar 2, 2018
1 parent 110faf6 commit cb554e3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions src/controller/class-launcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public function set_language() {

$plugin_slug = App::EFG()->getOption( 'slug' );
$module_slug = Module::CopyMovieGrifus()->getOption( 'slug' );

$path = $plugin_slug . '/modules/' . $module_slug . '/languages/';

load_plugin_textdomain( $plugin_slug . '-copy', false, $path );
Expand All @@ -72,9 +73,12 @@ public function set_language() {
protected function add_scripts() {

$js = Module::CopyMovieGrifus()->getOption( 'assets', 'js' );

$setting = $js['copyMovieGrifus'];

$params = Module::CopyMovieGrifus()->getControllerInstance( 'Copy' )
->getMovieInfo();

$setting['params'] = array_merge( $setting['params'], $params );

WP_Register::add( 'script', $setting );
Expand Down
7 changes: 4 additions & 3 deletions src/model/front/class-copy.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ class Copy extends Model {
*/
public function getMovieInfo() {

$post_id = get_the_ID();
$post_title = get_the_title();
$post_id = get_the_ID();
$post_title = get_the_title();
$content_post = get_post( $post_id );

$post_content = $content_post->post_content;
Expand All @@ -47,6 +47,7 @@ public function getMovieInfo() {

foreach ( $movie as $key => $value ) {
$data = info_movie_get_meta( $key );

$movie[ $key ] .= ( $data ) ? ': ' . $data : ': ';
}

Expand All @@ -64,7 +65,7 @@ public function getMovieInfo() {
$movie['Sipnosis'] .= ': ';
$movie['Sipnosis'] .= ( $post_content ) ? $post_content : '';

$movie['Director'] = __( 'Director', 'extensions-for-grifus-copy' );
$movie['Director'] = __( 'Director', 'extensions-for-grifus-copy' );
$movie['Director'] .= ': ';

$director = wp_get_post_terms( $post_id, 'director' );
Expand Down

0 comments on commit cb554e3

Please sign in to comment.