When I am activating my PHP code in Script Organizer, Oxygen is not loading the SVG sets of icons.
When I tried to use Code Snippets (Free plugin) everything works fine and there is no more errors.
Here is the code that is running for everywhere.
I am using this code for WP Grid Builder.
__( 'Article No & Category', 'text-domain' ),
'render_callback' => 'prefix_my_block_render',
];
return $blocks;
}
// The render callback function allows to output content in cards.
function prefix_my_block_render() {
// Get current post, term, or user object.
$post = wpgb_get_post();
$terms = strip_tags( get_the_term_list( $post->ID, ‘mdia-type’, ”, ‘, ‘ ) );
$article_order = rwmb_meta( ‘article_order’, $args = [], $post->ID );
echo “N.$article_order – $terms”;
}
add_filter( ‘wp_grid_builder/blocks’, ‘register_block_article_number_and_category’, 10, 1 );
function register_block_media_type_link($blocks){
// ‘my_block’ corresponds to the block slug.
$blocks[‘block_media_type_link’] = [
‘name’ => __( ‘Media Type View Text’, ‘text-domain’ ),
‘render_callback’ => ‘prefix_block_media_type_link’,
];
return $blocks;
}
function prefix_block_media_type_link(){
//get last post mdia_type
//switch base on mdia_type
$post = wpgb_get_post();
$terms = get_the_terms( $post->ID, ‘mdia-type’, ”, ‘, ‘ );
if(!empty($terms)){
$term_id = $terms[0]->term_id;
$field_id = ‘view_text’;
$meta = get_term_meta( $term_id, $field_id, true );
echo ” $meta “;
}else{
echo ” Vista “;
}
}
add_filter( ‘wp_grid_builder/blocks’, ‘register_block_media_type_link’, 11, 1 );
function register_block_vol_and_article_no($blocks){
// ‘my_block’ corresponds to the block slug.
$blocks[‘block_vol_and_article_no’] = [
‘name’ => __( ‘Vol No. and Article No.’, ‘text-domain’ ),
‘render_callback’ => ‘prefix_block_vol_and_article_no’,
];
return $blocks;
}
function prefix_block_vol_and_article_no(){
//get last post mdia_type
//switch base on mdia_type
$post = wpgb_get_post();
$categories = wp_get_post_terms( $post->ID, ‘category’ );
$category = false;
$article_order = rwmb_meta( ‘article_order’, $args = [], $post->ID );
$cat_name = “”;
if(!empty($categories)){
$category = $categories[0];
}
if($category){
$cat_name = str_replace(“Volumen-“,”Vol “, $category->name);
}
echo “$cat_name – N$article_order”;
}
add_filter( ‘wp_grid_builder/blocks’, ‘register_block_vol_and_article_no’, 12, 1 );
?>
Hi,
Thank you for contacting us.
Please provide WP admin access as you haven’t provided that.
Regards,
Muhammad Osama
https://staging.wimblu.com/wp-login.php
Username:
tmp_user
Password:
5iVZi2%kl7MIgbcL1AplDmtR
Hi,
Thank you for providing access. It seems like you are working on the site because I am not able to access oxygen editor so please let me know what is a good time to have a look at it.
Regards,
Muhammad Osama
Hi,
Please let me know when I can have a look at it?
Regards,
Muhammad Osama
Hi,
I am closing ticket as there is no reply. Please open a new ticket if you see any issue.
Regards,
Muhammad Osama