http://www.duqmterminal.om/en/
-
I got these are bugs when work with the plugin
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘qtranxf_gettext’ not found or invalid function name in /home/duqmterm/public_html/wp-includes/plugin.php on line 235
Warning: Cannot modify header information – headers already sent by (output started at /home/duqmterm/public_html/wp-content/plugins/my-custom-functions/my-custom-functions.php(144) : eval()’d code:31) in /home/duqmterm/public_html/wp-content/plugins/qtranslate-x/qtranslate_core.php on line 388
Warning: Cannot modify header information – headers already sent by (output started at /home/duqmterm/public_html/wp-content/plugins/my-custom-functions/my-custom-functions.php(144) : eval()’d code:31) in /home/duqmterm/public_html/wp-includes/pluggable.php on line 1174
do you a solution
thank you
waleed
-
This is not bugs of the plug-in. This errors caused by your code (functions) that you put in there. Please check your code.
Can you help me to know where is the bug in my code
This is my code inside my custome function
<?php
function ArabicDate( $time = false ) {if ( $time === false ) {
$time = current_time( ‘timestamp’ );
}
$months = array(“Jan” => “يناير”, “Feb” => “فبراير”, “Mar” => “مارس”, “Apr” => “أبريل”, “May” => “مايو”, “Jun” => “يونيو”, “Jul” => “يوليو”, “Aug” => “أغسطس”, “Sep” => “سبتمبر”, “Oct” => “أكتوبر”, “Nov” => “نوفمبر”, “Dec” => “ديسمبر”);
$your_date = date( ‘y-m-d’, $time ); // The Date calculated from the $time variable
$en_month = date(“M”, $time );
foreach ($months as $en => $ar) {
if ($en == $en_month) { $ar_month = $ar; }
}$find = array (“Sat”, “Sun”, “Mon”, “Tue”, “Wed” , “Thu”, “Fri”);
$replace = array (“السبت”, “الأحد”, “الإثنين”, “الثلاثاء”, “الأربعاء”, “الخميس”, “الجمعة”);
$ar_day_format = date(‘D’, $time); // The Current Day
$ar_day = str_replace($find, $replace, $ar_day_format);$standard = array(“0″,”1″,”2″,”3″,”4″,”5″,”6″,”7″,”8″,”9”);
$eastern_arabic_symbols = array(“٠”,”١”,”٢”,”٣”,”٤”,”٥”,”٦”,”٧”,”٨”,”٩”);// use this line to format your arabic date
$current_date = $ar_day.’ ‘.date( ‘d’, $time ).’ / ‘.$ar_month.’ / ‘.date( ‘Y’, $time );
$arabic_date = str_replace($standard , $eastern_arabic_symbols , $current_date);return $arabic_date;
}
?><?php
function convert_numbers_to_arabic($n) {
$arabic_numbers = array(‘۰’, ‘۱’, ‘۲’, ‘۳’, ‘٤’, ‘۵’, ‘٦’, ‘۷’, ‘۸’, ‘۹’, ‘.’);
$english_numbers = array(‘0’, ‘1’, ‘2’, ‘3’, ‘4’, ‘5’, ‘6’, ‘7’, ‘8’, ‘9’, ‘.’);
return str_replace($english_numbers, $arabic_numbers, $n);
}function arabic_date_i18n( $j ) {
if ( get_bloginfo( ‘language’ ) == ‘ar’ ) {
$j = convert_numbers_to_arabic( $j );
}
return $j;
}add_filter(‘date_i18n’, ‘arabic_date_i18n’);
?><?php
function new_excerpt_more($more) {
global $post;
remove_filter(‘excerpt_more’, ‘new_excerpt_more’);
return ‘…’;
}
add_filter(‘excerpt_more’,’new_excerpt_more’);
?><?php
add_filter( ‘vc_grid_item_shortcodes’, ‘my_module_add_grid_shortcodes’ );
function my_module_add_grid_shortcodes( $shortcodes ) {
$shortcodes[‘vc_post_id’] = array(
‘name’ => __( ‘Upcoming Tenders’, ‘my-text-domain’ ),
‘base’ => ‘vc_post_id’,
‘category’ => __( ‘Content’, ‘my-text-domain’ ),
‘description’ => __( ‘Show Upcoming Tenders’, ‘my-text-domain’ ),
‘post_type’ => Vc_Grid_Item_Editor::postType(),
);return $shortcodes;
}// output function
add_shortcode( ‘vc_post_id’, ‘vc_post_id_render’ );
function vc_post_id_render() {return
‘<p style=”color: #a29061 !important;font-size: 20px;line-height:1;padding-top: 5px;”>{{ post_data:post_title }}</p>’.
‘<span class=”FixMe”>Tender No:<span class=”PostBOX”>{{ post_data:tender_no}}</span></span><span class=”FixMe2″>Published Date:<span class=”PostBOX”>{{post_data:published_date }}</span></span><span class=”FixMe”>Closing Date:<span class=”PostBOX”>{{ post_data:closing_date }}</span></span>’.
‘
<span style=”font-size: 15px;”>{{ post_data:post_excerpt }}</span>’.‘<p style=”color: #00798c;font-size: 13px;background-image: url(http://www.duqmterminal.com/wp-content/uploads/2016/07/pdf.svg);background-repeat: no-repeat;background-position:right;padding-right: 25px;display: inline-block;padding-bottom:5px;text-decoration: none;”>
<span class=”OnlyEng”>More</span><span class=”OnlyArb”>المزيد</span>
</p>’;}
?>
<?php
add_filter( ‘vc_grid_item_shortcodes’, ‘my_module_add_grid_shortcodes_V2’ );
function my_module_add_grid_shortcodes_V2( $shortcodes ) {
$shortcodes[‘vc_say_hello’] = array(
‘name’ => __( ‘CAREER OPPORTUNITIES’, ‘my-text-domain’ ),
‘base’ => ‘vc_say_hello’,
‘category’ => __( ‘Content’, ‘my-text-domain’ ),
‘type’ => ‘textfield’,
‘description’ => __( ‘Just outputs CAREER OPPORTUNITIES’, ‘my-text-domain’ ),
‘post_type’ => Vc_Grid_Item_Editor::postType(),
);
return $shortcodes;
}add_shortcode( ‘vc_say_hello’, ‘vc_say_hello_render’ );
function vc_say_hello_render() {
return‘<p style=”color: #a29061 !important;font-size: 20px;line-height:1;padding-top: 5px;”>{{ post_data:post_title }}</p>’.
‘<span class=”PostBOX” style=”margin-left: 0px;”>[acf field=date]</span>’.
‘<span style=”color: #344553 !important;line-height:1;padding-top: 5px;font-size:15px;”>[acf field=job_description]</span>’.
‘<p style=”color: #a29061 !important;line-height:1;padding-top: 5px;text-align:right;”>
<span class=”OnlyEng”>Apply</span><span class=”OnlyArb”>تطبيق</span>
</p>’;}
?><?php
add_filter( ‘vc_grid_item_shortcodes’, ‘my_module_add_grid_shortcodes_V3’ );
function my_module_add_grid_shortcodes_V3( $shortcodes ) {
$shortcodes[‘vc_say_hello_V3’] = array(
‘name’ => __( ‘Downloads Date’, ‘my-text-domain’ ),
‘base’ => ‘vc_say_hello_V3’,
‘category’ => __( ‘Content’, ‘my-text-domain’ ),
‘type’ => ‘textfield’,
‘description’ => __( ‘Just outputs Downloads’, ‘my-text-domain’ ),
‘post_type’ => Vc_Grid_Item_Editor::postType(),
);
return $shortcodes;
}add_shortcode( ‘vc_say_hello_V3’, ‘vc_say_hello_V3_render’ );
function vc_say_hello_V3_render() {
return‘<span class=”PostBOX” style=”margin-left: 0px;”>[acf field=”date”]</span>’;
}
?><?php
add_filter(‘gettext’, ‘qtranxf_gettext’,0);add_filter( ‘vc_grid_item_shortcodes’, ‘my_module_add_grid_shortcodes_V4’ );
function my_module_add_grid_shortcodes_V4( $shortcodes ) {
$shortcodes[‘vc_say_hello_V4’] = array(
‘name’ => __( ‘Downloads Link’, ‘my-text-domain’ ),
‘base’ => ‘vc_say_hello_V4’,
‘category’ => __( ‘Content’, ‘my-text-domain’ ),
‘type’ => ‘textfield’,
‘description’ => __( ‘Just outputs Downloads Link’, ‘my-text-domain’ ),
‘post_type’ => Vc_Grid_Item_Editor::postType(),
);
return $shortcodes;
}add_shortcode( ‘vc_say_hello_V4’, ‘vc_say_hello_V4_render’ );
function vc_say_hello_V4_render() {
return‘<p style=”color: #00798c;font-size: 13px;display: inline-block;padding-bottom:5px;text-decoration: none;”>
<span class=”OnlyEng”>Download</span><span class=”OnlyArb”>تحميل</span>
</p>’;}
?><?php
apply_filters(‘qtranslate_text’, $str);
add_filter( ‘vc_grid_item_shortcodes’, ‘my_module_add_grid_shortcodes_V5’ );function my_module_add_grid_shortcodes_V5( $shortcodes ) {
$shortcodes[‘vc_say_hello_V5’] = array(
‘name’ => __( ‘Content for NEWS’, ‘my-text-domain’ ),
‘base’ => ‘vc_say_hello_V5’,
‘category’ => __( ‘Content’, ‘my-text-domain’ ),
‘type’ => ‘textfield’,
‘description’ => __( ‘Just outputs NEWS Content’, ‘my-text-domain’ ),
‘post_type’ => Vc_Grid_Item_Editor::postType(),);
return $shortcodes;
}add_shortcode( ‘vc_say_hello_V5’, ‘vc_say_hello_V5_render’ );
function vc_say_hello_V5_render() {
return
‘
<span class=”POST_TEXT_50Perc”>[acf field=home_content]</span>
<p><span style=”font-size:13px;” class=”OnlyArb”>
مزيد
</span>
<span style=”font-size:13px;” class=”OnlyEng”>
more
</span><span style=”position: absolute;
margin-left: 0px;
margin-top: -10px;”>
<svg version=”1.1″ id=”Layer_1″ xmlns=”http://www.w3.org/2000/svg” xmlns:xlink=”http://www.w3.org/1999/xlink” x=”0px” y=”0px”
width=”15px” height=”9.333px” viewBox=”0 0 15 9.333″ enable-background=”new 0 0 15 9.333″ xml:space=”preserve”>
<polygon fill=”#00798C” points=”0.121,0 7.5,7.355 14.879,0 “/>
</svg>
</span>
</p>
‘;
}
?><?php
add_filter( ‘vc_grid_item_shortcodes’, ‘my_module_add_grid_shortcodes_V6’ );
function my_module_add_grid_shortcodes_V6( $shortcodes ) {
$shortcodes[‘vc_say_hello_V6’] = array(
‘name’ => __( ‘Content for NEWS Home Feed’, ‘my-text-domain’ ),
‘base’ => ‘vc_say_hello_V6’,
‘category’ => __( ‘Content’, ‘my-text-domain’ ),
‘type’ => ‘textfield’,
‘description’ => __( ‘Just outputs NEWS Content Home Feed’, ‘my-text-domain’ ),
‘post_type’ => Vc_Grid_Item_Editor::postType(),);
return $shortcodes;
}add_shortcode( ‘vc_say_hello_V6’, ‘vc_say_hello_V6_render’ );
function vc_say_hello_V6_render() {return
‘<span class=”POST_TEXT_50Perc” style=”color: white;padding-top: 10px;”>[acf field=home_content]</span>’
;
}
?>
The topic ‘http://www.duqmterminal.om/en/’ is closed to new replies.