mabufoysal
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Admin Menu for New PostThanks @gappiah . Actually I am learning WordPress Plugin Development. I am using those code in my plugin. Thanks.
Forum: Developing with WordPress
In reply to: Add MenuThanks @bcworkz . Could you please show me some sample code ?
Is it possible to get Menu Name using below code ?<?php // Use the init hook. add_action( ‘init’, wpse_412823_register_tutorials’ ); function wpse_412823_register_tutorials() { // Set up arguments for the post type. $args = array( // There are many arguments, but this will make a bare-minimum post type. ‘public’ => true, ‘label’ => ‘News’, ); // Finally, register the post type. register_post_type( ‘tutorial’, $args ); } ?>
- This reply was modified 1 year, 10 months ago by bcworkz. Reason: code format fixed
Forum: Developing with WordPress
In reply to: Add MenuThanks @bcworkz . Is it the right way ? What other plugin developers do in their plugin ?
Forum: Developing with WordPress
In reply to: Add MenuThanks @bcworkz . I used your code and got this error.
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'post-new.php?post_type=weather' not found or invalid function name in /home/foysal/www/html/wordpressbosta/wordpresspluginweather/wp-includes/class-wp-hook.php on line 308
- This reply was modified 1 year, 10 months ago by mabufoysal.
Forum: Developing with WordPress
In reply to: Add Menu
Thanks @bcworkz . What could be ideal code for this ? Could you please share some sample code ? Thanks.Forum: Developing with WordPress
In reply to: Add MenuThanks @bcworkz .
My issue is in callback function of this code
add_submenu_page( 'news_info', 'News Information', 'Add News', 'manage_options', 'news_info', 'dsfdasfasf', 1 );
.What should I put in callback function if I would like to add New
News
item ?Forum: Developing with WordPress
In reply to: Add MenuThanks @bcworkz . I would like to create sub menu like below
Add New
of Tutorials.
https://i.stack.imgur.com/X8XgB.png
How can I do that ?Forum: Developing with WordPress
In reply to: Download DatabaseThanks @pichichi . I am following your way. Is there any chance of Data missing in this way ?
Forum: Installing WordPress
In reply to: Correct folder & file permisson for WordPressThanks @faisalahammad .
I set all folder permissions to 755 and all files permissions to 664.
But why I am getting below error ?
Forum: Installing WordPress
In reply to: Correct folder & file permisson for WordPressThanks @faisalahammad . That means I should set all folder permissions to 755 and all files permissions to 664, right ?
Forum: Fixing WordPress
In reply to: Sanitize and Save metabox valuesThanks @alanfuller . Could you please evaluate my code ? Is it bad code ? Is there any security issue in my code ? Thanks.
Forum: Fixing WordPress
In reply to: Sanitize and Save metabox valuesThanks @alanfuller . I used
sanitize_text_field()
. Could you please evaluate my code ? Thanks.Forum: Fixing WordPress
In reply to: Save Multiple Metabox valuesThanks @bcworkz . What should I do for other Form fields like
radio button
,select option
etc ? Should I usesanitize_text_field()
for all Form fields ? I am using below code. Please check my code and evaluate it.foreach ( $fields as $field_name => $flag ) { if ( !empty( $field = filter_input( INPUT_POST, $field_name, $flag ) ) ) { update_post_meta( $post_id, $field_name, sanitize_text_field( $field ) ); } else { delete_post_meta( $post_id, $field_name ); } }
I am using this code for all Form fields. Does it sanitize meta box values ?
- This reply was modified 2 years, 1 month ago by mabufoysal.
Forum: Fixing WordPress
In reply to: Font size of HTML contentThanks @pintutrivedi . Is it possible to use CSS class in this regard ? Thanks.
Forum: Developing with WordPress
In reply to: Global variable of MetaboxesThanks @hardiksharma . Can I use it like
public $stored_meta = get_post_meta($post->ID);
?- This reply was modified 2 years, 4 months ago by mabufoysal.