get_results($sql); foreach($persons as $person) { $html .= '
'; if($person->image != '') { $html .= '
'; $html .= ''; $html .= '
'; } $html .= '
'; if(get_locale() == 'fi') { $html .= '

' . $person->title . '

'; } else { $html .= '

' . $person->title_en . '

'; } $html .= '
' . $person->firstname . ' ' . $person->lastname . '
'; $html .= '
' . $person->phone . '
'; $html .= '
'; /* echo $person->id . '
'; echo $person->firstname . '
'; echo $person->lastname . '
'; echo $person->title . '
'; echo $person->phone . '
'; echo $person->image . '
'; */ $html .= '
'; } //print_r($person); // $db->query( $sql ); /* foreach( $db->result as $k => $v ) { print_r($k); print_r($v); } */ // return $html; //return 'test id: ' . $id; // } return $html; } return $html; } function henkilot_enqueued_assets() { // wp_enqueue_script( 'script-psoas-henkilot', plugin_dir_url( __FILE__ ) . 'js/psoas-henkilot.js', array( 'jquery' ), '1.0', true ); wp_enqueue_style('style-psoas-henkilot', plugin_dir_url( __FILE__ ) . 'css/psoas-henkilot.css'); } add_shortcode('henkilo', 'psoas_henkilo'); add_action( 'wp_enqueue_scripts', 'henkilot_enqueued_assets' ); ?> 'Alppila', // 2 => 'Dorms of exchange students', 3 => 'Höyhtyä', 4 => 'Kaijonharju', 5 => 'Keskusta', 6 => 'Linnanmaa', 7 => 'Peltola', 13 => 'Peltola, Kurkelantie 8', 8 => 'Rajakylä', 9 => 'Raksila - Välkkylä', 10 => 'Syynimaa', 11 => 'Toivoniemi', 12 => 'Toppila', 14 => 'Virkakatu 3', 15 => 'Virkakatu 5 & 8' ); // if(isset($_REQUEST['mode') && $_REQUEST['mode'] == 'test') { $html = '
'; if(ICL_LANGUAGE_CODE == 'en') { $html .= '

Check the recycling possibilities of your property here!

'; } else { $html .= '

Tarkista kiinteistösi kierrätysmahdollisuudet tästä!

'; } $html .= ''; $html .= file_get_contents(plugin_dir_path( __FILE__ ) . '/layouts/'. ICL_LANGUAGE_CODE . '-jatteet.html'); $html .= '
'; return $html; // } } function jatehuolto_lajittelu_info() { $info = file_get_contents(plugin_dir_path( __FILE__ ) . '/layouts/'. ICL_LANGUAGE_CODE . '-info.html'); $path = plugins_url() . '/psoas_lajittelu/'; $info = str_replace('{PATH}', $path, $info); return $info; } function my_enqueued_assets() { wp_enqueue_script( 'script-psoas-lajittelu', plugin_dir_url( __FILE__ ) . 'js/psoas-lajittelu.js', array( 'jquery' ), '1.0', true ); wp_enqueue_style('style-psoas-lajittelu', plugin_dir_url( __FILE__ ) . 'css/psoas-lajittelu.css'); } add_shortcode('jatehuolto_lajittelu_valikko', 'jatehuolto_lajittelu_valikko'); add_shortcode('jatehuolto_lajittelu_info', 'jatehuolto_lajittelu_info'); add_action( 'wp_enqueue_scripts', 'my_enqueued_assets' ); ?> {"version":"1.0","provider_name":"PSOAS","provider_url":"http:\/\/ww2.psoas.fi","author_name":"Perttu","author_url":"http:\/\/ww2.psoas.fi\/author\/perttu\/","title":"Etusivu","type":"rich","width":600,"height":338,"html":"
Etusivu<\/a><\/blockquote>\n