Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Plugin Name: Unify Toolkit Plugin
- Author: Salman Ahmed
- Description: Unify Theme Toolkit Plugin , All Shortcode . Please Active .
- Version: 1.0
- */
- if(!defined('ABSPATH')){
- exit;
- }
- define('UNIFY_ACC_URL', WP_PLUGIN_URL . '/' . plugin_basename( dirname (__FILE__ )) . '/' );
- define('UNIFY_ACC_PATH', plugin_dir_path(__FILE__ ) );
- add_filter('widget_text', 'do_shortcode');
- // VC Load
- require_once(UNIFY_ACC_PATH . 'vc-addons/vc-load.php');
- // Theme Shortcode File
- require_once(UNIFY_ACC_PATH . 'shortcodes/slider-shortcode.php');
- // Shortcode Depends on VC Plugin
- include_once( ABSPATH . 'wp-admin/includes/plugin.php');
- if (is_plugin_active('js_composer/js_composer.php' )) {
- require_once(UNIFY_ACC_PATH . 'shortcodes/progress.php');
- }
- // test shortcode
- function unify_shortcode_test($atts , $content = null )
- {
- extract(shortcode_atts(
- array(
- 'id' => ''
- ),
- $atts
- ));
- $imgSrc = wp_get_attachment_image_src($id, 'large' );
- return '<img src="'.$imgSrc[0].'" alt="img">';
- }
- add_shortcode('unify_test','unify_shortcode_test');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement