示例#1
0
           and time.', 'woopoly');
?>
    </p>
    <p>
        <?php 
_e('You can support the future development of this plugin and keep the
           users forum alive by making a small donation.', 'woopoly');
?>
    </p>

    <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
        <input type="hidden" name="cmd" value="_s-xclick">
        <input type="hidden" name="hosted_button_id" value="YKMDTB62QYJUC">
        <input type="image" src="https://www.paypalobjects.com/en_GB/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="PayPal – The safer, easier way to pay online!">
        <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
    </form>

    <p>
        <?php 
_e('If donations i not your thing, please support by rating the plugin on
           <a href="https://wordpress.org/support/view/plugin-reviews/woopoly">Wordpress Repository</a> ,
           or by giving it a star on <a href="https://github.com/decarvalhoaa/woopoly">Github</a>.', 'woopoly');
?>
    </p>
    <p>
        <?php 
echo \Hyyan\WPI\Plugin::getView('social');
?>
    </p>
</div>
示例#2
0
 /**
  * Output page content
  */
 public function outputPage()
 {
     echo \Hyyan\WPI\Plugin::getView('admin', array('self' => $this));
 }
示例#3
0
 /**
  * Handle variation limitation about default language
  *
  * @global string $pagenow current page name
  *
  * @return boolean false if this is not new variable product
  */
 public function handleVariableLimitation()
 {
     global $pagenow;
     if ($pagenow !== 'post-new.php') {
         return false;
     }
     if (isset($_GET['from_post'])) {
         return false;
     }
     if (pll_current_language() === pll_default_language()) {
         return false;
     }
     add_action('admin_print_scripts', function () {
         $jsID = 'variables-data';
         $code = sprintf('var HYYAN_WPI_VARIABLES = {' . '     title       : "%s" ,' . '     content     : "%s" ,' . '     defaultLang : "%s"' . '};', __('Wrong default language for Variable Products', 'woopoly'), __("Variable products must be created in the default language first due to a plugin design limitation. <br> <a href='https://github.com/decarvalhoaa/woopoly/tree/master#what-you-need-to-know-about-this-plugin' target='_blank'>Read more</a>", 'woopoly'), pll_default_language());
         Utilities::jsScriptWrapper($jsID, $code, false);
     });
     add_action('admin_enqueue_scripts', function () {
         wp_enqueue_script('jquery-ui-core');
         wp_enqueue_script("jquery-effects-core");
         wp_enqueue_script('jquery-ui-dialog');
         wp_enqueue_script('woo-poly-variables', plugins_url('public/js/Variables.js', WOOPOLY_FILE), array('jquery', 'jquery-ui-core', 'jquery-ui-dialog'), \Hyyan\WPI\Plugin::getVersion(), true);
     }, 100);
 }
示例#4
0
 /**
  * Show flash messages
  *
  * Show endpoints flash messages in defined screens only
  */
 public function showFlashMessages()
 {
     $screen = get_current_screen();
     $allowedPages = array('edit-shop_order', 'woocommerce_page_wc-settings', 'settings_page_mlang', 'woopoly');
     if (in_array($screen->id, $allowedPages)) {
         FlashMessages::add(MessagesInterface::MSG_ENDPOINTS_TRANSLATION, Plugin::getView('Messages/endpointsTranslations'));
     }
 }
示例#5
0
 /**
  * Replace woo fragments script
  *
  * To update cart widget when language is switched
  */
 public function replace_cart_fragments_script()
 {
     // remove the orginal wc-cart-fragments.js and register ours
     wp_deregister_script('wc-cart-fragments');
     wp_enqueue_script('wc-cart-fragments', plugins_url('public/js/Cart.js', WOOPOLY_FILE), array('jquery', 'jquery-cookie'), Plugin::getVersion(), true);
 }
示例#6
0
?>
            </div>

            <!-- sidebar -->
            <div id="postbox-container-1" class="postbox-container">

                <!-- About the plugin -->
                <div class="postbox">
                    <?php 
echo \Hyyan\WPI\Plugin::getView('Admin/about');
?>
                </div>

                <!-- Support plugin -->
                <div class="postbox">
                    <?php 
echo \Hyyan\WPI\Plugin::getView('Admin/support');
?>
                </div>

                <!-- Need help -->
                <div class = "postbox">
                    <?php 
echo \Hyyan\WPI\Plugin::getView('Admin/getHelp');
?>
                </div>
            </div>
        </div>
    </div>
</div>
示例#7
0
<h3>
    <span>
        <?php 
_e('About The Plugin', 'woo-poly-integration');
?>
    </span>
</h3>
<div class="inside">
    <div>
        <?php 
_e('The plugin is an open source project
            which aims to fill the gap between
            <a href="https://wordpress.org/plugins/woocommerce/">Woocommerce</a>
            and <a href="https://wordpress.org/plugins/polylang/">Polylang</a>', 'woo-poly-integration');
?>
        <br><br>

        <p>
            <?php 
_e('Author : ', 'woo-poly-integration');
?>
            <a href="https://github.com/hyyan">Hyyan Abo Fakher</a>
        </p>

        <?php 
echo \Hyyan\WPI\Plugin::getView('badges');
?>

    </div>
</div>
示例#8
0
 /**
  * Replace woo fragments script.
  *
  * To update cart widget when language is switched
  */
 public function replaceCartFragmentsScript()
 {
     /* remove the orginal wc-cart-fragments.js and register ours */
     wp_deregister_script('wc-cart-fragments');
     wp_enqueue_script('wc-cart-fragments', plugins_url('public/js/Cart.js', Hyyan_WPI_DIR), array('jquery', 'jquery-cookie'), Plugin::getVersion(), true);
 }