Plugin Directory

Changeset 974538


Ignore:
Timestamp:
08/28/2014 10:10:18 AM (11 years ago)
Author:
v-media
Message:

Version 1.8

Location:
foodlist/trunk
Files:
4 added
10 edited

Legend:

Unmodified
Added
Removed
  • foodlist/trunk/lib/Artprima/WordPress/API/Wrapper/Generic/CustomPost.php

    r792818 r974538  
    33namespace Artprima\WordPress\API\Wrapper\Generic;
    44
     5/**
     6 * Class CustomPost
     7 *
     8 * @author Denis Voytyuk <[email protected]>
     9 *
     10 * @package Artprima\WordPress\API\Wrapper\Generic
     11 */
    512class CustomPost
    613{
     
    4855     * @param string $name
    4956     * @param mixed $value
    50      * @return \Artprima\WordPress\API\Wrapper\CustomPost
     57     * @return \Artprima\WordPress\API\Wrapper\Generic\CustomPost
    5158     */
    5259    public function setArg($name, $value)
     
    6067     *
    6168     * @param array $args
    62      * @return \Artprima\WordPress\API\Wrapper\CustomPost
     69     * @return \Artprima\WordPress\API\Wrapper\Generic\CustomPost
    6370     */
    6471    public function setArgs(array $args)
     
    7178     * Sets up wordpress init hook
    7279     *
    73      * @return \Artprima\WordPress\API\Wrapper\CustomPost
     80     * @return \Artprima\WordPress\API\Wrapper\Generic\CustomPost
    7481     */
    7582    public function setupRegistrationHook()
  • foodlist/trunk/lib/Artprima/WordPress/Helper/Settings.php

    r792818 r974538  
    1818    public static function getInstance($optionName)
    1919    {
    20         if (!self::$instances[$optionName]) {
     20        if (empty(self::$instances[$optionName])) {
    2121            self::$instances[$optionName] = new self($optionName);
    2222        }
  • foodlist/trunk/lib/Foodlist/Project/WordPress/Plugin/Foodlist/Admin/Metabox/MenuItem/PriceMetabox.php

    r792818 r974538  
    8686        //    return;
    8787        //}
    88        
     88
     89        if (empty($_POST['post_type'])) {
     90            return;
     91        }
     92
    8993        if ( $this->getScreen() != $_POST['post_type'] ) {
    9094            return;
  • foodlist/trunk/lib/Foodlist/Project/WordPress/Plugin/Foodlist/Admin/Metabox/MenuItem/TagsMetabox.php

    r940771 r974538  
    8181        //    return;
    8282        //}
    83        
     83
     84        if (empty($_POST['post_type'])) {
     85            return;
     86        }
     87
    8488        if ( $this->getScreen() != $_POST['post_type'] ) {
    8589            return;
  • foodlist/trunk/lib/Foodlist/Project/WordPress/Plugin/Foodlist/Generic/Shortcode/PrintMenuShortcode.php

    r792818 r974538  
    1717    public function handle($attrs)
    1818    {
     19        $link = '';
    1920        //$this->controller->handleShortcode($attrs);
    2021       
  • foodlist/trunk/lib/Foodlist/Project/WordPress/Plugin/Foodlist/Generic/View/Menu/MenuItemView.php

    r958328 r974538  
    2222use Foodlist\Project\WordPress\Plugin\Foodlist\Generic\Shortcode\Internal\MenuItemTagsShortcode;
    2323use Foodlist\Project\WordPress\Plugin\Foodlist\Generic\Shortcode\Internal\MenuItemThumbnailShortcode;
     24use Foodlist\Project\WordPress\Plugin\Foodlist\Generic\Shortcode\Internal\MenuItemThumbnailUrlShortcode;
    2425use Foodlist\Project\WordPress\Plugin\Foodlist\Generic\Shortcode\Internal\MenuItemTitleShortcode;
    2526use Foodlist\Project\WordPress\Plugin\Foodlist\Manager;
     
    3940            $sm->registerShortcode(new MenuItemTitleShortcode());
    4041            $sm->registerShortcode(new MenuItemExcerptShortcode());
    41             $sm->registerShortcode(new CurrencySignShortcode);
    42             $sm->registerShortcode(new MenuItemPriceShortcode);
    43             $sm->registerShortcode(new MenuItemThumbnailShortcode);
    44            
     42            $sm->registerShortcode(new CurrencySignShortcode());
     43            $sm->registerShortcode(new MenuItemPriceShortcode());
     44            $sm->registerShortcode(new MenuItemThumbnailShortcode());
     45            $sm->registerShortcode(new MenuItemThumbnailUrlShortcode());
     46
    4547            $sm->registerShortcode(new MenuItemTagsShortcode());
    4648            $sm->registerShortcode(new MenuItemTagIconUrlShortcode());
  • foodlist/trunk/lib/Foodlist/Project/WordPress/Plugin/Foodlist/Manager.php

    r792818 r974538  
    6060     * Constructor
    6161     *
    62      * Protected to avoid multiple instances
     62     * Private to avoid multiple instances
    6363     */
    64     protected function __construct()
    65     {
    66         ;
    67     }
     64    protected function __construct() {}
    6865   
    6966    /**
     
    111108    public function registerActivationHooks()
    112109    {
    113         //$scm = new \Artprima\Text\ShortcodeManager();
    114         //$sc = new \Foodlist\Project\WordPress\Plugin\Foodlist\Generic\Shortcode\Internal\TestShortcode('tttt');
    115         //$scm->registerShortcode($sc);
    116         //$sc = new \Foodlist\Project\WordPress\Plugin\Foodlist\Generic\Shortcode\Internal\XxxShortcode('xxx');
    117         //$scm->registerShortcode($sc);
    118         /*
    119         var_dump($scm->applyShortcodes('
    120             ASda fs dfasd234234 sdfasdf asdf [tttt] [xxx]sdfasdfasdfasdf[/xxx] [/tttt]
    121         '));die();
    122         */
    123        
    124        
    125         register_activation_hook('foodlist/plugin.php', array(new Controller\ActivationController($this), 'init'));
    126         register_deactivation_hook('foodlist/plugin.php', array(new Controller\DeactivationController($this), 'init'));
     110        $activationController = new Controller\ActivationController($this);
     111        $deactivationController = new Controller\DeactivationController($this);
     112
     113        register_activation_hook('foodlist/plugin.php', array($activationController, 'init'));
     114        register_deactivation_hook('foodlist/plugin.php', array($deactivationController, 'init'));
     115
     116        //dev-mode hooks
     117        if (class_exists('ActivationHooks', false)) {
     118            add_action('wpapdev_activation', array($activationController, 'init'));
     119            add_action('wpapdev_deactivation', array($deactivationController, 'init'));
     120        }
    127121    }
    128122   
     
    131125     *
    132126     * @param string $url
    133      * @param srting $dir
     127     * @param string $dir
    134128     *
    135129     * @return Manager manager instance
  • foodlist/trunk/loader.php

    r792818 r974538  
    2727        );
    2828    }
    29     $namespaces['Foodlist'] = array(
     29    $namespaces['Foodlist'] = array(
    3030        __DIR__.'/lib',
    3131    );
     
    4242    $_loader->register();
    4343    if (!class_exists('Artprima\Lib', false)) {
    44         new Artprima\Lib; //
     44        new Artprima\Lib; //
    4545    }
    4646   
  • foodlist/trunk/plugin.php

    r958328 r974538  
    11<?php
    2 /**
    3  * @version   $Id$
    4  * @package   Foodlist
    5  * @copyright Copyright (C) 2013 Artprima / http://artprima.eu/. All rights reserved.
    6  */
    7 
    82/*
    93Plugin Name: Foodlist
     
    126Author: Artprima
    137Author URI: http://artprima.eu/
    14 Version: 1.6
     8Version: 1.8
    159*/
    1610
    17 define('FOODLIST_VERSION', '1.6');
     11define('FOODLIST_VERSION', '1.8');
    1812define('FOODLIST_MIN_PHP_VERSION', '5.3.3');
    1913define('FOODLIST_MIN_WP_VERSION', '3.4.0');
Note: See TracChangeset for help on using the changeset viewer.