Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/facebook.../admin
File: settings.php
</td>
[500] Fix | Delete
<td>
[501] Fix | Delete
[502] Fix | Delete
<div class="scroll_checkbox">
[503] Fix | Delete
<input type="checkbox" id="select_all_pages" > <?php _e('Select All','facebook-auto-publish'); ?>
[504] Fix | Delete
[505] Fix | Delete
<?php
[506] Fix | Delete
for($i=0;$i<$count;$i++)
[507] Fix | Delete
{
[508] Fix | Delete
$pgid=$data[$i]->id;
[509] Fix | Delete
$page_name[$pgid]=$data[$i]->name;
[510] Fix | Delete
?>
[511] Fix | Delete
<br><input type="checkbox" class="selpages" name="fbap_pages_list[]" value="<?php echo $data[$i]->id."-".$data[$i]->access_token;?>" <?php if(in_array($data[$i]->id, $fbap_pages_ids)) echo "checked" ?>><?php echo $data[$i]->name; ?>
[512] Fix | Delete
<?php }
[513] Fix | Delete
// $page_name=base64_encode(serialize($page_name));?>
[514] Fix | Delete
</div>
[515] Fix | Delete
</td></tr>
[516] Fix | Delete
<?php
[517] Fix | Delete
}elseif (get_option('xyz_fbap_app_sel_mode')==1)// &&pagelist frm smap solutions is not empty )
[518] Fix | Delete
{
[519] Fix | Delete
$xyz_fbap_page_names=stripslashes(get_option('xyz_fbap_page_names'));
[520] Fix | Delete
$xyz_fbap_secret_key=get_option('xyz_fbap_secret_key');
[521] Fix | Delete
?>
[522] Fix | Delete
<tr id="xyz_fbap_selected_pages_tr" style="<?php if($xyz_fbap_page_names=='')echo "display:none;";?>">
[523] Fix | Delete
<td> <?php _e('Selected facebook pages for auto publish','facebook-auto-publish'); ?> </td>
[524] Fix | Delete
<td><div>
[525] Fix | Delete
<div class="scroll_checkbox" id="xyz_fbap_selected_pages" style="float: left;">
[526] Fix | Delete
<?php
[527] Fix | Delete
if($xyz_fbap_page_names!=''){
[528] Fix | Delete
$xyz_fbap_page_names_array=json_decode($xyz_fbap_page_names);
[529] Fix | Delete
foreach ($xyz_fbap_page_names_array as $sel_pageid=>$sel_pagename)
[530] Fix | Delete
{
[531] Fix | Delete
?>
[532] Fix | Delete
<input type="checkbox" class="selpages" name="fbap_pages_list[]" value="<?php echo $sel_pageid;?>" disabled checked="checked"><?php echo $sel_pagename; ?><br>
[533] Fix | Delete
<?php }}
[534] Fix | Delete
?>
[535] Fix | Delete
</div>
[536] Fix | Delete
<div style="float: left;width: 10px;color: #ce5c19;font-size: 20px;">*</div>
[537] Fix | Delete
</div>
[538] Fix | Delete
[539] Fix | Delete
</td>
[540] Fix | Delete
</tr>
[541] Fix | Delete
<?php }
[542] Fix | Delete
?>
[543] Fix | Delete
<tr><td id="bottomBorderNone"></td>
[544] Fix | Delete
<td id="bottomBorderNone"><div style="height: 50px;">
[545] Fix | Delete
<input type="submit" class="submit_fbap_new"
[546] Fix | Delete
style=" margin-top: 10px; "
[547] Fix | Delete
name="fb" value="<?php _e('Save','facebook-auto-publish'); ?>" /></div>
[548] Fix | Delete
</td>
[549] Fix | Delete
</tr>
[550] Fix | Delete
<?php if(get_option('xyz_fbap_smapsoln_userid')==0){?>
[551] Fix | Delete
<tr><td style='color: #ce5c19;padding-left:0px;'>*<?php _e('Free trial is available only for first time users','facebook-auto-publish'); ?> </td></tr>
[552] Fix | Delete
<?php }
[553] Fix | Delete
else{?>
[554] Fix | Delete
<tr><td style='color: #ce5c19;padding-left:0px;'>*<?php _e('Use reauthorize button to change selected values','facebook-auto-publish'); ?> </td></tr>
[555] Fix | Delete
<?php }?>
[556] Fix | Delete
</table>
[557] Fix | Delete
</form>
[558] Fix | Delete
</div>
[559] Fix | Delete
[560] Fix | Delete
<?php
[561] Fix | Delete
[562] Fix | Delete
if(isset($_POST['bsettngs']))
[563] Fix | Delete
{
[564] Fix | Delete
if (! isset( $_REQUEST['_wpnonce'] )
[565] Fix | Delete
|| ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'xyz_fbap_basic_settings_form_nonce' )
[566] Fix | Delete
) {
[567] Fix | Delete
wp_nonce_ays( 'xyz_fbap_basic_settings_form_nonce' );
[568] Fix | Delete
exit();
[569] Fix | Delete
}
[570] Fix | Delete
$xyz_fbap_include_pages=intval($_POST['xyz_fbap_include_pages']);
[571] Fix | Delete
$xyz_fbap_include_posts=intval($_POST['xyz_fbap_include_posts']);
[572] Fix | Delete
$fbap_category_ids='';
[573] Fix | Delete
if($_POST['xyz_fbap_cat_all']=="All")
[574] Fix | Delete
$fbap_category_ids=$_POST['xyz_fbap_cat_all'];//radio btn name
[575] Fix | Delete
else if (isset($_POST['xyz_fbap_catlist']) && !empty($_POST['xyz_fbap_catlist']))
[576] Fix | Delete
{
[577] Fix | Delete
$fbap_category_ids=$_POST['xyz_fbap_catlist'];//dropdown
[578] Fix | Delete
$fbap_category_ids=implode(',', $fbap_category_ids);
[579] Fix | Delete
}
[580] Fix | Delete
[581] Fix | Delete
$xyz_customtypes="";
[582] Fix | Delete
if(isset($_POST['post_types']))
[583] Fix | Delete
$xyz_customtypes=$_POST['post_types'];
[584] Fix | Delete
[585] Fix | Delete
$xyz_fbap_peer_verification=intval($_POST['xyz_fbap_peer_verification']);
[586] Fix | Delete
$xyz_fbap_premium_version_ads=intval($_POST['xyz_fbap_premium_version_ads']);
[587] Fix | Delete
$xyz_fbap_default_selection_edit=intval($_POST['xyz_fbap_default_selection_edit']);
[588] Fix | Delete
$xyz_fbap_default_selection_create=intval($_POST['xyz_fbap_default_selection_create']);
[589] Fix | Delete
// $xyz_fbap_utf_decode_enable=intval($_POST['xyz_fbap_utf_decode_enable']);
[590] Fix | Delete
$fbap_customtype_ids="";
[591] Fix | Delete
$xyz_fbap_applyfilters="";
[592] Fix | Delete
if(isset($_POST['xyz_fbap_applyfilters']))
[593] Fix | Delete
$xyz_fbap_applyfilters=$_POST['xyz_fbap_applyfilters'];
[594] Fix | Delete
[595] Fix | Delete
[596] Fix | Delete
if($xyz_customtypes!="")
[597] Fix | Delete
{
[598] Fix | Delete
for($i=0;$i<count($xyz_customtypes);$i++)
[599] Fix | Delete
{
[600] Fix | Delete
$fbap_customtype_ids.=$xyz_customtypes[$i].",";
[601] Fix | Delete
}
[602] Fix | Delete
}
[603] Fix | Delete
$fbap_customtype_ids=rtrim($fbap_customtype_ids,',');
[604] Fix | Delete
[605] Fix | Delete
$xyz_fbap_applyfilters_val="";
[606] Fix | Delete
if($xyz_fbap_applyfilters!="")
[607] Fix | Delete
{
[608] Fix | Delete
for($i=0;$i<count($xyz_fbap_applyfilters);$i++)
[609] Fix | Delete
{
[610] Fix | Delete
$xyz_fbap_applyfilters_val.=$xyz_fbap_applyfilters[$i].",";
[611] Fix | Delete
}
[612] Fix | Delete
}
[613] Fix | Delete
$xyz_fbap_applyfilters_val=rtrim($xyz_fbap_applyfilters_val,',');
[614] Fix | Delete
[615] Fix | Delete
update_option('xyz_fbap_apply_filters',$xyz_fbap_applyfilters_val);
[616] Fix | Delete
update_option('xyz_fbap_include_pages',$xyz_fbap_include_pages);
[617] Fix | Delete
update_option('xyz_fbap_include_posts',$xyz_fbap_include_posts);
[618] Fix | Delete
if($xyz_fbap_include_posts==0)
[619] Fix | Delete
update_option('xyz_fbap_include_categories',"All");
[620] Fix | Delete
else
[621] Fix | Delete
update_option('xyz_fbap_include_categories',$fbap_category_ids);
[622] Fix | Delete
update_option('xyz_fbap_include_customposttypes',$fbap_customtype_ids);
[623] Fix | Delete
update_option('xyz_fbap_peer_verification',$xyz_fbap_peer_verification);
[624] Fix | Delete
update_option('xyz_fbap_premium_version_ads',$xyz_fbap_premium_version_ads);
[625] Fix | Delete
update_option('xyz_fbap_default_selection_edit',$xyz_fbap_default_selection_edit);
[626] Fix | Delete
update_option('xyz_fbap_default_selection_create',$xyz_fbap_default_selection_create);
[627] Fix | Delete
// update_option('xyz_fbap_utf_decode_enable',$xyz_fbap_utf_decode_enable);
[628] Fix | Delete
}
[629] Fix | Delete
$xyz_credit_link=get_option('xyz_credit_link');
[630] Fix | Delete
$xyz_fbap_include_pages=get_option('xyz_fbap_include_pages');
[631] Fix | Delete
$xyz_fbap_include_posts=get_option('xyz_fbap_include_posts');
[632] Fix | Delete
$xyz_fbap_include_categories=get_option('xyz_fbap_include_categories');
[633] Fix | Delete
/*if ($xyz_fbap_include_categories!='All')
[634] Fix | Delete
$xyz_fbap_include_categories=explode(',', $xyz_fbap_include_categories);*/
[635] Fix | Delete
$xyz_fbap_include_customposttypes=get_option('xyz_fbap_include_customposttypes');
[636] Fix | Delete
$xyz_fbap_apply_filters=get_option('xyz_fbap_apply_filters');
[637] Fix | Delete
$xyz_fbap_peer_verification=get_option('xyz_fbap_peer_verification');
[638] Fix | Delete
$xyz_fbap_premium_version_ads=get_option('xyz_fbap_premium_version_ads');
[639] Fix | Delete
$xyz_fbap_default_selection_edit=get_option('xyz_fbap_default_selection_edit');
[640] Fix | Delete
$xyz_fbap_default_selection_create=get_option('xyz_fbap_default_selection_create');
[641] Fix | Delete
// $xyz_fbap_utf_decode_enable=get_option('xyz_fbap_utf_decode_enable');
[642] Fix | Delete
?>
[643] Fix | Delete
<div id="xyz_fbap_basic_settings" class="xyz_fbap_tabcontent">
[644] Fix | Delete
<form method="post">
[645] Fix | Delete
<?php wp_nonce_field( 'xyz_fbap_basic_settings_form_nonce' );?>
[646] Fix | Delete
<table class="widefat xyz_fbap_widefat_table" style="width: 99%">
[647] Fix | Delete
<tr><td><h2> <?php _e('Basic Settings','facebook-auto-publish'); ?> </h2></td></tr>
[648] Fix | Delete
<tr valign="top">
[649] Fix | Delete
<td colspan="1"> <?php _e('Publish wordpress `posts` to facebook','facebook-auto-publish'); ?>
[650] Fix | Delete
</td>
[651] Fix | Delete
<td class="switch-field">
[652] Fix | Delete
<label id="xyz_fbap_include_posts_yes"><input type="radio" name="xyz_fbap_include_posts" value="1" <?php if($xyz_fbap_include_posts==1) echo 'checked';?>/> <?php _e('Yes','facebook-auto-publish'); ?> </label>
[653] Fix | Delete
<label id="xyz_fbap_include_posts_no"><input type="radio" name="xyz_fbap_include_posts" value="0" <?php if($xyz_fbap_include_posts==0) echo 'checked';?>/> <?php _e('No','facebook-auto-publish'); ?> </label>
[654] Fix | Delete
</td>
[655] Fix | Delete
</tr>
[656] Fix | Delete
[657] Fix | Delete
<tr valign="top">
[658] Fix | Delete
<td colspan="1" width="50%"> <?php _e('Publish wordpress `pages` to facebook','facebook-auto-publish'); ?>
[659] Fix | Delete
</td>
[660] Fix | Delete
<td class="switch-field">
[661] Fix | Delete
<label id="xyz_fbap_include_pages_yes"><input type="radio" name="xyz_fbap_include_pages" value="1" <?php if($xyz_fbap_include_pages==1) echo 'checked';?>/> <?php _e('Yes','facebook-auto-publish'); ?> </label>
[662] Fix | Delete
<label id="xyz_fbap_include_pages_no"><input type="radio" name="xyz_fbap_include_pages" value="0" <?php if($xyz_fbap_include_pages==0) echo 'checked';?>/> <?php _e('No','facebook-auto-publish'); ?> </label>
[663] Fix | Delete
</td>
[664] Fix | Delete
</tr>
[665] Fix | Delete
[666] Fix | Delete
<?php
[667] Fix | Delete
$xyz_fbap_hide_custompost_settings='';
[668] Fix | Delete
$args=array(
[669] Fix | Delete
'public' => true,
[670] Fix | Delete
'_builtin' => false
[671] Fix | Delete
);
[672] Fix | Delete
$output = 'names'; // names or objects, note names is the default
[673] Fix | Delete
$operator = 'and'; // 'and' or 'or'
[674] Fix | Delete
$post_types=get_post_types($args,$output,$operator);
[675] Fix | Delete
[676] Fix | Delete
$ar1=explode(",",$xyz_fbap_include_customposttypes);
[677] Fix | Delete
$cnt=count($post_types);
[678] Fix | Delete
if($cnt==0){
[679] Fix | Delete
$xyz_fbap_hide_custompost_settings = 'style="display: none;"';//echo 'NA';
[680] Fix | Delete
}
[681] Fix | Delete
?>
[682] Fix | Delete
<tr valign="top" <?php echo $xyz_fbap_hide_custompost_settings;?>>
[683] Fix | Delete
<td colspan="1"> <?php _e('Select wordpress custom post types for auto publish','facebook-auto-publish'); ?> </td>
[684] Fix | Delete
<td> <?php foreach ($post_types as $post_type ) {
[685] Fix | Delete
[686] Fix | Delete
echo '<input type="checkbox" name="post_types[]" value="'.$post_type.'" ';
[687] Fix | Delete
if(in_array($post_type, $ar1))
[688] Fix | Delete
{
[689] Fix | Delete
echo 'checked="checked"/>';
[690] Fix | Delete
}
[691] Fix | Delete
else
[692] Fix | Delete
echo '/>';
[693] Fix | Delete
[694] Fix | Delete
echo $post_type.'<br/>';
[695] Fix | Delete
[696] Fix | Delete
}?>
[697] Fix | Delete
</td>
[698] Fix | Delete
</tr>
[699] Fix | Delete
<tr><td><h2> <?php _e('Advanced Settings','facebook-auto-publish'); ?> </h2> </td></tr>
[700] Fix | Delete
<tr valign="top" id="selPostCat">
[701] Fix | Delete
<td colspan="1"> <?php _e('Select post categories for auto publish','facebook-auto-publish'); ?>
[702] Fix | Delete
</td>
[703] Fix | Delete
<td class="switch-field">
[704] Fix | Delete
<input type="hidden" value="<?php echo esc_html($xyz_fbap_include_categories);?>" name="xyz_fbap_sel_cat" id="xyz_fbap_sel_cat">
[705] Fix | Delete
<label id="xyz_fbap_include_categories_no">
[706] Fix | Delete
<input type="radio" name="xyz_fbap_cat_all" id="xyz_fbap_cat_all" value="All" onchange="rd_cat_chn(1,-1)" <?php if($xyz_fbap_include_categories=="All") echo "checked"?>> <?php _e('All','facebook-auto-publish'); ?> <font style="padding-left: 10px;"></font></label>
[707] Fix | Delete
<label id="xyz_fbap_include_categories_yes">
[708] Fix | Delete
<input type="radio" name="xyz_fbap_cat_all" id="xyz_fbap_cat_all" value="" onchange="rd_cat_chn(1,1)" <?php if($xyz_fbap_include_categories!="All") echo "checked"?>> <?php _e('Specific','facebook-auto-publish'); ?> </label>
[709] Fix | Delete
<br /> <br /> <div class="scroll_checkbox" id="cat_dropdown_span">
[710] Fix | Delete
<?php
[711] Fix | Delete
$args = array(
[712] Fix | Delete
'show_option_all' => '',
[713] Fix | Delete
'show_option_none' => '',
[714] Fix | Delete
'orderby' => 'name',
[715] Fix | Delete
'order' => 'ASC',
[716] Fix | Delete
'show_last_update' => 0,
[717] Fix | Delete
'show_count' => 0,
[718] Fix | Delete
'hide_empty' => 0,
[719] Fix | Delete
'child_of' => 0,
[720] Fix | Delete
'exclude' => '',
[721] Fix | Delete
'echo' => 0,
[722] Fix | Delete
'selected' => '1 3',
[723] Fix | Delete
'hierarchical' => 1,
[724] Fix | Delete
'id' => 'xyz_fbap_catlist',
[725] Fix | Delete
'class' => 'postform',
[726] Fix | Delete
'depth' => 0,
[727] Fix | Delete
'tab_index' => 0,
[728] Fix | Delete
'taxonomy' => 'category' );
[729] Fix | Delete
[730] Fix | Delete
if(count(get_categories($args))>0)
[731] Fix | Delete
{
[732] Fix | Delete
$xyz_fbap_include_categories=explode(',', $xyz_fbap_include_categories);
[733] Fix | Delete
$fbap_categories=get_categories($args);
[734] Fix | Delete
foreach ($fbap_categories as $fbap_cat)
[735] Fix | Delete
{
[736] Fix | Delete
$cat_id[]=$fbap_cat->cat_ID;
[737] Fix | Delete
$cat_name[]=$fbap_cat->cat_name;
[738] Fix | Delete
?>
[739] Fix | Delete
<input type="checkbox" name="xyz_fbap_catlist[]" value="<?php echo $fbap_cat->cat_ID;?>" <?php if(is_array($xyz_fbap_include_categories)) { if(in_array($fbap_cat->cat_ID, $xyz_fbap_include_categories)) echo "checked";} ?>/><?php echo $fbap_cat->cat_name; ?>
[740] Fix | Delete
<br/><?php }
[741] Fix | Delete
}
[742] Fix | Delete
else
[743] Fix | Delete
_e('NIL','facebook-auto-publish');
[744] Fix | Delete
?><br /> <br /> </div>
[745] Fix | Delete
</td>
[746] Fix | Delete
</tr>
[747] Fix | Delete
<tr valign="top">
[748] Fix | Delete
<td scope="row" colspan="1" width="50%"> <?php _e('Auto publish on editing posts/pages/custom post types','facebook-auto-publish'); ?>
[749] Fix | Delete
</td>
[750] Fix | Delete
<td >
[751] Fix | Delete
<input type="radio" name="xyz_fbap_default_selection_edit" value="1" <?php if($xyz_fbap_default_selection_edit==1) echo 'checked';?>/> <?php _e('Enabled','facebook-auto-publish'); ?> <br/>
[752] Fix | Delete
<input type="radio" name="xyz_fbap_default_selection_edit" value="0" <?php if($xyz_fbap_default_selection_edit==0) echo 'checked';?>/> <?php _e('Disabled','facebook-auto-publish'); ?> <br/>
[753] Fix | Delete
<input type="radio" name="xyz_fbap_default_selection_edit" value="2" <?php if($xyz_fbap_default_selection_edit==2) echo 'checked';?>/> <?php _e('Use settings from post creation or post updation','facebook-auto-publish'); ?>
[754] Fix | Delete
</td>
[755] Fix | Delete
</tr>
[756] Fix | Delete
<tr valign="top">
[757] Fix | Delete
<td scope="row" colspan="1" width="50%"> <?php _e('Auto publish on creating posts/pages/custom post types','facebook-auto-publish'); ?>
[758] Fix | Delete
</td>
[759] Fix | Delete
<td >
[760] Fix | Delete
<input type="radio" name="xyz_fbap_default_selection_create" value="1" <?php if($xyz_fbap_default_selection_create==1) echo 'checked';?>/> <?php _e('Enabled','facebook-auto-publish'); ?> <br/>
[761] Fix | Delete
<input type="radio" name="xyz_fbap_default_selection_create" value="0" <?php if($xyz_fbap_default_selection_create==0) echo 'checked';?>/> <?php _e('Disabled','facebook-auto-publish'); ?> <br/>
[762] Fix | Delete
</td>
[763] Fix | Delete
</tr>
[764] Fix | Delete
[765] Fix | Delete
<tr valign="top">
[766] Fix | Delete
<td scope="row" colspan="1" width="50%"> <?php _e('Enable SSL peer verification in remote requests','facebook-auto-publish'); ?> </td>
[767] Fix | Delete
<td class="switch-field">
[768] Fix | Delete
<label id="xyz_fbap_peer_verification_yes"><input type="radio" name="xyz_fbap_peer_verification" value="1" <?php if($xyz_fbap_peer_verification==1) echo 'checked';?>/> <?php _e('Yes','facebook-auto-publish'); ?> </label>
[769] Fix | Delete
<label id="xyz_fbap_peer_verification_no"><input type="radio" name="xyz_fbap_peer_verification" value="0" <?php if($xyz_fbap_peer_verification==0) echo 'checked';?>/> <?php _e('No','facebook-auto-publish'); ?> </label>
[770] Fix | Delete
</td>
[771] Fix | Delete
</tr>
[772] Fix | Delete
[773] Fix | Delete
<tr valign="top">
[774] Fix | Delete
<td scope="row" colspan="1"> <?php _e('Apply filters during publishing','facebook-auto-publish'); ?> </td>
[775] Fix | Delete
<td>
[776] Fix | Delete
<?php
[777] Fix | Delete
$ar2=explode(",",$xyz_fbap_apply_filters);
[778] Fix | Delete
for ($i=0;$i<3;$i++ ) {
[779] Fix | Delete
$filVal=$i+1;
[780] Fix | Delete
[781] Fix | Delete
if($filVal==1)
[782] Fix | Delete
$filName='the_content';
[783] Fix | Delete
else if($filVal==2)
[784] Fix | Delete
$filName='the_excerpt';
[785] Fix | Delete
else if($filVal==3)
[786] Fix | Delete
$filName='the_title';
[787] Fix | Delete
else $filName='';
[788] Fix | Delete
[789] Fix | Delete
echo '<input type="checkbox" name="xyz_fbap_applyfilters[]" value="'.$filVal.'" ';
[790] Fix | Delete
if(in_array($filVal, $ar2))
[791] Fix | Delete
{
[792] Fix | Delete
echo 'checked="checked"/>';
[793] Fix | Delete
}
[794] Fix | Delete
else
[795] Fix | Delete
echo '/>';
[796] Fix | Delete
[797] Fix | Delete
echo '<label>'.$filName.'</label><br/>';
[798] Fix | Delete
[799] Fix | Delete
}
[800] Fix | Delete
?>
[801] Fix | Delete
</td>
[802] Fix | Delete
</tr>
[803] Fix | Delete
<!-- <tr valign="top">
[804] Fix | Delete
[805] Fix | Delete
<td scope="row" colspan="1" width="50%">Enable utf-8 decoding before publishing </td>
[806] Fix | Delete
<td class="switch-field">
[807] Fix | Delete
<label id="xyz_fbap_utf_decode_enable_yes"><input type="radio" name="xyz_fbap_utf_decode_enable" value="1" <?php //if($xyz_fbap_utf_decode_enable==1) echo 'checked';?>/>Yes</label>
[808] Fix | Delete
<label id="xyz_fbap_utf_decode_enable_no"><input type="radio" name="xyz_fbap_utf_decode_enable" value="0" <?php //if($xyz_fbap_utf_decode_enable==0) echo 'checked';?>/>No</label>
[809] Fix | Delete
</td>
[810] Fix | Delete
</tr> -->
[811] Fix | Delete
<tr><td><h2> <?php _e('Other Settings','facebook-auto-publish'); ?> </h2> </td></tr>
[812] Fix | Delete
<tr valign="top">
[813] Fix | Delete
[814] Fix | Delete
<td colspan="1"> <?php _e('Enable credit link to author','facebook-auto-publish'); ?>
[815] Fix | Delete
</td>
[816] Fix | Delete
<td class="switch-field">
[817] Fix | Delete
<label id="xyz_credit_link_yes"><input type="radio" name="xyz_credit_link" value="fbap" <?php if($xyz_credit_link=='fbap') echo 'checked';?>/> <?php _e('Yes','facebook-auto-publish'); ?> </label>
[818] Fix | Delete
<label id="xyz_credit_link_no"><input type="radio" name="xyz_credit_link" value="<?php echo $xyz_credit_link!='fbap'?$xyz_credit_link:0;?>" <?php if($xyz_credit_link!='fbap') echo 'checked';?>/> <?php _e('No','facebook-auto-publish'); ?> </label>
[819] Fix | Delete
</td>
[820] Fix | Delete
</tr>
[821] Fix | Delete
[822] Fix | Delete
<tr valign="top">
[823] Fix | Delete
<td colspan="1"> <?php _e('Enable premium version ads','facebook-auto-publish'); ?>
[824] Fix | Delete
</td>
[825] Fix | Delete
<td class="switch-field">
[826] Fix | Delete
<label id="xyz_fbap_premium_version_ads_yes"><input type="radio" name="xyz_fbap_premium_version_ads" value="1" <?php if($xyz_fbap_premium_version_ads==1) echo 'checked';?>/> <?php _e('Yes','facebook-auto-publish'); ?> </label>
[827] Fix | Delete
<label id="xyz_fbap_premium_version_ads_no"><input type="radio" name="xyz_fbap_premium_version_ads" value="0" <?php if($xyz_fbap_premium_version_ads==0) echo 'checked';?>/> <?php _e('No','facebook-auto-publish'); ?> </label>
[828] Fix | Delete
[829] Fix | Delete
</td>
[830] Fix | Delete
</tr>
[831] Fix | Delete
<tr>
[832] Fix | Delete
<td id="bottomBorderNone">
[833] Fix | Delete
</td>
[834] Fix | Delete
[835] Fix | Delete
[836] Fix | Delete
<td id="bottomBorderNone"><div style="height: 50px;">
[837] Fix | Delete
<input type="submit" class="submit_fbap_new" style="margin-top: 10px;" value="<?php _e('Update Settings','facebook-auto-publish'); ?>" name="bsettngs" /></div></td>
[838] Fix | Delete
</tr>
[839] Fix | Delete
[840] Fix | Delete
</table>
[841] Fix | Delete
</form>
[842] Fix | Delete
[843] Fix | Delete
</div>
[844] Fix | Delete
[845] Fix | Delete
[846] Fix | Delete
[847] Fix | Delete
</div>
[848] Fix | Delete
<?php if (is_array($xyz_fbap_include_categories))
[849] Fix | Delete
$xyz_fbap_include_categories1=implode(',', $xyz_fbap_include_categories);
[850] Fix | Delete
else
[851] Fix | Delete
$xyz_fbap_include_categories1=$xyz_fbap_include_categories;
[852] Fix | Delete
?>
[853] Fix | Delete
<script type="text/javascript">
[854] Fix | Delete
//drpdisplay();
[855] Fix | Delete
var xyzscripts_userid='';
[856] Fix | Delete
xyzscripts_userid='<?php echo get_option('xyz_fbap_xyzscripts_user_id');?>';
[857] Fix | Delete
var catval='<?php echo $xyz_fbap_include_categories1; ?>';
[858] Fix | Delete
var custtypeval='<?php echo esc_html($xyz_fbap_include_customposttypes); ?>';
[859] Fix | Delete
var get_opt_cats='<?php echo esc_html(get_option('xyz_fbap_include_posts'));?>';
[860] Fix | Delete
jQuery(document).ready(function() {
[861] Fix | Delete
[862] Fix | Delete
<?php
[863] Fix | Delete
if(isset($_POST['bsettngs']))
[864] Fix | Delete
[865] Fix | Delete
{?>
[866] Fix | Delete
document.getElementById("xyz_fbap_basic_tab_settings").click();
[867] Fix | Delete
<?php }
[868] Fix | Delete
else {?>
[869] Fix | Delete
document.getElementById("xyz_fbap_default_tab_settings").click();
[870] Fix | Delete
[871] Fix | Delete
<?php }
[872] Fix | Delete
?>
[873] Fix | Delete
[874] Fix | Delete
// Get the element with id="xyz_fbap_default_tab_settings" and click on it
[875] Fix | Delete
[876] Fix | Delete
if(catval=="All")
[877] Fix | Delete
jQuery("#cat_dropdown_span").hide();
[878] Fix | Delete
else
[879] Fix | Delete
jQuery("#cat_dropdown_span").show();
[880] Fix | Delete
[881] Fix | Delete
if(get_opt_cats==0)
[882] Fix | Delete
jQuery('#selPostCat').hide();
[883] Fix | Delete
else
[884] Fix | Delete
jQuery('#selPostCat').show();
[885] Fix | Delete
[886] Fix | Delete
var xyz_credit_link=jQuery("input[name='xyz_credit_link']:checked").val();
[887] Fix | Delete
if(xyz_credit_link=='fbap')
[888] Fix | Delete
xyz_credit_link=1;
[889] Fix | Delete
else
[890] Fix | Delete
xyz_credit_link=0;
[891] Fix | Delete
XyzFbapToggleRadio(xyz_credit_link,'xyz_credit_link');
[892] Fix | Delete
[893] Fix | Delete
var xyz_fbap_cat_all=jQuery("input[name='xyz_fbap_cat_all']:checked").val();
[894] Fix | Delete
if (xyz_fbap_cat_all == 'All')
[895] Fix | Delete
xyz_fbap_cat_all=0;
[896] Fix | Delete
else
[897] Fix | Delete
xyz_fbap_cat_all=1;
[898] Fix | Delete
XyzFbapToggleRadio(xyz_fbap_cat_all,'xyz_fbap_include_categories');
[899] Fix | Delete
[900] Fix | Delete
var fbap_toggle_element_ids=['xyz_fbap_post_permission','xyz_fbap_include_pages',
[901] Fix | Delete
'xyz_fbap_include_posts',
[902] Fix | Delete
'xyz_fbap_peer_verification','xyz_fbap_premium_version_ads','xyz_fbap_enforce_og_tags','xyz_fbap_clear_fb_cache'];
[903] Fix | Delete
jQuery.each(fbap_toggle_element_ids, function( index, value ) {
[904] Fix | Delete
checkedval= jQuery("input[name='"+value+"']:checked").val();
[905] Fix | Delete
XyzFbapToggleRadio(checkedval,value);
[906] Fix | Delete
});
[907] Fix | Delete
var xyz_fbap_app_sel_mode=jQuery("input[name='xyz_fbap_app_sel_mode']:checked").val();
[908] Fix | Delete
if(xyz_fbap_app_sel_mode !=0){
[909] Fix | Delete
jQuery('#xyz_fbap_conn_to_xyzscripts').show();
[910] Fix | Delete
jQuery('.xyz_fbap_facebook_settings').hide();
[911] Fix | Delete
jQuery('#xyz_fbap_app_creation_note').hide();
[912] Fix | Delete
}
[913] Fix | Delete
else{
[914] Fix | Delete
jQuery('.xyz_fbap_facebook_settings').show();
[915] Fix | Delete
jQuery('#xyz_fbap_app_creation_note').show();
[916] Fix | Delete
jQuery('#xyz_fbap_conn_to_xyzscripts').hide();
[917] Fix | Delete
}
[918] Fix | Delete
jQuery("input[name='xyz_fbap_app_sel_mode']").click(function(){
[919] Fix | Delete
var xyz_fbap_app_sel_mode=jQuery("input[name='xyz_fbap_app_sel_mode']:checked").val();
[920] Fix | Delete
if(xyz_fbap_app_sel_mode !=0){
[921] Fix | Delete
jQuery('#xyz_fbap_app_creation_note').hide();
[922] Fix | Delete
jQuery('.xyz_fbap_facebook_settings').hide();
[923] Fix | Delete
if(xyzscripts_userid=='')
[924] Fix | Delete
jQuery('#xyz_fbap_conn_to_xyzscripts').show();
[925] Fix | Delete
}
[926] Fix | Delete
else{
[927] Fix | Delete
jQuery('#xyz_fbap_app_creation_note').show();
[928] Fix | Delete
jQuery('.xyz_fbap_facebook_settings').show();
[929] Fix | Delete
jQuery('#xyz_fbap_conn_to_xyzscripts').hide();
[930] Fix | Delete
}
[931] Fix | Delete
});
[932] Fix | Delete
window.addEventListener('message', function(e) {
[933] Fix | Delete
xyz_fbap_ProcessChildMessage_2(e.data);
[934] Fix | Delete
} , false);
[935] Fix | Delete
});
[936] Fix | Delete
[937] Fix | Delete
function toggleRadio(value,buttonId)
[938] Fix | Delete
{
[939] Fix | Delete
if (value == '1') {
[940] Fix | Delete
jQuery("#"+buttonId+"_no").css({"background-color": "#dddddd", "color": "#888888", "font-weight": "normal"});
[941] Fix | Delete
jQuery("#"+buttonId+"_yes").css({"background-color": "#28A6A2","color":"#1e1b1b", "font-weight": "bold"});
[942] Fix | Delete
}
[943] Fix | Delete
else if (value == '0') {
[944] Fix | Delete
jQuery("#"+buttonId+"_yes").css({"background-color": "#dddddd", "color": "#888888", "font-weight": "normal"});
[945] Fix | Delete
jQuery("#"+buttonId+"_no").css({"background-color": "#28A6A2","color":"#1e1b1b", "font-weight": "bold"});
[946] Fix | Delete
}
[947] Fix | Delete
}
[948] Fix | Delete
[949] Fix | Delete
function setcat(obj)
[950] Fix | Delete
{
[951] Fix | Delete
var sel_str="";
[952] Fix | Delete
for(k=0;k<obj.options.length;k++)
[953] Fix | Delete
{
[954] Fix | Delete
if(obj.options[k].selected)
[955] Fix | Delete
sel_str+=obj.options[k].value+",";
[956] Fix | Delete
}
[957] Fix | Delete
[958] Fix | Delete
var l = sel_str.length;
[959] Fix | Delete
var lastChar = sel_str.substring(l-1, l);
[960] Fix | Delete
if (lastChar == ",") {
[961] Fix | Delete
sel_str = sel_str.substring(0, l-1);
[962] Fix | Delete
}
[963] Fix | Delete
document.getElementById('xyz_fbap_sel_cat').value=sel_str;
[964] Fix | Delete
}
[965] Fix | Delete
[966] Fix | Delete
function rd_cat_chn(val,act)
[967] Fix | Delete
{
[968] Fix | Delete
if(val==1)
[969] Fix | Delete
{
[970] Fix | Delete
if(act==-1)
[971] Fix | Delete
jQuery("#cat_dropdown_span").hide();
[972] Fix | Delete
else
[973] Fix | Delete
jQuery("#cat_dropdown_span").show();
[974] Fix | Delete
}
[975] Fix | Delete
}
[976] Fix | Delete
[977] Fix | Delete
function xyz_fbap_info_insert(inf){
[978] Fix | Delete
[979] Fix | Delete
var e = document.getElementById("xyz_fbap_info");
[980] Fix | Delete
var ins_opt = e.options[e.selectedIndex].text;
[981] Fix | Delete
if(ins_opt=="0")
[982] Fix | Delete
ins_opt="";
[983] Fix | Delete
var str=jQuery("textarea#xyz_fbap_message").val()+ins_opt;
[984] Fix | Delete
jQuery("textarea#xyz_fbap_message").val(str);
[985] Fix | Delete
jQuery('#xyz_fbap_info :eq(0)').prop('selected', true);
[986] Fix | Delete
jQuery("textarea#xyz_fbap_message").focus();
[987] Fix | Delete
[988] Fix | Delete
}
[989] Fix | Delete
function xyz_fbap_show_postCategory(val)
[990] Fix | Delete
{
[991] Fix | Delete
if(val==0)
[992] Fix | Delete
jQuery('#selPostCat').hide();
[993] Fix | Delete
else
[994] Fix | Delete
jQuery('#selPostCat').show();
[995] Fix | Delete
}
[996] Fix | Delete
jQuery("#select_all_pages").click(function(){
[997] Fix | Delete
[998] Fix | Delete
jQuery(".selpages").prop("checked",jQuery("#select_all_pages").prop("checked"));
[999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function