Sumit Bansal Blog

0

Get customize categories in wordpress

The following example will show the categories with checkbox <?php $args=array( ‘child_of’ => ‘1’, ‘hide_empty’ => ‘0’ ); $categories = get_categories($args); foreach($categories as $key => $value){ ?> <label><input name=”escorts_category[]” value=”<?php echo $categories[$key]->cat_ID; ?>” type=”checkbox”>...

0

Add Custom Post Type Counts to the Dashboard

we have several ways to add custom post type counts to the dashboard including right_now_content_table_end. For Example: function add_area_counts() { if (!post_type_exists(‘escorts’)) { return; } $num_posts = wp_count_posts( ‘escorts’ ); $num = number_format_i18n( $num_posts->publish...

0

PHP5 Static Keywords

PHP5 offers a static methods and static member variables.A special kind of method that can be called without instantiating a class.Static methods don’t depend on the properties of a particular instance of a class...

0

PHP5 Interfaces

An interface simply lists (function prototype) the methods a class must implement. However, in PHP a class can implement multiple interfaces and these interfaces can also be used in type hinting. An INTERFACE is...

0

PHP5 Abstracts

Abstract classes and methods are introduced in PHP 5. The concept behind the abstract class is that we need to extend this class by its descendant class(es). If a class contains abstract method then...

0

PHP Final Keywords

Final Keywords prevents child classes from overriding a method by prefixing the definition with final. If the class itself is being defined final then it cannot be extended. Final keyword helps us to put...