こんにちは現在、私はReduxのフレームワークを使用していたオプションのためにも、ライブの天気を示すための私のワードプレスのテーマでシンプルな天気JS(http://simpleweatherjs.com/)を使用していますシンプルな天気JSのためにReduxのフレームワークテキストフィールドのオプションを使用します。私は「あなたの街の名前」のテキストフィールドを作成してきたし、私のオプションユニークID>は「CPV-HM-CAT-OP-8」です。マイReduxのフレームワークオプションのプレビューは以下の通りです。はどのように
array(
'id' => 'cpv-hm-cat-op-8',
'type' => 'text',
'title' => __('Name of your city', 'redux'),
'desc' => __('Write your city which you want to show in weather', 'redux'),
'default' => 'New York',
),
は今、私は私の簡単な気象JSファイルにそのオプションを使用したいと私は私の町の私の出力、I入力名、その都市の天候でのショーをしたいです。単純な天気jsオプションのように見える=>
$.simpleWeather({
location: 'New Jersey',
woeid: '',
unit: 'c',
success: function(weather) {
html = '<h2><i class="symbol-weather icon-'+weather.code+'"></i> '+weather.temp+'°'+weather.units.temp+'</h2>';
html += '<ul><li>'+weather.city+'</li>';
$("#weather").html(html);
},
error: function(error) {
$("#weather").html('<p>'+error+'</p>');
}
});
ここで私のreduxのプラグインオプションを追加したい。しかしそれは働かない。
$.simpleWeather({
location: '<?php global $cpv; echo $cpv['cpv-hm-cat-op-8'];?>',
私のreduxフレームワークオプションを追加するにはどうすればよいですか?