Plugin Directory

Changeset 3205672


Ignore:
Timestamp:
12/10/2024 01:23:23 PM (16 months ago)
Author:
lordspace
Message:

Removed cloud lib

Location:
orbisius-child-theme-creator/trunk
Files:
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • orbisius-child-theme-creator/trunk/addons/init.php

    r3128135 r3205672  
    11<?php
    2 
    3 if (file_exists( ORBISIUS_CHILD_THEME_CREATOR_BASE_DIR . '/addons/cloud_lib/init.php' ) ) {
    4     require_once( ORBISIUS_CHILD_THEME_CREATOR_BASE_DIR . '/addons/cloud_lib/init.php' );
    5 }
    62
    73require_once( ORBISIUS_CHILD_THEME_CREATOR_BASE_DIR . '/addons/clipboard/init.php' );
  • orbisius-child-theme-creator/trunk/lib/user.php

    r3128135 r3205672  
    1010     *
    1111     * @staticvar type $instance
    12      * @return \cls
     12     * @return static
    1313     */
    1414    public static function get_instance() {
     
    2727    /**
    2828     *
    29      * @param str/opt $key
    30      * @return str
     29     * @param string $key
     30     * @return mixed
    3131     */
    3232    public function api_key($key = null) {
     
    5454    /**
    5555     *
    56      * @param str/opt $data
    57      * @return str
     56     * @param mixed $data
     57     * @return mixed
    5858     */
    5959    public function plan($data = null) {
     
    8181    /**
    8282     *
    83      * @param str/opt $key
    84      * @return str
     83     * @param string $key
     84     * @return string
    8585     */
    8686    public function email($key = null) {
     
    125125    }
    126126
     127    /**
     128     * Checks if user has sufficient permissions to manage child themes
     129     * Requires either edit_themes or install_themes capability
     130     *
     131     * @param int|string|WP_User $user
     132     * @return bool
     133     */
     134    public function has_access($user = null)
     135    {
     136        if (empty($user)) {
     137            $user = wp_get_current_user();
     138        } elseif (is_numeric($user)) {
     139            $user = get_user_by('id', $user);
     140        } elseif (is_string($user)) {
     141            if (strpos($user, '@') !== false) {
     142                $user = get_user_by('email', $user);
     143            } else {
     144                $user = get_user_by('login', $user);
     145            }
     146        }
     147
     148        if (empty($user)) {
     149            return false;
     150        }
     151
     152        // Allow filtering of required capabilities
     153        $required_caps = apply_filters('orbisius_child_theme_creator_filter_required_caps', [
     154            'edit_themes',
     155            'install_themes',
     156        ]);
     157
     158        foreach ($required_caps as $cap) {
     159            if (user_can($user, $cap)) {
     160                return true;
     161            }
     162        }
     163
     164        return false;
     165    }
     166
    127167}
  • orbisius-child-theme-creator/trunk/orbisius-child-theme-creator.php

    r3128135 r3205672  
    44  Plugin URI: https://orbisius.com/products/wordpress-plugins/orbisius-child-theme-creator/
    55  Description: This plugin allows you to quickly create child themes from any theme that you have currently installed on your site/blog.
    6   Version: 1.5.5
     6  Version: 1.5.6
    77  Author: Svetoslav Marinov (Slavi)
    88  Author URI: https://orbisius.com
     
    4444add_action( 'wp_ajax_nopriv_orbisius_ctc_theme_editor_ajax', 'orbisius_ctc_theme_editor_no_auth_ajax');
    4545
    46 
    4746register_activation_hook( __FILE__, 'orbisius_child_theme_creator_on_activate' );
    4847
     
    7372        $opts['setup_time'] = time();
    7473        orbisius_child_theme_creator_set_options($opts);
     74    }
     75}
     76
     77add_action( 'orbisius_child_theme_creator_action_auth', 'orbisius_child_theme_creator_ensure_auth');
     78
     79/**
     80 * @param array $ctx
     81 * @return void
     82 * @throws Exception
     83 */
     84function orbisius_child_theme_creator_ensure_auth($ctx = [])
     85{
     86    $user_api_obj = orbisius_child_theme_creator_user::get_instance();
     87
     88    if ($user_api_obj->has_access()) {
     89        return;
     90    }
     91
     92    $msg = __('Cannot complete operation or not enough access.', 'orbisius-child-theme-creator');
     93
     94    if (wp_doing_ajax()) {
     95        $req_res = new orbisius_child_theme_creator_result();
     96        $req_res->msg = $msg;
     97        wp_send_json($req_res);
     98    } else {
     99        wp_die($msg);
    75100    }
    76101}
     
    424449                                </ul>
    425450
    426                                 <iframe width="560" height="315" src="https://youtube-nocookie.com/embed/BZUVq6ZTv-o" frameborder="0" allowfullscreen></iframe>
     451                                <iframe width="560" height="315"
     452                                        src="https://youtube-nocookie.com/embed/BZUVq6ZTv-o"
     453                                        frameborder="0"
     454                                        allow="encrypted-media"
     455                                        allowfullscreen>
     456                                </iframe>
    427457
    428458                            </div> <!-- .inside -->
  • orbisius-child-theme-creator/trunk/readme.txt

    r3128135 r3205672  
    22Contributors: lordspace,orbisius
    33Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7APYDVPBCSY9A
    4 Tags: theme,child theme,childtheme,childthemes,parent theme,child themes,CSS,styling,resposive design,design,custom themeing, shared hosting,theme editor theme,themes,wp,wordpress,orbisius,theme creator,custom theme,theme generator,css,css editor
     4Tags: child theme, child themes, design, theme generator, theme creator
    55Requires at least: 3.4
    6 Tested up to: 6.5
     6Tested up to: 6.6
    77Requires PHP: 5.6
    8 Stable tag: 1.5.5
     8Stable tag: 1.5.6
    99License: GPLv2 or later
    1010
     
    171171== Changelog ==
    172172
     173= 1.5.6 =
     174* reduced the number of tags. WP org complained about having more than 5 tags
     175* removed cloud library
     176
    173177= 1.5.5 =
    174178* Maintenance release
Note: See TracChangeset for help on using the changeset viewer.