| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198 |
- <?php
- /**
- * Plugin Name: Taskereasy
- * Plugin URI: https://www.slidesigma.com/themes/wp/taskereasy/plugins
- * Description: A Plugin developed solely for Taskereasy theme
- * Version: 1.0.0
- * Author: Slidesigma
- * Author URI: slidesigma.com
- * License: GPL2
- * License URI: https://www.gnu.org/licenses/gpl-2.0.html
- * Text Domain: taskereasy
- */
- if( !defined( 'ABSPATH' ) ) {
- die;
- }
- /*-------------------------------------------------------
- * Custom Widgets
- *-------------------------------------------------------*/
- require plugin_dir_path( __FILE__ ) . 'widget/instagram-widgets.php';
- /*-------------------------------------------------------
- * Custom Meta
- *-------------------------------------------------------*/
- require plugin_dir_path( __FILE__ ) . 'inc/metaboxes/category-meta.php';
- require plugin_dir_path( __FILE__ ) . 'inc/metaboxes/banner-meta.php';
- add_action( 'init', 'taskereasy_plugin_functions', 0 );
- function taskereasy_plugin_functions() {
- include_once(WP_PLUGIN_DIR.'/taskereasy-plugin/inc/metaboxes/post-type.php');
- }
- /************************Start Portfolio posttype***************/
- function portfolioplugin_setup_post_type() {
- // register the "book" custom post type
- register_post_type( 'Portfolios', array(
- 'labels' => array(
- 'name' =>esc_html__( 'Portfolios' ),
- 'singular_name' =>esc_html__( 'Portfolio' )
- ),
- 'public' => true,
- 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields', ),
- 'taxonomies' => array( 'categories' ),
- 'rewrite' => array('slug' => 'portfolios'),
- 'hierarchical' => true,
- 'public' => true,
- 'show_ui' => true,
- 'show_in_menu' => true,
- 'show_in_nav_menus' => true,
- 'show_in_admin_bar' => true,
- 'menu_position' => 50,
- 'can_export' => true,
- 'has_archive' => true,
- 'exclude_from_search' => false,
- 'publicly_queryable' => true,
- 'capability_type' => 'page',
- )
- );
- }
- add_action( 'init', 'portfolioplugin_setup_post_type' );
- add_action( 'init', 'create_portfolio_tax' );
- function create_portfolio_tax() {
- register_taxonomy(
- 'portfoliocategories',
- 'portfolios',
- array(
- 'label' =>esc_html__( 'Portfolio Categories' ),
- 'rewrite' => array( 'slug' => 'portfoliocategories' ),
- 'hierarchical' => true,
- )
- );
- }
- /************************Start Services posttype***************/
- function services_post_type() {
- // register the "book" custom post type
- register_post_type( 'Services', array(
- 'labels' => array(
- 'name' =>esc_html__( 'Services' ),
- 'singular_name' =>esc_html__( 'Service' )
- ),
- 'public' => true,
- 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields' ),
- 'taxonomies' => array( 'categories' ),
- 'rewrite' => array('slug' => 'services'),
- 'hierarchical' => true,
- 'public' => true,
- 'show_ui' => true,
- 'show_in_menu' => true,
- 'show_in_nav_menus' => true,
- 'show_in_admin_bar' => true,
- 'menu_position' => 50,
- 'can_export' => true,
- 'has_archive' => true,
- 'exclude_from_search' => false,
- 'publicly_queryable' => true,
- 'capability_type' => 'page',
- )
- );
- }
- add_action( 'init', 'services_post_type' );
- //services custom taxonomy
- add_action( 'init', 'create_services_tax' );
- function create_services_tax() {
- register_taxonomy(
- 'servicecategories',
- 'services',
- array(
- 'label' =>esc_html__( 'Services Categories' ),
- 'rewrite' => array( 'slug' => 'servicecategories' ),
- 'hierarchical' => true,
- )
- );
- }
- /************************Start Services posttype***************/
- /*******************Activation*****************/
- function taskereasy_install() {
- // trigger our function that registers the custom post type
- portfolioplugin_setup_post_type(); //portfolio custom posttype
- create_portfolio_tax();
- // portfolio_shortcode();
- services_post_type(); //service custom posttype
- //testimonial_post_type(); //testimonial custom posttype
- // clear the permalinks after the post type has been registered
- flush_rewrite_rules();
- }
- register_activation_hook( __FILE__, 'taskereasy_install' );
- /**************Deactivation*****************/
- function taskereasy_deactivation() {
- // unregister the post type, so the rules are no longer in memory
- unregister_post_type( 'book' );
- // clear the permalinks to remove our post type's rules from the database
- flush_rewrite_rules();
- }
- register_deactivation_hook( __FILE__, 'taskereasy_deactivation' );
- /*-------------------------------------------------------
- * Visual Composer Shortcodes
- *-------------------------------------------------------*/
- function taskereasy_load_vc_addons() {
- if (class_exists('WPBakeryVisualComposerAbstract')) {
- require_once plugin_dir_path( __FILE__ ) . 'shortcode/vc-heading.php';
- require_once plugin_dir_path( __FILE__ ) . 'shortcode/vc-testimonials.php';
- require_once plugin_dir_path( __FILE__ ) . 'shortcode/vc-single-image.php';
- require_once plugin_dir_path( __FILE__ ) . 'shortcode/vc-services.php';
- require_once plugin_dir_path( __FILE__ ) . 'shortcode/vc-faq.php';
- require_once plugin_dir_path( __FILE__ ) . 'shortcode/vc-button.php';
- require_once plugin_dir_path( __FILE__ ) . 'shortcode/vc-image-text.php';
- require_once plugin_dir_path( __FILE__ ) . 'shortcode/vc-timeline.php';
- require_once plugin_dir_path( __FILE__ ) . 'shortcode/vc-team.php';
- require_once plugin_dir_path( __FILE__ ) . 'shortcode/vc-pricing.php';
- require_once plugin_dir_path( __FILE__ ) . 'shortcode/vc-logo.php';
- require_once plugin_dir_path( __FILE__ ) . 'shortcode/vc-tabs.php';
- require_once plugin_dir_path( __FILE__ ) . 'shortcode/vc-logos.php';
- require_once plugin_dir_path( __FILE__ ) . 'shortcode/vc-blog.php';
- require_once plugin_dir_path( __FILE__ ) . 'shortcode/vc-icon-text.php';
- require_once plugin_dir_path( __FILE__ ) . 'shortcode/vc-portfolios.php';
- require_once plugin_dir_path( __FILE__ ) . 'shortcode/vc-counter.php';
- require_once plugin_dir_path( __FILE__ ) . 'shortcode/vc-address.php';
- require_once plugin_dir_path( __FILE__ ) . 'shortcode/vc-map.php';
- require_once plugin_dir_path( __FILE__ ) . 'shortcode/vc-youtube.php';
- require_once plugin_dir_path( __FILE__ ) . 'shortcode/vc-cta.php';
- require_once plugin_dir_path( __FILE__ ) . 'shortcode/vc-services-blog.php';
- require_once plugin_dir_path( __FILE__ ) . 'shortcode/vc-portfolios-post.php';
- }
- }
- add_action( 'init','taskereasy_load_vc_addons');
|